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.
This commit is contained in:
Tom Tromey
2023-03-30 23:00:26 -06:00
parent 6c01521494
commit ccf41c2487
64 changed files with 342 additions and 312 deletions

View File

@@ -730,7 +730,7 @@ scope_operation::evaluate_funcall (struct type *expect_type,
function = cp_lookup_symbol_namespace (type->name (),
name.c_str (),
get_selected_block (0),
VAR_DOMAIN).symbol;
SEARCH_FUNCTION_DOMAIN).symbol;
if (function == NULL)
error (_("No symbol \"%s\" in namespace \"%s\"."),
name.c_str (), type->name ());
@@ -1106,7 +1106,8 @@ eval_op_func_static_var (struct type *expect_type, struct expression *exp,
{
CORE_ADDR addr = func->address ();
const block *blk = block_for_pc (addr);
struct block_symbol sym = lookup_symbol (var, blk, VAR_DOMAIN, NULL);
struct block_symbol sym = lookup_symbol (var, blk, SEARCH_VAR_DOMAIN,
nullptr);
if (sym.symbol == NULL)
error (_("No symbol \"%s\" in specified context."), var);
return evaluate_var_value (noside, sym.block, sym.symbol);