This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/3] Add gdb.ada/info_addr_mixed_case new testcase
> Turns out that the Ada symbol lookup machinery is sufficiently decoupled
> from "regular" lookup that the problem is elsewhere.
> While we may still want to consider migrating that hack towards
> symbol_name_match_type::EXPRESSION, things should still work in
> principle without doing that, AFAICT.
>
> Whether to do a full or wild match is decided based on the lookup name
> string (see name_match_type_from_name). That was introduced basically
> as a refactor of preexisting code, IIRC.
>
> I traced the problem to the verbatim-wrapping hack in
> ada_lookup_encoded_symbol.
>
> See the attached patch. It fixes gdb.ada/info_addr_mixed_case,
> and introduces no regressions for me. WDYT?
Nice!
> gdb/ChangeLog:
> yyyy-mm-dd Pedro Alves <palves@redhat.com>
>
> PR gdb/22670
> * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
> ada_lookup_symbol.
> (ada_lookup_symbol): Reimplement in terms of
> ada_lookup_symbol_list, bits factored out from
> ada_lookup_encoded_symbol.
>
> gdb/testsuite/ChangeLog:
> yyyy-mm-dd Pedro Alves <palves@redhat.com>
>
> PR gdb/22670
> * gdb.ada/info_addr_mixed_case.exp: Remove kfail. Extend test to
> exercise lower case too, and to exercise both full matching and
> wild matching.
Patch looks good to me. Intuitively, it looks like a more logical
way to perform things too. And with the new SEARCH_SYMBOL searching
mechanism coming, I can see us being able later to to avoid the "<...>"
wrapping too.
Just in case, I tested that patch against our testsuite, and I can
confirm it fixes the issue without introducing regressions :).
Thanks for having looked into this, Pedro. I will focus my attention
on creating the branch, do a review or two, and then continue analyzing
my testsuite report.
--
Joel