aboutsummaryrefslogtreecommitdiff
path: root/gdb/source.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/source.c')
-rw-r--r--gdb/source.c35
1 files changed, 8 insertions, 27 deletions
diff --git a/gdb/source.c b/gdb/source.c
index a225280..0fd370b 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1,5 +1,5 @@
/* List lines of source files for GDB, the GNU debugger.
- Copyright (C) 1986-2024 Free Software Foundation, Inc.
+ Copyright (C) 1986-2025 Free Software Foundation, Inc.
This file is part of GDB.
@@ -1909,26 +1909,8 @@ source_lines_range::source_lines_range (int startline,
}
}
-/* Handle the "set source" base command. */
-
-static void
-set_source (const char *arg, int from_tty)
-{
- help_list (setsourcelist, "set source ", all_commands, gdb_stdout);
-}
-
-/* Handle the "show source" base command. */
-
-static void
-show_source (const char *args, int from_tty)
-{
- help_list (showsourcelist, "show source ", all_commands, gdb_stdout);
-}
-
-void _initialize_source ();
-void
-_initialize_source ()
+INIT_GDB_FILE (source)
{
init_source_path ();
@@ -2045,13 +2027,12 @@ By default, relative filenames are displayed."),
show_filename_display_string,
&setlist, &showlist);
- add_prefix_cmd ("source", no_class, set_source,
- _("Generic command for setting how sources are handled."),
- &setsourcelist, 0, &setlist);
-
- add_prefix_cmd ("source", no_class, show_source,
- _("Generic command for showing source settings."),
- &showsourcelist, 0, &showlist);
+ add_setshow_prefix_cmd
+ ("source", no_class,
+ _("Generic command for setting how sources are handled."),
+ _("Generic command for showing source settings."),
+ &setsourcelist, &showsourcelist,
+ &setlist, &showlist);
add_setshow_boolean_cmd ("open", class_files, &source_open, _("\
Set whether GDB should open source files."), _("\