mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 19:50:13 +08:00
Use complete_on_enum in tui_reggroup_completer
tui_reggroup_completer has an "XXXX" comment suggesting the use of complete_on_enum. This patch implements this suggestion. gdb/ChangeLog 2020-07-01 Tom Tromey <tom@tromey.com> * tui/tui-regs.c (tui_reggroup_completer): Use complete_on_enum.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2020-07-01 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
* tui/tui-regs.c (tui_reggroup_completer): Use complete_on_enum.
|
||||||
|
|
||||||
2020-07-01 Fangrui Song <maskray@google.com>
|
2020-07-01 Fangrui Song <maskray@google.com>
|
||||||
|
|
||||||
* dwarf2/read.c (lnp_state_machine::check_line_address): Test -1.
|
* dwarf2/read.c (lnp_state_machine::check_line_address): Test -1.
|
||||||
|
@ -631,18 +631,11 @@ tui_reggroup_completer (struct cmd_list_element *ignore,
|
|||||||
completion_tracker &tracker,
|
completion_tracker &tracker,
|
||||||
const char *text, const char *word)
|
const char *text, const char *word)
|
||||||
{
|
{
|
||||||
static const char *extra[] = { "next", "prev", NULL };
|
static const char * const extra[] = { "next", "prev", NULL };
|
||||||
size_t len = strlen (word);
|
|
||||||
const char **tmp;
|
|
||||||
|
|
||||||
reggroup_completer (ignore, tracker, text, word);
|
reggroup_completer (ignore, tracker, text, word);
|
||||||
|
|
||||||
/* XXXX use complete_on_enum instead? */
|
complete_on_enum (tracker, extra, text, word);
|
||||||
for (tmp = extra; *tmp != NULL; ++tmp)
|
|
||||||
{
|
|
||||||
if (strncmp (word, *tmp, len) == 0)
|
|
||||||
tracker.add_completion (make_unique_xstrdup (*tmp));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _initialize_tui_regs ();
|
void _initialize_tui_regs ();
|
||||||
|
Reference in New Issue
Block a user