aboutsummaryrefslogtreecommitdiff
path: root/gdb/go-exp.y
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-03-30 23:00:26 -0600
committerTom Tromey <tom@tromey.com>2024-01-28 10:58:16 -0700
commitccf41c248737eb6650211481366c4e1156ce01ae (patch)
tree55933f48a150085e0df7728b4f82047977559a88 /gdb/go-exp.y
parent6c0152149476085e6c4c5c812bfc3a06fff7c938 (diff)
downloadgdb-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/go-exp.y')
-rw-r--r--gdb/go-exp.y9
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/go-exp.y b/gdb/go-exp.y
index 0b17ea4..a3afbbb 100644
--- a/gdb/go-exp.y
+++ b/gdb/go-exp.y
@@ -1293,7 +1293,8 @@ package_name_p (const char *name, const struct block *block)
struct symbol *sym;
struct field_of_this_result is_a_field_of_this;
- sym = lookup_symbol (name, block, STRUCT_DOMAIN, &is_a_field_of_this).symbol;
+ sym = lookup_symbol (name, block, SEARCH_STRUCT_DOMAIN,
+ &is_a_field_of_this).symbol;
if (sym
&& sym->aclass () == LOC_TYPEDEF
@@ -1335,7 +1336,7 @@ classify_packaged_name (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)
{
@@ -1378,7 +1379,7 @@ classify_name (struct parser_state *par_state, const struct block *block)
/* TODO: What about other types? */
- 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)
{
@@ -1403,7 +1404,7 @@ classify_name (struct parser_state *par_state, const struct block *block)
strlen (current_package_name.get ()),
copy.c_str (), copy.size ());
- sym = lookup_symbol (sval.ptr, block, VAR_DOMAIN,
+ sym = lookup_symbol (sval.ptr, block, SEARCH_VFT,
&is_a_field_of_this);
if (sym.symbol)
{