Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Pedro Alves <palves@redhat.com>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>,
	gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [commit+7.6.1] [patch] [7.6.1] Fix argv[0] symlink regression (PR 15415)
Date: Wed, 04 Sep 2013 16:31:00 -0000	[thread overview]
Message-ID: <CADPb22QtWqOhAm2g6yF42arodf2Xp9frUc=YTVw=myJK-0=FPg@mail.gmail.com> (raw)
In-Reply-To: <52271009.50805@redhat.com>

On Wed, Sep 4, 2013 at 3:48 AM, Pedro Alves <palves@redhat.com> wrote:
> It seems this patch introduces some output inconsistency
> (only tried mainline):
>
>  $ ./gdb
>  ...
>  (gdb) file ./gdb
>  Reading symbols from /home/pedro/gdb/mygit/build/gdb/gdb...done.
>  Setting up the environment for debugging gdb.
>  (top-gdb) info inferiors
>    Num  Description       Executable
>  * 1    <null>            /home/pedro/gdb/mygit/build/gdb/./gdb
>  (top-gdb)
>
> Note "gdb/gdb" vs "gdb/./gdb".
>
>  (top-gdb) file gdbserver/../gdb
>  Load new symbol table from "/home/pedro/gdb/mygit/build/gdb/gdb"? (y or n) y
>  Reading symbols from /home/pedro/gdb/mygit/build/gdb/gdb...done.
>  (top-gdb) info inferiors
>    Num  Description       Executable
>  * 1    <null>            /home/pedro/gdb/mygit/build/gdb/gdbserver/../gdb
>  (top-gdb)
>
> Note ".../gdb/gdb" vs ".../gdb/gdbserver/../gdb".
>
> I tried your new series at
> <https://sourceware.org/ml/gdb-patches/2013-08/msg00837.html>, and
> seems there's still some inconsistency:
>
>  (gdb) file ./gdb
>  Reading symbols from /home/pedro/gdb/mygit/build/gdb/./gdb...done.
>  Setting up the environment for debugging gdb.
>  (top-gdb) info inferiors
>    Num  Description       Executable
>  * 1    <null>            /home/pedro/gdb/mygit/build/gdb/./gdb
>  (top-gdb) info files
>  Symbols from "/home/pedro/gdb/mygit/build/gdb/./gdb".
>  Local exec file:
>          `/home/pedro/gdb/mygit/build/gdb/./gdb', file type elf64-x86-64.
>
> This one's consistent now, but then this one's odd:
>
>  (top-gdb) file gdbserver/../gdb
>  Load new symbol table from "/home/pedro/gdb/mygit/build/gdb/./gdb"? (y or n) y
>  Reading symbols from /home/pedro/gdb/mygit/build/gdb/./gdb...done.
>
>  (top-gdb) info inferiors
>    Num  Description       Executable
>  * 1    <null>            /home/pedro/gdb/mygit/build/gdb/gdbserver/../gdb
>  (top-gdb)
>
> Hmm.  It seems to only happen after having loaded "./gdb" first.  This
> sounds like related to the filename handling in the gdb/bfd cache?  GDB
> finds reuses the same bfd (as gdbserver/../gdb is the same file as
> the previous ./gdb), and then we printing the filename that had
> been associated with the bfd before, instead of the one that was
> specified in the second "file" ?

Hi.  Some random thoughts.

If the user wants to debug foo/bar/../baz, I don't mind gdb printing
it as foo/bar/../baz.
Other's might of course.

Removing ./ from paths is easy and reasonable enough.

If gdb is debugging a new file I would have expected the old file to
be gone from bfd's cache.
[The problem may be in the sequencing.]

We do need to be consistent with which flavor of a path we use.


  reply	other threads:[~2013-09-04 16:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-26 18:21 Jan Kratochvil
2013-08-26 20:29 ` Doug Evans
2013-08-27 14:09   ` Jan Kratochvil
2013-08-28 16:50     ` Doug Evans
2013-08-28 18:04       ` [commit+7.6.1] " Jan Kratochvil
2013-09-04 10:48         ` Pedro Alves
2013-09-04 16:31           ` Doug Evans [this message]
2013-09-04 16:55             ` Pedro Alves
2013-09-04 19:13           ` Jan Kratochvil
2013-09-04 16:46 ` Yufeng Zhang
2013-09-04 16:53   ` Jan Kratochvil
2013-09-04 17:28     ` Yufeng Zhang

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='CADPb22QtWqOhAm2g6yF42arodf2Xp9frUc=YTVw=myJK-0=FPg@mail.gmail.com' \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=palves@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