RFA: implement ambiguous linespec proposal

Joel Brobecker brobecker@adacore.com
Wed Nov 9 17:56:00 GMT 2011


> Joel> [1]: We tried contributing it, but it was too hacky to really be part
> Joel>      of the FSF sources. The main complaint at the time was the fact
> Joel>      that it introduced a canonical form that was specific to Ada. I was
> Joel>      planning on looking at generalizing it to all languages, but never
> Joel>      got around to doing it.
> 
> Do you have a URL?  This would be a good time to resurrect it.

Sure, although I don't know if you really need to re-read the messages
or not. I think you already know quite a bit about it, and I can tell
you the rest...

    http://www.sourceware.org/ml/gdb-patches/2008-01/msg00008.html

Another message regarding the subject, this time involving Pascal:

    http://www.sourceware.org/ml/gdb-patches/2008-09/msg00379.html

> I would like to take a look... I don't know Ada, though, so I'm going to
> guess that I probably won't be able to fix it up.

And I don't really expect you to. Either I fix it up with you, or
maybe you provide a hook somewhere that I can then implement, etc.

> In terms of the proposed patch, the key question is whether rewriting
> is needed for Ada, and if so, whether it can be done uniquely.

It is needed, and that's what we do at AdaCore. That's the new
canonical form that I was mentioning in the previous messages.
I don't think it is 100% unique, but it's pretty close, and I think
it's the best we can do (we've never heard reports of problems
with that form in the 10+ years we've been using it).

The canonical form for Ada is: FILE:FUNCTION_NAME:LINE_NO. Once
written in that form, the linespec parser should always re-evaluate
it into one single logical breakpoint (with potentially multiple
locations).

The question is, can we use that same form for everyone? I thought
you were going to do unconditional rewriting of the location string,
but now I'm not so sure anymore...

-- 
Joel



More information about the Gdb-patches mailing list