With the patches for bug#16998, there are some fails: FAIL: gdb.cp/anon-struct.exp: print type of t::t FAIL: gdb.cp/anon-struct.exp: print type of X::t2::t2 FAIL: gdb.cp/anon-struct.exp: print type of t3::~t3 These symbols aren't added to the index. This is hard or maybe impossible to observe right now, because something like "print t::t" will first look up "t", causing CU expansion.
It's a bit of an oddity that fn_field doesn't just hold a pointer to the symbol.
The master branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e7605fe0c0f7fa14dff86373f2baae2d56da1d30 commit e7605fe0c0f7fa14dff86373f2baae2d56da1d30 Author: Tom Tromey <tom@tromey.com> Date: Sat Jan 18 18:15:21 2025 -0700 Entries from anon-struct.exp not in cooked index g++ will sometimes use a typedef to give a name to an otherwise anonymous type for linkage purposes. gdb tries to handle this odd scenario, which is enforced by anon-struct.exp. It's difficult to detect this problem in the current tree, but the cooked index does not include an entry for these DIEs. This patch changes gdb to add these to the index. This is needed by subsequent changes in this series. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32519 Acked-By: Simon Marchi <simon.marchi@efficios.com>
Fixed.