From: Joel Brobecker <brobecker@adacore.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Jerome Guitton <guitton@adacore.com>,
Jan Kratochvil <jan.kratochvil@redhat.com>,
gdb-patches@sourceware.org,
Paul Hilfinger <hilfinger@adacore.com>
Subject: Re: RFA: implement ambiguous linespec proposal
Date: Wed, 09 Nov 2011 19:00:00 -0000 [thread overview]
Message-ID: <20111109185935.GQ14508@adacore.com> (raw)
In-Reply-To: <m3mxc5f9be.fsf@fleche.redhat.com>
> I think FILE:FUNCTION:LINE is a good form to provide to users, but it
> seems to me that it is incorrect to rewrite a user's "FUNCTION" linespec
> into this form. My reason is that it seems like it would do the wrong
> thing if the line number changes -- the linespec would stop working,
> rather than re-evaluate correctly. How do you deal with this problem?
Touche :-)! We do not deal with that issue. It hasn't been a real
problem so far, but it would be nice to have it solved nonetheless.
> Joel> The question is, can we use that same form for everyone? I thought
> Joel> you were going to do unconditional rewriting of the location string,
> Joel> but now I'm not so sure anymore...
>
> With my patch, only relative forms require rewriting. I think those are
> just "break LINE" and "break LABEL". The former is rewritten to
> FILE:LINE, and the latter to FUNCTION:LABEL.
OK, this makes sense.
> With multiple-symbols=ask, we also do filtering based on the "canonical
> form", which is different from the string used to re-evaluate.
>
> E.g., suppose you do "break something::method" and there are 5 methods.
> Suppose you have multiple-symbols=ask and you pick something::method(int).
> Then, we will have a breakpoint whose linespec is "something::method"
> but whose filter is "something::method(int)".
I wonder if we could start filtering based on function fully qualified
name, and profile (argument types) as well. In other words, if the user
does:
(gdb) break foo
and there are several functions named foo, then we'd have a filter
that says:
package1.foo(integer)
package2.instantiation.foo(float)
(etc). I think that might work, but I'll discuss it with Paul Hilfinger.
The only road-block I can foresee is the fact that I am unclear on
the resolution rules in Ada. I think they can get quite tricky, and
reproducing that in GDB might be a fair amount of work (if possible
at all). On the other hand, it would be nice to have that, because
we somewhat have something like that already for resolving inferior
function calls from GDB, but it's fairly primitive, and I think we
can call the wrong function sometimes (I just forgot the details).
Just curious: Are we planning on emitting a warning if re-evaluating
a breakpoint for which we no longer have a match for one of the entries
in the filter? This would happen if the user selected a function which,
after rebuilding the executable, no longer exists...
> I chose this somewhat odd design over the more straightforward
> rewriting of the linespec because there are canonical forms which are
> not yet suitable as input to linespec.
I actually like this design better. In fact, we don't even need the
filter to consist of strings. It could very well be something more
elaborate...
--
Joel
next prev parent reply other threads:[~2011-11-09 19:00 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-28 17:34 Tom Tromey
2011-10-28 20:52 ` Matt Rice
2011-11-01 20:38 ` Tom Tromey
2011-10-28 22:41 ` Jan Kratochvil
2011-11-01 20:58 ` Tom Tromey
2011-11-03 20:49 ` Tom Tromey
2011-11-04 7:46 ` Jan Kratochvil
2011-11-08 16:36 ` Tom Tromey
2011-11-09 16:05 ` Joel Brobecker
2011-11-09 17:12 ` Tom Tromey
2011-11-09 17:56 ` Joel Brobecker
2011-11-09 18:19 ` Tom Tromey
2011-11-09 19:00 ` Joel Brobecker [this message]
2011-11-14 21:04 ` Tom Tromey
2011-11-14 21:32 ` Jerome Guitton
2011-11-09 18:37 ` Tom Tromey
2011-11-14 21:11 ` Tom Tromey
2011-11-15 16:30 ` Tom Tromey
2011-11-15 16:59 ` Pierre Muller
2011-11-16 0:09 ` Jan Kratochvil
2011-11-16 1:58 ` Joel Brobecker
2011-11-16 14:46 ` Tom Tromey
2011-11-18 14:10 ` Tom Tromey
2011-11-16 21:23 ` Stan Shebs
2011-11-16 2:28 ` Yao Qi
2011-11-16 3:20 ` Doug Evans
2011-11-16 14:46 ` Tom Tromey
2011-11-16 16:06 ` Tom Tromey
2011-11-16 4:57 ` Doug Evans
2011-11-16 5:22 ` Doug Evans
2011-11-16 14:54 ` Tom Tromey
2011-11-16 16:32 ` Doug Evans
2011-11-16 16:39 ` Tom Tromey
2011-11-16 14:49 ` Tom Tromey
2011-11-16 8:15 ` Yao Qi
2011-11-16 16:17 ` Tom Tromey
2011-11-16 15:43 ` Yao Qi
2011-11-16 16:11 ` Tom Tromey
2011-11-16 16:44 ` Tom Tromey
2011-11-17 3:49 ` Yao Qi
2011-11-21 21:50 ` Tom Tromey
2011-11-23 21:33 ` 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=20111109185935.GQ14508@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=guitton@adacore.com \
--cc=hilfinger@adacore.com \
--cc=jan.kratochvil@redhat.com \
--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