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.
This commit is contained in:
Tom Tromey 2022-05-27 07:52:16 -06:00
parent 202be274a4
commit 509e623091

View File

@ -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,