Files
binutils-gdb/gdb/testsuite/gdb.python/py-symbol-3.c
Tom Tromey 1c7d9f96cb Use 'flags' when expanding symtabs in gdbpy_lookup_static_symbols
This changes gdbpy_lookup_static_symbols to pass the 'flags' parameter
to expand_symtabs_matching.  This should refine the search somewhat.
Note this is "just" a performance improvement, as the loop over
symtabs already checks 'flags'.

v2 also removes 'SEARCH_GLOBAL_BLOCK' and updates py-symbol.exp to
verify that this works properly.  Thanks to Tom for this insight.

Co-Authored-By: Tom de Vries <tdevries@suse.de>
2024-12-31 13:35:38 -07:00

21 lines
876 B
C

/* This testcase is part of GDB, the GNU debugger.
Copyright 2024 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* A global 'rr' -- used for testing that lookup_static_symbols does
not find it. */
int __attribute__ ((used)) rr = 107;