diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-06-25 21:35:40 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-06-25 21:35:40 -0400 |
commit | 0f8e2034128e4a73e02cb8311eeeea7e886a5985 (patch) | |
tree | 609b9baf7a5f167daa28b0341743aa650677f28a /gdb/guile/scm-param.c | |
parent | ac2d77c6a102ca785aae565aec93a3478a9f4544 (diff) | |
download | gdb-0f8e2034128e4a73e02cb8311eeeea7e886a5985.zip gdb-0f8e2034128e4a73e02cb8311eeeea7e886a5985.tar.gz gdb-0f8e2034128e4a73e02cb8311eeeea7e886a5985.tar.bz2 |
gdb: add context getter/setter to cmd_list_element
Straightforward replacement of get_cmd_context / set_cmd_context with
cmd_list_element methods.
gdb/ChangeLog:
* cli/cli-decode.h (struct cmd_list_element) <set_context,
context>: New.
<context>: Rename to...
<m_context>: ... this.
* cli/cli-decode.c (set_cmd_context, get_cmd_context): Remove.
* command.h (set_cmd_context, get_cmd_context): Remove, use
cmd_list_element::set_context and cmd_list_element::context
everywhere instead.
Change-Id: I5016b0079014e3f17d1aa449ada7954473bf2b5d
Diffstat (limited to 'gdb/guile/scm-param.c')
-rw-r--r-- | gdb/guile/scm-param.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/guile/scm-param.c b/gdb/guile/scm-param.c index 5f02e13..86f6105 100644 --- a/gdb/guile/scm-param.c +++ b/gdb/guile/scm-param.c @@ -274,7 +274,7 @@ pascm_signal_setshow_error (SCM exception, const char *msg) static void pascm_set_func (const char *args, int from_tty, struct cmd_list_element *c) { - param_smob *p_smob = (param_smob *) get_cmd_context (c); + param_smob *p_smob = (param_smob *) c->context (); SCM self, result, exception; gdb_assert (gdbscm_is_procedure (p_smob->set_func)); @@ -314,7 +314,7 @@ static void pascm_show_func (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - param_smob *p_smob = (param_smob *) get_cmd_context (c); + param_smob *p_smob = (param_smob *) c->context (); SCM value_scm, self, result, exception; gdb_assert (gdbscm_is_procedure (p_smob->show_func)); @@ -468,13 +468,13 @@ add_setshow_generic (enum var_types param_type, enum command_class cmd_class, tmp_name = cmd_name; param = lookup_cmd (&tmp_name, *show_list, "", NULL, 0, 1); gdb_assert (param != NULL); - set_cmd_context (param, self); + param->set_context (self); *set_cmd = param; tmp_name = cmd_name; param = lookup_cmd (&tmp_name, *set_list, "", NULL, 0, 1); gdb_assert (param != NULL); - set_cmd_context (param, self); + param->set_context (self); *show_cmd = param; } |