aboutsummaryrefslogtreecommitdiff
path: root/gdb/frame.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-09-22 13:43:25 -0400
committerSimon Marchi <simon.marchi@efficios.com>2021-10-28 10:44:18 -0400
commitf54bdb6d2799c658e076f10e42222949dc51032d (patch)
treebd9804255bf472e93740a8b47b2f90d5bde939c3 /gdb/frame.c
parent5ad2694b1ebe123ea92fcee094a69bcdc9769985 (diff)
downloadgdb-f54bdb6d2799c658e076f10e42222949dc51032d.zip
gdb-f54bdb6d2799c658e076f10e42222949dc51032d.tar.gz
gdb-f54bdb6d2799c658e076f10e42222949dc51032d.tar.bz2
gdb: add add_setshow_prefix_cmd
There's a common pattern to call add_basic_prefix_cmd and add_show_prefix_cmd to add matching set and show commands. Add the add_setshow_prefix_cmd function to factor that out and use it at a few places. Change-Id: I6e9e90a30e9efb7b255bf839cac27b85d7069cfd
Diffstat (limited to 'gdb/frame.c')
-rw-r--r--gdb/frame.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gdb/frame.c b/gdb/frame.c
index b121892..2a899fc 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -3129,16 +3129,15 @@ _initialize_frame ()
gdb::observers::target_changed.attach (frame_observer_target_changed,
"frame");
- add_basic_prefix_cmd ("backtrace", class_maintenance, _("\
+ add_setshow_prefix_cmd ("backtrace", class_maintenance,
+ _("\
Set backtrace specific variables.\n\
Configure backtrace variables such as the backtrace limit"),
- &set_backtrace_cmdlist,
- 0/*allow-unknown*/, &setlist);
- add_show_prefix_cmd ("backtrace", class_maintenance, _("\
+ _("\
Show backtrace specific variables.\n\
Show backtrace variables such as the backtrace limit."),
- &show_backtrace_cmdlist,
- 0/*allow-unknown*/, &showlist);
+ &set_backtrace_cmdlist, &show_backtrace_cmdlist,
+ &setlist, &showlist);
add_setshow_uinteger_cmd ("limit", class_obscure,
&user_set_backtrace_options.backtrace_limit, _("\