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
On Fri, Sep 21, 2012 at 8:35 AM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> 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'?
magic? Say what?
> 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.
In this case I like the short -nh.