This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] New set auto-load-local-gdbinit + disable it by default
On Tue, Jan 17, 2012 at 8:22 AM, Matt Rice <ratmice@gmail.com> wrote:
> On Tue, Jan 17, 2012 at 1:55 AM, Jan Kratochvil
> <jan.kratochvil@redhat.com> wrote:
>> Still at least the setting should go in and then one can then have
>> "set auto-load-local-gdbinit off" at least in ~/.gdbinit. ? Anyway I would
>> file a FESCo (Fedora Engineering Steering Committee) ticket for such "off" in
>> /etc/gdbinit at least in distro and IMHO it needs to get approved (but maybe
>> not, it would be another fork from upstream).
>
> I'm of the opinion it should just be nuked outright, and people who
> want the old behaviour should add something to the effect of the
> following to their ~/.gdbinit, I fear a on/off is just going to lead
> to different behaviours across distros, (and still i wish the
> cwd/.gdbinit wasn't hidden/too late for that.)
>
> py
> if os.getcwd() != os.environ['HOME']:
> ?gdb.execute("source .gdbinit")
> end
[for reference sake]
That won't behave the same way as is.
Find a way to do that *after* the symbols of the program have been
loaded and then you've got something (hook into new objfile
notifications or some such)