Fix gdb.ada/bp_c_mixed_case.exp (PR gdb/22670) (Re: [PATCH 3/3] Add new gdb.ada/bp_c_mixed_case testcase for PR gdb/22670)

Pedro Alves palves@redhat.com
Tue Jan 9 16:45:00 GMT 2018


On 01/09/2018 02:59 PM, Pedro Alves wrote:
> On 01/09/2018 09:46 AM, Joel Brobecker wrote:

>> What surprises me is that, before your patch, we were finding
>> no symbol at all. So we were failing the lookup both with minimal
>> symbols, and within the partial/full symtab.
> 
> Indeed, good point.  I don't know what I did not think of that.

...

>> Does this make some kind of sense to you? 
> 
> Yes it does.  I played with this a bit, and am testing a patch.
> Stay tuned.

How about this?

The main idea behind making the name matcher be determined by
the symbol's language is so that C++ (etc.) wildmatching in
linespecs works even if the current language is not C++, as e.g.,
when you step through C or assembly code.

Ada's verbatim matching syntax however ("<...>") isn't quite
the same.  It is more a property of the current language than
of a particular symbol's language.  We want to support
this syntax when debugging an Ada program, but it's reason of
existence is to find non-Ada symbols.  This suggests going back
to enabling it depending on current language instead of language
of the symbol being matched.

I'm not entirely happy with the "current_language" reference
(though I think that it's harmless).  I think we could try storing the
current language in the lookup_name_info object, and then convert
a bunch of functions more to pass around lookup_name_info objects
instead of "const char *" names.  I.e., build the lookup_name_info
higher up.  I'm not sure about that, I'll have to think more
about it.  Maybe something different will be better.  It doesn't
help that I'm not used to debugging Ada code, but the recent
testcase additions surely have helped understand better the
intended use cases.  Thanks much for those.

Meanwhile, this looks small- and safe-enough for 8.1, to me.
WDYT?

I'd extended the testcase to also exercise a no-debug-info
function, for extra coverage of the minsyms-only paths.

Thanks,
Pedro Alves
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Ada-make-verbatim-matcher-override-other-language-ma.patch
Type: text/x-patch
Size: 10770 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20180109/7240620a/attachment.bin>


More information about the Gdb-patches mailing list