From: Pedro Alves <palves@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/3] Add gdb.ada/info_addr_mixed_case new testcase
Date: Thu, 04 Jan 2018 13:25:00 -0000 [thread overview]
Message-ID: <5c1398c0-0b8a-f480-551c-d1c2c65daed8@redhat.com> (raw)
In-Reply-To: <1515054953-81012-2-git-send-email-brobecker@adacore.com>
On 01/04/2018 08:35 AM, Joel Brobecker wrote:
> This patch adds a new testcase to demonstrate a regression introduced by:
>
> commit b5ec771e60c1a0863e51eb491c85c674097e9e13
> Date: Wed Nov 8 14:22:32 2017 +0000
> Subject: Introduce lookup_name_info and generalize Ada's FULL/WILD name matching
>
> The purpose of the testcase is to verify that a user can use any
> casing for an Ada symbol name passed to the "info address" command.
> After the patch above was applied, GDB was no longer able to find
> the symbol:
>
> (gdb) info address My_Table
> No symbol "My_Table" in current context.
The mixed-case aspect is actually a red herring here. Using
lowercase doesn't work either:
(gdb) info address my_table
No symbol "my_table" in current context.
I think the problem is instead that "info address" is doing a
symbol_name_match_type::FULL match, but the symbol's full name
is pck.my_table, which doesn't match.
If you pass the fully-qualified name, then it work, regardless
of casing:
(gdb) info address pck.My_Table
Symbol "pck.my_table" is static storage at address 0x6155e0.
(gdb) info address pck.my_table
Symbol "pck.my_table" is static storage at address 0x6155e0.
(gdb) info address Pck.My_Table
Symbol "pck.my_table" is static storage at address 0x6155e0.
Ada mode wants symbol names in expressions to be looked up
using wild matching, unlike other languages. To handle that
I had added symbol_name_match_type::EXPRESSION:
/* Expression matching. The same as FULL matching in most
languages. The same as WILD matching in Ada. */
EXPRESSION,
IIRC, this is mainly used in the completion paths.
I think we'll need to make "info address" use it too, and
possibly other commands that accept an expression as argument.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2018-01-04 13:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-04 8:36 FYI/pushed: Additional tests showing regression post C++ wild matching Joel Brobecker
2018-01-04 8:36 ` [PATCH 3/3] Add new gdb.ada/bp_c_mixed_case testcase for PR gdb/22670 Joel Brobecker
2018-01-05 16:34 ` 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
2018-01-08 3:57 ` Joel Brobecker
2018-01-08 15:00 ` Pedro Alves
2018-01-09 9:46 ` Joel Brobecker
2018-01-09 14:59 ` Pedro Alves
2018-01-09 16:45 ` Pedro Alves
2018-01-09 17:22 ` Pedro Alves
2018-01-10 3:36 ` Joel Brobecker
2018-01-10 23:41 ` Pedro Alves
2018-01-11 4:00 ` Joel Brobecker
2018-01-04 8:36 ` [PATCH 2/3] Add "complete break ada" test to gdb.ada/complete.exp Joel Brobecker
2018-01-05 16:37 ` [PATCH] Fix gdb.ada/complete.exp's "complete break ada" test (PR, gdb/22670) (Re: [PATCH 2/3] Add "complete break ada" test to gdb.ada/complete.exp) Pedro Alves
2018-01-08 4:05 ` Joel Brobecker
2018-01-04 8:36 ` [PATCH 1/3] Add gdb.ada/info_addr_mixed_case new testcase Joel Brobecker
2018-01-04 13:25 ` Pedro Alves [this message]
2018-01-04 18:33 ` Pedro Alves
2018-01-05 3:22 ` Joel Brobecker
2018-01-05 16:06 ` Pedro Alves
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=5c1398c0-0b8a-f480-551c-d1c2c65daed8@redhat.com \
--to=palves@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/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