From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFA] unexpected multiple location for breakpoint
Date: Fri, 10 Dec 2010 12:23:00 -0000 [thread overview]
Message-ID: <20101210122337.GC2596@adacore.com> (raw)
In-Reply-To: <20101127183532.GA10136@caradoc.them.org>
[sorry for the delay]
Thanks, everyone, for participating in the discussion! Hey Daniel,
always good to read from you :-).
> On Fri, Nov 26, 2010 at 09:29:42AM -0800, Joel Brobecker wrote:
> > However, I wonder if that makes any difference at all in our case:
> > If we have a "contained-in" relationship between two entries, then
> > the first of the two entries necessarily has a lower PC than the
> > second one.
>
> I don't think that's right. This is a lexical relationship; it
> doesn't imply any relationship at the PC level. But I'm not sure it's
> what you meant, either, since this:
>
> > The one scenario that Doug and I identified which my patch probably
> > does not handle well is the following case:
> >
> >
> > block1:
> > block2:
> > .line N
> > end block2
> > .line N
> > end block1
>
> illustrates a counter-example.
>
> I'm a bit confused, though; what sort of example produces this
> structure? Are single-line blocks involved (e.g. "if (a) { x; }" all
> on one line)?
The example above is purely hypothetical. I think it might happen
perhaps because of code re-ordering because of optimization.
> I would prefer GDB not make any decisions based on "lowest address";
> between inlining, basic block reordering, et cetera, it doesn't mean
> much.
So, if I understand you well, you suggest that we rework a bit the
"contained-in" elimination loop to avoid lowest-address assumptions.
If 2 different PCs are inside the same block, then keep the lowest
address. If PC1 is in BLOCK1 and PC2 in BLOCK2, and BLOCK2 is contained
in BLOCK1, then PC2 should be discarded, even if PC2 > PC1. (and
if the blocks are distinct, then keep both PCs).
--
Joel
next prev parent reply other threads:[~2010-12-10 12:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-23 1:10 Joel Brobecker
2010-11-26 17:29 ` Joel Brobecker
2010-11-27 18:35 ` Daniel Jacobowitz
2010-12-10 12:23 ` Joel Brobecker [this message]
2010-12-28 11:50 ` Joel Brobecker
2010-12-28 20:15 ` Eli Zaretskii
2010-12-29 6:08 ` Joel Brobecker
2010-12-29 8:08 ` Joel Brobecker
2010-12-29 19:30 ` Eli Zaretskii
2010-12-30 20:40 ` Joel Brobecker
2010-12-30 21:03 ` Eli Zaretskii
2010-12-31 6:35 ` Michael Snyder
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=20101210122337.GC2596@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/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