If you hack a "clean_restart" call into gdb.cp/paramless.exp, just before the "break outer::fn" test, this will cause a failure. I suspect this is caused by the inconsistent treatment of template parameters when matching: cp_fq_symbol_name_matches passes false to strncmp_iw_with_mode but cp_symbol_name_matches passes true. If you force CU expansion here with "break main" first, it will pass again.
The master branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6a739b5551261f53774c2773a912668c14d991f9 commit 6a739b5551261f53774c2773a912668c14d991f9 Author: Tom Tromey <tom@tromey.com> Date: Wed Jan 1 14:34:10 2025 -0700 Inconsistent treatment of template parameters in DWARF reader I noticed that if you hack some clean_restart calls into paramless.exp, the test will fail. That is, the test currently relies on the desired CUs already being expanded when trying to set a breakpoint -- which is clearly a bug, the CU expansion state should not affect "break". I tracked this down to incorrect construction of a lookup_name_info in cooked_index_functions::expand_symtabs_matching. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32510 Approved-By: Simon Marchi <simon.marchi@efficios.com>
Fixed.