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:
Simon Marchi
2021-05-14 15:38:49 -04:00
parent 1be99b11f8
commit 3d0b356410
11 changed files with 37 additions and 31 deletions

View File

@@ -83,6 +83,10 @@ struct cmd_list_element
bool is_alias () const
{ return this->alias_target != nullptr; }
/* Return true if this command is a prefix command. */
bool is_prefix () const
{ return this->subcommands != nullptr; }
/* Points to next command in this list. */
struct cmd_list_element *next = nullptr;