This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Allow "set sysroot" with no argument to restore sysroot to empty
- From: Gary Benson <gary at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 12 Mar 2015 11:45:36 -0000
- Subject: [binutils-gdb] Allow "set sysroot" with no argument to restore sysroot to empty
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=811a659a779fdf93293fe1105d99e9db171a8b68
commit 811a659a779fdf93293fe1105d99e9db171a8b68
Author: Gary Benson <gbenson@redhat.com>
Date: Thu Mar 12 11:44:16 2015 +0000
Allow "set sysroot" with no argument to restore sysroot to empty
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.
Diff:
---
gdb/ChangeLog | 6 ++++++
gdb/solib.c | 10 +++++-----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a3ba5dd..9f0b314 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/solib.c b/gdb/solib.c
index 8417f88..c8138ef 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -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);