mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-25 11:16:56 +08:00
gdb: add cmd_list_element::is_prefix
Same idea as the previous patch, but for prefix instead of alias. gdb/ChangeLog: * cli/cli-decode.h (cmd_list_element) <is_prefix>: New, use it. Change-Id: I76a9d2e82fc8d7429904424674d99ce6f9880e2b
This commit is contained in:
@ -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->subcommands != nullptr)
|
||||
if (obj->command->is_prefix ())
|
||||
{
|
||||
/* A prefix command does not need an invoke method. */
|
||||
return;
|
||||
@ -393,7 +393,7 @@ gdbpy_parse_command_name (const char *name,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (elt->subcommands)
|
||||
if (elt->is_prefix ())
|
||||
{
|
||||
*base_list = elt->subcommands;
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user