From 1c7d9f96cb5c91e43d6ed9fb9081b9c94d06e548 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 18 Dec 2024 17:36:09 -0700 Subject: 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 --- gdb/testsuite/gdb.python/py-symbol.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gdb/testsuite/gdb.python/py-symbol.c') diff --git a/gdb/testsuite/gdb.python/py-symbol.c b/gdb/testsuite/gdb.python/py-symbol.c index 57fce1e..b6b2cd6 100644 --- a/gdb/testsuite/gdb.python/py-symbol.c +++ b/gdb/testsuite/gdb.python/py-symbol.c @@ -44,6 +44,7 @@ extern void function_in_other_file (void); int qq = 72; /* line of qq */ static int __attribute__ ((used)) rr = 42; /* line of rr */ +static int __attribute__ ((used)) qqrr = 42; int func (int arg) { -- cgit v1.1