diff options
author | Tom Tromey <tom@tromey.com> | 2023-03-30 23:00:26 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2024-01-28 10:58:16 -0700 |
commit | ccf41c248737eb6650211481366c4e1156ce01ae (patch) | |
tree | 55933f48a150085e0df7728b4f82047977559a88 /gdb/d-exp.y | |
parent | 6c0152149476085e6c4c5c812bfc3a06fff7c938 (diff) | |
download | gdb-ccf41c248737eb6650211481366c4e1156ce01ae.zip gdb-ccf41c248737eb6650211481366c4e1156ce01ae.tar.gz gdb-ccf41c248737eb6650211481366c4e1156ce01ae.tar.bz2 |
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.
Diffstat (limited to 'gdb/d-exp.y')
-rw-r--r-- | gdb/d-exp.y | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gdb/d-exp.y b/gdb/d-exp.y index 6f7beae..620d900 100644 --- a/gdb/d-exp.y +++ b/gdb/d-exp.y @@ -444,7 +444,7 @@ PrimaryExpression: /* Handle VAR, which could be local or global. */ sym = lookup_symbol (copy.c_str (), pstate->expression_context_block, - VAR_DOMAIN, &is_a_field_of_this); + SEARCH_VFT, &is_a_field_of_this); if (sym.symbol && sym.symbol->aclass () != LOC_TYPEDEF) { if (symbol_read_needs_frame (sym.symbol)) @@ -493,7 +493,7 @@ PrimaryExpression: sym = lookup_symbol (name.c_str (), (const struct block *) NULL, - VAR_DOMAIN, NULL); + SEARCH_VFT, NULL); pstate->push_symbol (name.c_str (), sym); } else @@ -1337,7 +1337,7 @@ classify_name (struct parser_state *par_state, const struct block *block) std::string copy = copy_name (yylval.sval); - sym = lookup_symbol (copy.c_str (), block, VAR_DOMAIN, &is_a_field_of_this); + sym = lookup_symbol (copy.c_str (), block, SEARCH_VFT, &is_a_field_of_this); if (sym.symbol && sym.symbol->aclass () == LOC_TYPEDEF) { yylval.tsym.type = sym.symbol->type (); @@ -1346,9 +1346,11 @@ classify_name (struct parser_state *par_state, const struct block *block) else if (sym.symbol == NULL) { /* Look-up first for a module name, then a type. */ - sym = lookup_symbol (copy.c_str (), block, MODULE_DOMAIN, NULL); + sym = lookup_symbol (copy.c_str (), block, SEARCH_MODULE_DOMAIN, + nullptr); if (sym.symbol == NULL) - sym = lookup_symbol (copy.c_str (), block, STRUCT_DOMAIN, NULL); + sym = lookup_symbol (copy.c_str (), block, SEARCH_STRUCT_DOMAIN, + nullptr); if (sym.symbol != NULL) { |