Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] -iex and -ix: Execute them _after_ gdbinits
Date: Sat, 16 Jun 2012 21:14:00 -0000	[thread overview]
Message-ID: <83sjdvdkns.fsf@gnu.org> (raw)
In-Reply-To: <20120616201312.GA7000@host2.jankratochvil.net>

> Date: Sat, 16 Jun 2012 22:13:12 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: gdb-patches@sourceware.org
> 
> > > I would like to swap 1 <-> 2:
> > >  1. /etc/gdbinit, ~/.gdbinit
> > >  2. -iex and -ix
> > >  2. inferior load
> > >  3. -ex and -x etc.
> > 
> > That would make it impossible to run a command before loading
> > .gdbinit, right?
> 
> There is additionally:
> 4. load .gdbinit from the inferior's directory

My concern is about what happens before ~/.gdbinit is loaded, so
nothing that happens after that can resolve that.

> If you are in directory ~ then the .gdbinit file is considered to be
> ~/.gdbinit (and not inferior .gdbinit).
> 
> Does it answer your question?

No, see above.

> > > In practice I found I need to override 'set auto-load safe-path ...' pre-set
> > > by ~/.gdbinit for specific GDB runs by -iex.  There is no other way to do it.
> > 
> > We could invent some other way of doing that, but without taking away
> > what users can do now.
> 
> I have not found a use case where the current behavior is better.

It doesn't have to be better.  It has the advantage of being there
first.  It's the new behavior that must have a significant advantage
to justify an incompatible change of behavior.

> > > Contrary to it I cannot imagine why one would want to get -iex commands
> > > overriden by /etc/gdbinit and ~/.gdbinit.
> > 
> > Not overriden by, _executed_before_.
> 
> I also agree with "executed before" but in practice it means that if distro
> for example (Fedora does not) puts into /etc/gdbinit:
> 	set auto-load safe-path /opt:/distro-dir:/bin
> 
> Then there is no chance to use -iex 'set auto-load safe-path ...' currently.

But setting auto-load is not the only thing I can do with -iex.  I can
have any number of commands there which have nothing to do with
safe-path and stuff.

We are removing a potentially useful feature for reasons that were not
justified well enough.  Are there any reasons beyond the auto-load
issue?  If not, I submit the reasons are not grave enough for the
change, certainly not in a minor release.

And I don't see why we should pay so much attention to what Fedora
does in its GDB distribution.  For example, I always build my own GDB,
on any platform I work, and I don't see why I should be punished
because Fedora does something.


  reply	other threads:[~2012-06-16 21:14 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-16 19:54 Jan Kratochvil
2012-06-16 20:05 ` Eli Zaretskii
2012-06-16 20:13   ` Jan Kratochvil
2012-06-16 21:14     ` Eli Zaretskii [this message]
2012-06-16 21:32       ` Jan Kratochvil
2012-06-17  2:52         ` Eli Zaretskii
2012-06-17  6:50           ` Jan Kratochvil
2012-06-20 19:01             ` Jan Kratochvil
2012-06-20 19:38               ` Eli Zaretskii
2012-06-22  7:51                 ` Jan Kratochvil
2012-06-22  9:44                   ` Eli Zaretskii
2012-06-22 11:32                     ` Jan Kratochvil
2012-06-22 13:26                       ` Eli Zaretskii
2012-06-22 13:48                         ` Jan Kratochvil
2012-06-22 14:19                         ` Tom Tromey
2012-06-22 14:41                           ` Eli Zaretskii
2012-07-02 12:05                         ` [commit] " Jan Kratochvil
2012-06-22 14:18           ` Tom Tromey
2012-06-19  7:59         ` Doug Evans
2012-06-22 14:17   ` Tom Tromey
2012-06-18 16:45 ` Joel Brobecker
2012-06-22 14:17 ` Tom Tromey
2012-06-22 16:12   ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83sjdvdkns.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox