From: Tom Tromey Date: Fri, 27 May 2022 13:52:16 +0000 (-0600) Subject: Fix crash with "maint print arc" X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=509e6230915a050d510a36ca9482193c76a6a216;p=binutils-gdb.git 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. --- diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c index 98bd1c4bc0a..3edfd466f3b 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,