Allow "set sysroot" with no argument to restore sysroot to empty
authorGary Benson <gbenson@redhat.com>
Thu, 12 Mar 2015 11:44:16 +0000 (11:44 +0000)
committerGary Benson <gbenson@redhat.com>
Thu, 12 Mar 2015 11:44:16 +0000 (11:44 +0000)
This commit creates the "set/show sysroot" commands using
add_setshow_optional_filename_cmd to allow the sysroot to
be restored to empty after being set.

gdb/ChangeLog:

* solib.c (_initialize_solib): Make "set/show sysroot" use
add_setshow_optional_filename_cmd so it can be restored to
empty after being set.

gdb/ChangeLog
gdb/solib.c

index a3ba5dd617102e8a20efd8d08be260499ebd7daa..9f0b3142f16beb6e9062a50e5d8877749e110998 100644 (file)
@@ -1,3 +1,9 @@
+2015-03-12  Gary Benson <gbenson@redhat.com>
+
+       * solib.c (_initialize_solib): Make "set/show sysroot" use
+       add_setshow_optional_filename_cmd so it can be restored to
+       empty after being set.
+
 2015-03-11  Sergio Durigan Junior  <sergiodj@redhat.com>
 
        * Makefile.in (SFILES): New source break-catch-syscall.c.
index 8417f8833e8a67c54d3020e817fd1509a0095791..c8138ef7a89ddd3c0783bb3b0041d05930d4bdf0 100644 (file)
@@ -1590,16 +1590,16 @@ inferior.  Otherwise, symbols must be loaded manually, using \
                           show_auto_solib_add,
                           &setlist, &showlist);
 
-  add_setshow_filename_cmd ("sysroot", class_support,
-                           &gdb_sysroot, _("\
+  add_setshow_optional_filename_cmd ("sysroot", class_support,
+                                    &gdb_sysroot, _("\
 Set an alternate system root."), _("\
 Show the current system root."), _("\
 The system root is used to load absolute shared library symbol files.\n\
 For other (relative) files, you can add directories using\n\
 `set solib-search-path'."),
-                           reload_shared_libraries,
-                           NULL,
-                           &setlist, &showlist);
+                                    reload_shared_libraries,
+                                    NULL,
+                                    &setlist, &showlist);
 
   add_alias_cmd ("solib-absolute-prefix", "sysroot", class_support, 0,
                 &setlist);