From: Tom Tromey <tromey@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] canonical linespec and multiple breakpoints ...
Date: Tue, 05 Jul 2011 19:53:00 -0000 [thread overview]
Message-ID: <m3wrfwsdyv.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20110704192005.GQ2407@adacore.com> (Joel Brobecker's message of "Mon, 4 Jul 2011 12:20:05 -0700")
Joel> I think that this is a good general rule, and something we should
Joel> encourage our users to use. But it seems that it does not cover
Joel> the case where 'set multiple-symbols ask' is in use, does it?
Joel> My understanding, when `ask' is that, if the user selects `all',
Joel> then we're in the case above (fire at all locations, add new locations
Joel> as we discover them), but if the user selects a sub-sets of the
Joel> potential matches, what should we do?
Joel> My suggestion, in that case, is to make the list of selected
Joel> locations static. In other words, we do not add new locations
Joel> as they get discovered.
This was part of the proposal but I think it should have been more
prominent.
My proposal was that in 'ask' mode, 'break' makes a separate
canonicalized breakpoint for each location the user requests.
I had proposed making the 'all' choice make N different breakpoints,
each "static". But now I think that 'all' should mean "make a dynamic
breakpoint covering all locations", and the user can create separate
static breakpoints by entering "2-57" (e.g.) at the prompt. This gives
the user a way to achieve multiple-symbols=all behavior without having
to temporarily change the setting.
I think we must specify what "static" means -- by specifying the
canonicalization algorithm. When I consider the difference between your
proposal and Jerome's, I think the distinction largely relies on what
exactly it means to canonicalize a location.
FWIW I would be satisfied with any of several possible solutions
(including yours and Jerome's) to the multiple-symbols=ask scenario.
Joel> The typical scenario is when we have multiple instantiations of
Joel> a given generic, and the user is only interested in debugging
Joel> one, or at least a small subset. In that case, a typical user
Joel> debugging using a GUI or an IDE will click on the code, which
Joel> is often translated into a FILE:LINE linespec.
Do IDEs actually run in multiple-symbols = ask mode?
My understanding was that these interactive prompts caused headaches for
MI users.
Tom> In order to properly re-set breakpoints, we need a canonical form of the
Tom> linespec. Currently this is done by constructing a new canonicalized
Tom> linespec. In my proposal we will replace this with a structure, the
Tom> better to add more precise behavior without needing to construct
Tom> linespec syntax for every possible case. E.g., we can have a bit
Tom> indicating whether this canonical linespec matches symbols without
Tom> debuginfo.
Joel> I think it's important to have some kind of canonical form that
Joel> the user's can use as the linespec as well. That way, they can
Joel> enter a linespec that, in the vast majority of cases, is not
Joel> ambiguous. For our purposes, FILE:FUNCTION:LINE has worked really
Joel> well...
When I wrote this I was specifically thinking of the situation where a
breakpoint has some matches with debuginfo and some without. I didn't
see much value in having a linespec covering the "functions named X
without debuginfo" case.
FILE:FUNCTION:LINE makes sense to me, I think it would be useful for C++
templates as well.
Tom> 4. Set a pending breakpoint.
Tom> (gdb) break lib_function
Tom> 5. The same, but the pending name is ambiguous.
Tom> These both make a pending breakpoint; inferior changes may cause
Tom> locations to be added or removed.
Joel> So, pending breakpoints are implicitly treated as breakpoints
Joel> with multiple-symbols set to `all', right? I think that'd be fair.
Yes.
Tom
next prev parent reply other threads:[~2011-07-05 19:52 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-05 16:29 Joel Brobecker
2011-05-05 20:50 ` Tom Tromey
2011-05-05 22:40 ` Joel Brobecker
2011-05-06 3:20 ` Jan Kratochvil
2011-05-06 4:42 ` Joel Brobecker
2011-05-06 18:08 ` Matt Rice
2011-05-06 7:16 ` Eli Zaretskii
2011-05-06 19:18 ` Tom Tromey
2011-05-06 7:10 ` Eli Zaretskii
2011-05-26 21:06 ` Tom Tromey
2011-05-27 7:56 ` Eli Zaretskii
2011-06-30 21:35 ` Tom Tromey
2011-07-01 18:06 ` Tom Tromey
2011-07-02 6:35 ` Eli Zaretskii
2011-07-05 19:52 ` Tom Tromey
2011-07-05 21:07 ` Eli Zaretskii
2011-07-05 21:46 ` Tom Tromey
2011-07-04 19:32 ` Joel Brobecker
2011-07-05 9:20 ` Jerome Guitton
2011-07-05 15:24 ` Joel Brobecker
2011-07-05 19:53 ` Tom Tromey [this message]
2011-07-26 21:06 ` Tom Tromey
2011-07-27 15:10 ` Matt Rice
2011-07-27 16:23 ` Jan Kratochvil
2011-07-28 15:18 ` Matt Rice
2011-08-02 15:33 ` Pedro Alves
2011-08-02 17:09 ` Tom Tromey
2011-08-02 18:00 ` Pedro Alves
2011-11-18 19:31 ` Tom Tromey
2012-02-16 23:31 ` Tom Tromey
2011-07-02 6:15 ` Eli Zaretskii
2011-07-05 20:00 ` Tom Tromey
2011-05-27 10:50 ` Matt Rice
2011-05-29 13:01 ` Matt Rice
2011-07-05 20:01 ` Tom Tromey
2011-07-06 2:32 ` Matt Rice
2011-09-18 13:47 Avi Gozlan
2011-10-03 16:28 ` Tom Tromey
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=m3wrfwsdyv.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=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