From 14b42fc4a0edc412e02a6c9cfe7eb48e67da3145 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 17 May 2021 14:01:08 -0400 Subject: gdb: rename cmd_list_element::prefixlist to subcommands While browsing this code, I found the name "prefixlist" really confusing. I kept reading it as "list of prefixes". Which it isn't: it's a list of sub-commands, for a prefix command. I think that renaming it to "subcommands" would make things clearer. gdb/ChangeLog: * Rename "prefixlist" parameters to "subcommands" throughout. * cli/cli-decode.h (cmd_list_element) : Rename to... : ... this. * cli/cli-decode.c (lookup_cmd_for_prefixlist): Rename to... (lookup_cmd_with_subcommands): ... this. Change-Id: I150da10d03052c2420aa5b0dee41f422e2a97928 --- gdb/python/py-cmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/python/py-cmd.c') diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c index 6f7794c..c2c0df5 100644 --- a/gdb/python/py-cmd.c +++ b/gdb/python/py-cmd.c @@ -111,7 +111,7 @@ cmdpy_function (struct cmd_list_element *command, error (_("Invalid invocation of Python command object.")); if (! PyObject_HasAttr ((PyObject *) obj, invoke_cst)) { - if (obj->command->prefixlist != nullptr) + if (obj->command->subcommands != nullptr) { /* A prefix command does not need an invoke method. */ return; @@ -393,9 +393,9 @@ gdbpy_parse_command_name (const char *name, return NULL; } - if (elt->prefixlist) + if (elt->subcommands) { - *base_list = elt->prefixlist; + *base_list = elt->subcommands; return result; } -- cgit v1.1