aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-05-17 14:01:14 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2021-05-17 14:01:14 -0400
commit9985872497e2b8c86424fcb97cd9a065f406a5c5 (patch)
treea293dbd7159ddf4295a39381da29a33ab9a5b8da /gdb/cli/cli-setshow.c
parentgdb: rename cmd_list_element::prefixlist to subcommands (diff)
downloadbinutils-gdb-9985872497e2b8c86424fcb97cd9a065f406a5c5.tar.gz
binutils-gdb-9985872497e2b8c86424fcb97cd9a065f406a5c5.tar.bz2
binutils-gdb-9985872497e2b8c86424fcb97cd9a065f406a5c5.zip
gdb: rename cmd_list_element::cmd_pointer to target
cmd_pointer is another field whose name I found really not clear. Yes, it's a pointer to a command, the type tells me that. But what's the relationship of that command to the current command? This field contains, for an alias, the command that it aliases. So I think that the name "alias_target" would be more appropriate. Also, rename "old" parameters to "target" in the functions that add aliases. gdb/ChangeLog: * cli/cli-decode.h (cmd_list_element) <cmd_pointer>: Rename to... <alias_target>: ... this. (add_alias_cmd): Rename old to target. (add_info_alias): Rename old_name to target_name. (add_com_alias): Likewise. Change-Id: I8db36c6dd799fae155f7acd3805f6d62d98befa9
Diffstat (limited to 'gdb/cli/cli-setshow.c')
-rw-r--r--gdb/cli/cli-setshow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index cb72c6241cb..cb821c5b3c0 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -740,7 +740,7 @@ cmd_show_list (struct cmd_list_element *list, int from_tty)
/* If we find a prefix, run its list, prefixing our output by its
prefix (with "show " skipped). */
- if (list->subcommands && list->cmd_pointer == nullptr)
+ if (list->subcommands && list->alias_target == nullptr)
{
ui_out_emit_tuple optionlist_emitter (uiout, "optionlist");
std::string prefixname = list->prefixname ();
@@ -750,7 +750,7 @@ cmd_show_list (struct cmd_list_element *list, int from_tty)
uiout->field_string ("prefix", new_prefix);
cmd_show_list (*list->subcommands, from_tty);
}
- else if (list->theclass != no_set_class && list->cmd_pointer == nullptr)
+ else if (list->theclass != no_set_class && list->alias_target == nullptr)
{
ui_out_emit_tuple option_emitter (uiout, "option");