mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
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
This commit is contained in:
committed by
Simon Marchi
parent
5ad2694b1e
commit
f54bdb6d27
13
gdb/f-lang.c
13
gdb/f-lang.c
@@ -1681,13 +1681,12 @@ _initialize_f_language ()
|
||||
{
|
||||
f_type_data = gdbarch_data_register_post_init (build_fortran_types);
|
||||
|
||||
add_basic_prefix_cmd ("fortran", no_class,
|
||||
_("Prefix command for changing Fortran-specific settings."),
|
||||
&set_fortran_list, 0, &setlist);
|
||||
|
||||
add_show_prefix_cmd ("fortran", no_class,
|
||||
_("Generic command for showing Fortran-specific settings."),
|
||||
&show_fortran_list, 0, &showlist);
|
||||
add_setshow_prefix_cmd
|
||||
("fortran", no_class,
|
||||
_("Prefix command for changing Fortran-specific settings."),
|
||||
_("Generic command for showing Fortran-specific settings."),
|
||||
&set_fortran_list, &show_fortran_list,
|
||||
&setlist, &showlist);
|
||||
|
||||
add_setshow_boolean_cmd ("repack-array-slices", class_vars,
|
||||
&repack_array_slices, _("\
|
||||
|
||||
Reference in New Issue
Block a user