aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2024-12-18 17:36:09 -0700
committerTom Tromey <tom@tromey.com>2024-12-31 13:35:38 -0700
commit1c7d9f96cb5c91e43d6ed9fb9081b9c94d06e548 (patch)
tree73d1e97104e50d10596a8ed7b4f445ea2d9c462b /gdb/python
parent0f68254da9cead7aa6dde90e3a17cc9e385ae711 (diff)
downloadgdb-1c7d9f96cb5c91e43d6ed9fb9081b9c94d06e548.zip
gdb-1c7d9f96cb5c91e43d6ed9fb9081b9c94d06e548.tar.gz
gdb-1c7d9f96cb5c91e43d6ed9fb9081b9c94d06e548.tar.bz2
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>
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-symbol.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c
index 8648a50..f1ba0ba 100644
--- a/gdb/python/py-symbol.c
+++ b/gdb/python/py-symbol.c
@@ -610,8 +610,7 @@ gdbpy_lookup_static_symbols (PyObject *self, PyObject *args, PyObject *kw)
/* Expand any symtabs that contain potentially matching symbols. */
lookup_name_info lookup_name (name, symbol_name_match_type::FULL);
expand_symtabs_matching (NULL, lookup_name, NULL, NULL,
- SEARCH_GLOBAL_BLOCK | SEARCH_STATIC_BLOCK,
- SEARCH_ALL_DOMAINS);
+ SEARCH_STATIC_BLOCK, flags);
for (objfile *objfile : current_program_space->objfiles ())
{