From ccf41c248737eb6650211481366c4e1156ce01ae Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 30 Mar 2023 23:00:26 -0600 Subject: Use domain_search_flags in lookup_symbol et al This changes lookup_symbol and associated APIs to accept domain_search_flags rather than a domain_enum. Note that this introduces some new constants to Python and Guile. I chose to break out the documentation patch for this, because the internals here do not change until a later patch, and it seemed simpler to patch the docs just once, rather than twice. --- gdb/ada-lang.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'gdb/ada-lang.c') diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index a1fac3e..a15ea7b 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -13675,19 +13675,15 @@ public: struct block_symbol lookup_symbol_nonlocal (const char *name, const struct block *block, - const domain_enum domain) const override + const domain_search_flags domain) const override { struct block_symbol sym; - domain_search_flags flags = to_search_flags (domain); - if (domain == VAR_DOMAIN) - flags |= SEARCH_TYPE_DOMAIN | SEARCH_FUNCTION_DOMAIN; - sym = ada_lookup_symbol (name, (block == nullptr ? nullptr : block->static_block ()), - flags); + domain); if (sym.symbol != NULL) return sym; @@ -13703,7 +13699,7 @@ public: languages, we search the primitive types this late and only after having searched the global symbols without success. */ - if (domain == VAR_DOMAIN) + if ((domain & SEARCH_TYPE_DOMAIN) != 0) { struct gdbarch *gdbarch; -- cgit v1.1