mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 17:18:24 +08:00
gdb: make add_setshow commands return set_show_commands
Some add_set_show commands return a single cmd_list_element, the one for the "set" command. A subsequent patch will need to access the show command's cmd_list_element as well. Change these functions to return a new structure type that holds both pointers. I initially only modified add_setshow_boolean_cmd (the one I needed), but I think it's better to change the whole chain to keep everything in sync. gdb/ChangeLog: * command.h (set_show_commands): New. (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd, add_setshow_boolean_cmd, add_setshow_filename_cmd, add_setshow_string_cmd, add_setshow_string_noescape_cmd, add_setshow_optional_filename_cmd, add_setshow_integer_cmd, add_setshow_uinteger_cmd, add_setshow_zinteger_cmd, add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd): Return set_show_commands. Adjust callers. * cli/cli-decode.c (add_setshow_cmd_full): Return set_show_commands, remove result parameters, adjust callers. Change-Id: I17492b01b76002d09effc84830f9c6db26f1db7a
This commit is contained in:
15
gdb/stack.c
15
gdb/stack.c
@ -3572,17 +3572,18 @@ Usage: func NAME"));
|
||||
|
||||
/* Install "set print raw frame-arguments", a deprecated spelling of
|
||||
"set print raw-frame-arguments". */
|
||||
cmd = add_setshow_boolean_cmd
|
||||
("frame-arguments", no_class,
|
||||
&user_frame_print_options.print_raw_frame_arguments,
|
||||
_("\
|
||||
set_show_commands set_show_frame_args
|
||||
= add_setshow_boolean_cmd
|
||||
("frame-arguments", no_class,
|
||||
&user_frame_print_options.print_raw_frame_arguments,
|
||||
_("\
|
||||
Set whether to print frame arguments in raw form."), _("\
|
||||
Show whether to print frame arguments in raw form."), _("\
|
||||
If set, frame arguments are printed in raw form, bypassing any\n\
|
||||
pretty-printers for that value."),
|
||||
NULL, NULL,
|
||||
&setprintrawlist, &showprintrawlist);
|
||||
deprecate_cmd (cmd, "set print raw-frame-arguments");
|
||||
NULL, NULL,
|
||||
&setprintrawlist, &showprintrawlist);
|
||||
deprecate_cmd (set_show_frame_args.set, "set print raw-frame-arguments");
|
||||
|
||||
add_setshow_auto_boolean_cmd ("disassemble-next-line", class_stack,
|
||||
&disassemble_next_line, _("\
|
||||
|
Reference in New Issue
Block a user