]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Add support for hierarchical Ada names
authorTom Tromey <tromey@adacore.com>
Fri, 6 Sep 2024 20:38:44 +0000 (14:38 -0600)
committerTom Tromey <tromey@adacore.com>
Thu, 6 Mar 2025 21:17:18 +0000 (14:17 -0700)
commitaa24bf2c05f80eb106189d55469cd393f752fa92
treed04ed14187d1ccc6147d0fe08a73f31e8cf49d83
parentaab26529b304aed62095e47248a6b5e1c7590fdc
Add support for hierarchical Ada names

In the near future, GNAT will start emitting DWARF names in a more
standard way -- specifically, the package structure will be indicated
by nested DW_TAG_module DIEs and a given entity will be nested in its
package and only have a simple name.

This patch changes gdb to understand this style of naming, while still
supporting the existing GNAT output.

A few special cases are needed.  I've commented them.

The name-computing code for the full DWARF reader is very complicated
-- much too complicated, in my opinion.  There are already several
bugs in bugzilla about this (search for "physname"... but there are
others as well), so I haven't filed any new ones.

When I started this project, I thought it would solve some memory
overuse issues we sometimes see from how the index-sharding code
interacts with the GNAT-specific post-pass.  However, to my surprise,
the Ada code in gdb relies on some details of symbol naming, and so
I've had to add code here to synthesize "linkage" names in some cases.
This is unfortunate, but I think can eventually be fixed; I will file
a bug to track this issue.
gdb/dwarf2/cooked-index.c
gdb/dwarf2/read.c