aboutsummaryrefslogtreecommitdiff
path: root/gdb/source.c
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/source.c
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/source.c')
-rw-r--r--gdb/source.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/source.c b/gdb/source.c
index 2c3bf91..2c465a1 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -316,8 +316,9 @@ select_source_symtab ()
/* Make the default place to list be the function `main'
if one exists. */
- block_symbol bsym = lookup_symbol (main_name (), 0, VAR_DOMAIN, 0);
- if (bsym.symbol != nullptr && bsym.symbol->aclass () == LOC_BLOCK)
+ block_symbol bsym = lookup_symbol (main_name (), nullptr,
+ SEARCH_FUNCTION_DOMAIN, nullptr);
+ if (bsym.symbol != nullptr)
{
symtab_and_line sal = find_function_start_sal (bsym.symbol, true);
if (sal.symtab == NULL)