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/value.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gdb/value.c') diff --git a/gdb/value.c b/gdb/value.c index 4ec9bab..ccaef9f 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -2922,7 +2922,8 @@ value_static_field (struct type *type, int fieldno) { const char *phys_name = type->field (fieldno).loc_physname (); /* type->field (fieldno).name (); */ - struct block_symbol sym = lookup_symbol (phys_name, 0, VAR_DOMAIN, 0); + struct block_symbol sym = lookup_symbol (phys_name, nullptr, + SEARCH_VAR_DOMAIN, nullptr); if (sym.symbol == NULL) { @@ -3113,7 +3114,8 @@ value_fn_field (struct value **arg1p, struct fn_field *f, struct symbol *sym; struct bound_minimal_symbol msym; - sym = lookup_symbol (physname, 0, VAR_DOMAIN, 0).symbol; + sym = lookup_symbol (physname, nullptr, SEARCH_FUNCTION_DOMAIN, + nullptr).symbol; if (sym == nullptr) { msym = lookup_bound_minimal_symbol (physname); -- cgit v1.1