Re: [patch] New set auto-load-local-gdbinit + disable it by default

Eli Zaretskii
2012-01-17T21:10:17Z

> From: Tom Tromey <tromey@redhat.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, dje@google.com, gdb-patches@sourceware.org
> Date: Tue, 17 Jan 2012 13:28:29 -0700
>
> >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
>
> Jan> On Tue, 17 Jan 2012 18:54:57 +0100, Eli Zaretskii wrote:
> >> ??? How's the .gdbinit file that comes with Emacs "malicious"?
>
> Jan> If one runs "gdb" one expects to get "gdb".
>
> Jan> If one runs "gdb" in any of these directories (Emacs) one surprisingly gets
> Jan> some weirdly behaving beast instead.
>
> I'm not convinced by this line of argument.
>
> I think gdb has touted this -- rightly -- as a feature. And, if
> anything, I think we've gone even more in this direction in recent
> years, what with pretty-printers and Python auto-loading. Furthermore,
> I think this is a good trend in general; applications are getting more
> complex, and this provides an important way to adapt the debugger to
> them.
>
> That said, I agree with your conclusions for other reasons.

If those other reasons are safety, then this is not the way to do it.
Legitimate uses of .gdbinit of many should not be precluded on behalf
of potential wrong-doing of the few. If safety is our concern, we
should make unsafe uses harder or impossible without hurting safe
uses.