Handle block-local names for Ada
authorTom Tromey <tromey@adacore.com>
Mon, 14 Dec 2020 15:14:06 +0000 (08:14 -0700)
committerTom Tromey <tromey@adacore.com>
Mon, 14 Dec 2020 15:14:06 +0000 (08:14 -0700)
commit86b442599bca468f997a3f1f58cba68b752ef6b2
treebbdf6c450491a0746e511eeccf9982cef12c512a
parent25a1127be7d6923904b2346ff76e7e9658620bf5
Handle block-local names for Ada

GNAT can generate a mangled name with "B_N" (where N is a number) in
the middle, like "hello__B_1__fourth.0".  This is used for names local
to a block.  Multiple levels of block-local name can also occur, a
possibility that was neglected by v1 of this patch.  This patch
changes gdb to handle these names.

The wild name matcher is updated a straightforward way.  The full
matcher is rewritten.  The hash function is updated to ensure that
this works.

This version does not seem to have the performance problems that
affected v1.  In particular, the previously-slow "bt" problem has been
fixed.

gdb/ChangeLog
2020-12-14  Tom Tromey  <tromey@adacore.com>

* dictionary.c (language_defn::search_name_hash): Ignore "B".
* ada-lang.c (advance_wild_match): Ignore "B".
(full_match): Remove.
(do_full_match): Rewrite.

gdb/testsuite/ChangeLog
2020-12-14  Tom Tromey  <tromey@adacore.com>

* gdb.ada/nested.exp: Add new tests.
* gdb.ada/nested/hello.adb (Fourth, Fifth): New procedures.
gdb/ChangeLog
gdb/ada-lang.c
gdb/dictionary.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/nested.exp
gdb/testsuite/gdb.ada/nested/hello.adb
This page took 0.026742 seconds and 4 git commands to generate.