From 9985872497e2b8c86424fcb97cd9a065f406a5c5 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 17 May 2021 14:01:14 -0400 Subject: 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) : Rename to... : ... this. (add_alias_cmd): Rename old to target. (add_info_alias): Rename old_name to target_name. (add_com_alias): Likewise. Change-Id: I8db36c6dd799fae155f7acd3805f6d62d98befa9 --- gdb/unittests/command-def-selftests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/unittests/command-def-selftests.c') diff --git a/gdb/unittests/command-def-selftests.c b/gdb/unittests/command-def-selftests.c index 53e5626..123667d 100644 --- a/gdb/unittests/command-def-selftests.c +++ b/gdb/unittests/command-def-selftests.c @@ -155,7 +155,7 @@ traverse_command_structure (struct cmd_list_element **list, { /* If this command has subcommands and is not an alias, traverse the subcommands. */ - if (c->subcommands != NULL && c->cmd_pointer == nullptr) + if (c->subcommands != NULL && c->alias_target == nullptr) { /* Recursively call ourselves on the subcommand list, passing the right prefix in. */ -- cgit v1.1