]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Add language to type unit in debug-names-tu.exp.tcl
authorTom Tromey <tom@tromey.com>
Sun, 19 Jan 2025 22:42:51 +0000 (15:42 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 3 Mar 2025 21:16:44 +0000 (14:16 -0700)
commit268c8bda250f0b282d1fa9bdf7e5959cba018eeb
treeafd42ea3d853a2eca365eefa2237a0050fb652bf
parent50ca09324ae2132f9bb73324482e4c0f5eaeddd1
Add language to type unit in debug-names-tu.exp.tcl

I think debug-names-tu.exp.tcl only passes by accident -- the type
unit does not have a language, which gdb essentially requires.

This isn't noticeable right now because the type unit in question is
expanded in one phase and then the symbol found in another.  However,
I'm working on a series that would regress this.

This patch partially fixes the problem by correcting the test case,
adding the language to the TU.

Hoewver, it then goes a bit further and arranges for this information
not to be written to .debug_names.  Whether or not a type should be
considered "static" seems like something that is purely internal to
gdb, so this patch has the entry-creation function apply the
appropriate transform.

It also may make sense to change the "debug_names" proc in the test
suite to process attributes more like the ordinary "cu" proc does.
gdb/dwarf2/cooked-index.c
gdb/dwarf2/cooked-index.h
gdb/dwarf2/index-write.c
gdb/dwarf2/read.c
gdb/testsuite/gdb.dwarf2/debug-names-tu.exp.tcl
gdb/testsuite/lib/dwarf.exp