This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: set sysroot foo cannot be undone


On 03/10/2015 04:38 PM, Gary Benson wrote:
> Hi all,
> 
> When you start GDB sysroot is set to "", unless you configured it
> differently.  After you set it to something else it doesn't seem
> possible to restore sysroot to "".  Would anyone object to my
> implementing an "unset sysroot" command?

Why not just make "set sysroot" (no argument) work?  That's the
first thing that I blindly tried without even thinking about it,
thinking it'd just work like other commands (below).  Did you find
a good reason that wouldn't be desirable?

$ gdb
GNU gdb (GDB) 7.9.50.20150309-cvs
...
(gdb) show debug-file-directory
The directory where separate debug symbols are searched for is "/usr/lib/debug".
(gdb) set debug-file-directory
(gdb) show debug-file-directory
The directory where separate debug symbols are searched for is "".

...

(gdb) show args
Argument list to give program being debugged when it is started is "".
(gdb) set args foo
(gdb) show args
Argument list to give program being debugged when it is started is "foo".
(gdb) set args
(gdb) show args
Argument list to give program being debugged when it is started is "".

...

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]