diff options
author | Tom Tromey <tom@tromey.com> | 2022-05-27 07:52:16 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-05-27 07:52:16 -0600 |
commit | 509e6230915a050d510a36ca9482193c76a6a216 (patch) | |
tree | 7196a6d712c9217b35041d41dde825c1168e15a8 /gdb/arc-tdep.c | |
parent | 202be274a41a912f705141d9fb3574f4b0d415e1 (diff) | |
download | gdb-509e6230915a050d510a36ca9482193c76a6a216.zip gdb-509e6230915a050d510a36ca9482193c76a6a216.tar.gz gdb-509e6230915a050d510a36ca9482193c76a6a216.tar.bz2 |
Fix crash with "maint print arc"
Luis noticed that "maint print arc" would crash, because the command
handler did not find "show" in the command name, violating an
invariant. This patch fixes the bug by changing the registration to
use add_basic_prefix_cmd instead.
Diffstat (limited to 'gdb/arc-tdep.c')
-rw-r--r-- | gdb/arc-tdep.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c index 98bd1c4..3edfd46 100644 --- a/gdb/arc-tdep.c +++ b/gdb/arc-tdep.c @@ -2474,11 +2474,11 @@ _initialize_arc_tdep () /* Register ARC-specific commands with gdb. */ /* Add root prefix command for "maintenance print arc" commands. */ - add_show_prefix_cmd ("arc", class_maintenance, - _("ARC-specific maintenance commands for printing GDB " - "internal state."), - &maintenance_print_arc_list, - 0, &maintenanceprintlist); + add_basic_prefix_cmd ("arc", class_maintenance, + _("ARC-specific maintenance commands for printing GDB " + "internal state."), + &maintenance_print_arc_list, + 0, &maintenanceprintlist); add_cmd ("arc-instruction", class_maintenance, dump_arc_instruction_command, |