From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: Pedro Alves <palves@redhat.com>, Tom Tromey <tom@tromey.com>,
Pedro Alves via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH v2 3/3] Make exec-file-mismatch compare build IDs
Date: Thu, 21 May 2020 15:32:09 +0200 [thread overview]
Message-ID: <4719db5fbbd5f3b4026bf4b7637ce922d24e8c6b.camel@skynet.be> (raw)
In-Reply-To: <6d669d00-236a-cede-5c5e-3d65d3ee5a53@redhat.com>
On Tue, 2020-05-19 at 18:44 +0100, Pedro Alves wrote:
> On 5/19/20 5:04 PM, Tom Tromey wrote:
> > > > > > > "Pedro" == Pedro Alves via Gdb-patches <gdb-patches@sourceware.org> writes:
> >
> > Pedro> On 5/17/20 7:04 PM, Pedro Alves via Gdb-patches wrote:
> > > > The patch makes GDB first try exec-file-mismatch validation via build
> > > > IDs, and then if that isn't possible, fallback to validating using the
> > > > old method of comparing filenames. I'd argue that we should remove
> > > > the filename validation for causing too many false positives, though.
> >
> > Agreed.
> >
> > Pedro> Here's an updated version that removes the filename comparison.
> > Pedro> I've kept the structure of the code the same, in case we
> > Pedro> add some form of fallback later on.
> >
> > It makes sense to me.
> > I read these patches and they look good to me.
>
> Thanks all for the reviews and discussions. I've merged this now.
Comparing build-id introduced a change of behaviour when GDB has
loaded a file, and the user recompiles this file followed by an attach.
Before this patch, when GDB had a file loaded and the user recompiled
the file and attached to a process using this recompiled file,
GDB used to reload the file automatically.
Now, GDB reports a mismatch, indicating a "mismatch"
instead of automatically re-loading the new file version.
Technically, GDB mismatch is correct, but I am wondering if this change
of behaviour is desirable. At least, it introduces a difference
of behaviour between run (that will just indicate the file has changed
and reload automatically) and attach (that will warn and ask).
(gdb) atta 10615
Attaching to program: /bd/home/philippe/gdb/git/build_moreaa/gdb/gdb, process 10615
[New LWP 10616]
[New LWP 10617]
[New LWP 10618]
[New LWP 10620]
[New LWP 10621]
[New LWP 10622]
[New LWP 10623]
warning: Mismatch between current exec-file /bd/home/philippe/gdb/git/build_moreaa/gdb/gdb
and automatically determined exec-file /bd/home/philippe/gdb/git/build_moreaa/gdb/gdb
exec-file-mismatch handling is currently "ask"
Load new symbol table from "/bd/home/philippe/gdb/git/build_moreaa/gdb/gdb"? (y or n)
while previously, GDB was doing:
(gdb) atta 14099
Attaching to program: /bd/home/philippe/gdb/git/build_moreaa/gdb/gdb, process 14099
[New LWP 14100]
[New LWP 14101]
[New LWP 14102]
[New LWP 14104]
[New LWP 14105]
[New LWP 14106]
[New LWP 14107]
`/bd/home/philippe/gdb/git/build_moreaa/gdb/gdb' has changed; re-reading symbols.
Philippe
next prev parent reply other threads:[~2020-05-21 13:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-17 18:04 [PATCH 0/3] " Pedro Alves
2020-05-17 18:04 ` [PATCH 1/3] Default gdb_bfd_open's fd parameter to -1 Pedro Alves
2020-05-17 18:04 ` [PATCH 2/3] Eliminate target_fileio_open_warn_if_slow Pedro Alves
2020-05-17 18:04 ` [PATCH 3/3] Make exec-file-mismatch compare build IDs Pedro Alves
2020-05-17 18:25 ` Eli Zaretskii
2020-05-18 13:52 ` Pedro Alves
2020-05-18 13:55 ` [PATCH v2 " Pedro Alves
2020-05-18 14:21 ` Philippe Waroquiers
2020-05-19 15:43 ` Pedro Alves
2020-05-19 16:04 ` Tom Tromey
2020-05-19 17:44 ` Pedro Alves
2020-05-21 13:32 ` Philippe Waroquiers [this message]
2020-05-21 14:02 ` Pedro Alves
2020-05-21 14:23 ` Philippe Waroquiers
2020-05-21 14:27 ` Pedro Alves
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=4719db5fbbd5f3b4026bf4b7637ce922d24e8c6b.camel@skynet.be \
--to=philippe.waroquiers@skynet.be \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=tom@tromey.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).