[RFC] canonical linespec and multiple breakpoints ...

Matt Rice ratmice@gmail.com
Fri May 6 18:08:00 GMT 2011


On Thu, May 5, 2011 at 9:42 PM, Joel Brobecker <brobecker@adacore.com> wrote:
>> You have commonly system libraries debug info installed and you debug
>> some unpackaged application without debug info.  You see there
>> application function `next_line', you `break next_line' on it.
>>
>> Oops, the breakpoint is missed, it broke on libc static function
>> `next_line' and not on the application function.
>
> OK. This means that we need to have a canonical form for symbols
> without debug info as well. We actually have something for Ada
> that could be extended to all languages, I think: We use angle
> brackets to denote the fact that an entity name is a linkage
> name.  For instance:
>
>        break <my_function_linkage_name>

here's a hastily thrown together hack of the approach I was
considering when i was looking at objective-c's ambiguity problems...

basically adding a decoder_info thing (which doesn't really contain
anything useful atm)

the idea is that we return this in linespec_result, and pass it back
in on the next call to decode_line_1

in the case of objc it being non-null should be enough to
disambiguate, if its non-null we're looking for an 'exact match' of
the name, otherwise we can return ambiguous results.

it may also be nice if we want to jump directly to the specific
decoder, instead of running them all sequentially every time on
re_set...

its an update of an older patch hasn't been tested very well/looked at
in a long time but seems to pass the testsuite with only racy
differences
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.diff
Type: application/octet-stream
Size: 14123 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20110506/61bde9b4/attachment.obj>


More information about the Gdb-patches mailing list