From: Pedro Alves <pedro@codesourcery.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb@sourceware.org
Subject: Re: some questions about ranged breakpoints
Date: Tue, 11 Oct 2011 15:22:00 -0000 [thread overview]
Message-ID: <201110111621.53167.pedro@codesourcery.com> (raw)
In-Reply-To: <m3ty7fa8gi.fsf@fleche.redhat.com>
On Tuesday 11 October 2011 15:50:21, Tom Tromey wrote:
> >>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
>
> Tom> What should actually happen here?
>
> Pedro> I think we should remove the assertion, and have each location map to a
> Pedro> hardware accelerated ranged breakpoint, instead of assuming there can
> Pedro> be only one. This isn't much different from creating a regular
> Pedro> (non-range) hardware breakpoint that ends up mapping to more than
> Pedro> one location.
>
> Ok, that makes sense, but unfortunately I think it yields other weird
> behavior. The problem is that you must somehow pair start and end
> locations; you might even see more of one than the other.
Gross, you're right.
> I thought that pairing could perhaps be done by sorting the addresses
> and, for each address in the first list, choose the nearest greater
> address from the second list. However, my worry with any heuristic like
> this is that a re-set could cause the breakpoint to change in an
> unforseen way, yielding wrong results for the user.
>
> Also the parsing is a pain when you have multiple matches.
> Consider the difference between a relative linespec (break-range
> file.c:73, +5) and an absolute one (break-range file.c:73, file.c:78).
> We don't know before parsing whether a linespec is relative.
> So, I think we have to reparse the second linespec in the context of
> each result from the first linespec, then eliminate dups... gross, but I
> guess doable.
Hmm, that's sounding too complicated and hard to both explain
and understand, and probably ends up not being useful...
I'm liking your "deactivate if resetting introduces ambiguity"
idea more.
I think we'll still need to handle multiple locations though,
though I'm not familiar with your code enough to be know how to
express it in a way that makes the ambiguity a different kind
of ambiguity (or if it's expressable even) from the inline cases.
E.g., if you're debugging two inferiors, "file.c:73, +5", may mean
different addresses for each inferior, just because they loaded the
code at different addresses. But for each inferior, or
each objfile, "file.c:73, +5" was not ambiguous, so I'd
expect to end with two range locations, one for each
inferior or objfile.
--
Pedro Alves
prev parent reply other threads:[~2011-10-11 15:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-10 20:04 Tom Tromey
2011-10-11 10:11 ` Pedro Alves
2011-10-11 14:50 ` Tom Tromey
2011-10-11 15:22 ` Pedro Alves [this message]
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=201110111621.53167.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb@sourceware.org \
--cc=tromey@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