This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] New option -nh: disable loading ~/.gdbinit
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: dje at google dot com
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 21 Sep 2012 17:35:08 +0200
- Subject: Re: [RFC] New option -nh: disable loading ~/.gdbinit
- References: <yjt2y5k42w19.fsf@ruffy2.mtv.corp.google.com>
On Fri, 21 Sep 2012 00:01:54 +0200, dje@google.com wrote:
> When running tests (not necessarily tests in gdb/testsuite!) with a
> gdb with a non-trivial system.gdbinit,
> it is useful to be able disable loading ~/.gdbinit.
> system.gdbinit is still necessary, it provides necessary functionality.
>
> One *could* run the tests with -nx -x /path/to/system.gdbinit,
> but the path to system.gdbinit is not necessarily easy to obtain.
>
> Instead, I'd like to add this option: -nh.
The current auto-load functionality:
(gdb) set auto-load
gdb-scripts local-gdbinit safe-path
libthread-db python-scripts scripts-directory
besides local-gdbinit would logically have also system-gdbinit and
home-gdbinit.
-nx would be then equivalent to all of:
-iex 'set auto-load system-gdbinit off'
-iex 'set auto-load home-gdbinit off'
-iex 'set auto-load local-gdbinit off'
-nh would be then equivalent to:
-iex 'set auto-load home-gdbinit off'
Wouldn't be the last option more clear than another magic option '-nh'?
The patch would be short, I could even post it but so far it was more just
some sort of a clean-up but if you even have a use for it.
Regards,
Jan