When running the testsuite with target board cc-with-gdb-index I see a lot of FAILs. First one: ... (gdb) break increment^M Function "increment" not defined.^M Make breakpoint pending on future shared library load? (y or [n]) n^M (gdb) FAIL: gdb.ada/O2_float_param.exp: scenario=all: gdb_breakpoint: set breakpoint at increment ... This passes with gdb 12 branch, so this is a regression.
Bisects to commit 2cf349be0e3 ("Do not put linkage names into .gdb_index")
Also observed this with cc-with-gdb-index, may well be related to the same commit: ... FAIL: gdb.base/c-linkage-name.exp: print symada__cS before partial symtab expansion ...
The index contains: [774] callee.increment: 2 [global, function] but the debug info says: <1ab9> DW_AT_name : (indirect string, offset: 0x22a4): callee__increment Probably we need to do the ada_decode business from commit 7ab96794115.
Working on a patch.
https://sourceware.org/pipermail/gdb-patches/2022-September/192056.html
The master branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5fea97943259a2bd997f92ffa66116b5c0d4eaab commit 5fea97943259a2bd997f92ffa66116b5c0d4eaab Author: Tom Tromey <tromey@adacore.com> Date: Thu Sep 22 08:43:47 2022 -0600 Improve Ada support in .gdb_index The cooked index work changed how .gdb_index is constructed, and in the process broke .gdb_index support. This is PR symtab/29179. This patch partially fixes the problem. It arranges for Ada names to be encoded in the form expected by the index code. In particular, linkage names for Ada are emitted, including the "main" name; names are Ada-encoded; and names are no longer case-folded, something that prevented operator names from round-tripping correctly. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29179
The master branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=dd05fc7071a6517de13975fcddca861547351266 commit dd05fc7071a6517de13975fcddca861547351266 Author: Tom Tromey <tromey@adacore.com> Date: Thu Sep 22 13:10:55 2022 -0600 Change .gdb_index de-duplication implementation While investigating PR symtab/29179, I found that one Ada test failed because, although a certain symbol was present in the index, with the new DWARF reader it pointed to a different CU than was chosen by earlier versions of gdb. This patch changes how symbol de-duplication is done, deferring the process until the entire symbol table has been constructed. This way, it's possible to always choose the lower-numbered CU among duplicates, which is how gdb (implicitly) previously worked. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29179
Fixed.