summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-09-02 09:32:49 -0600
committerTom Tromey <tom@tromey.com>2024-01-28 10:58:17 -0700
commitb63eb1f39d0d0c93bebe2d6756196002ad440298 (patch)
tree022d524396a622df8d27d864397f74a60af15f05
parentb5c7440b44fe5e6c53603506b8465c1d35758678 (diff)
Only search for "main" as a function
This changes find_main_name to restrict its search to the function domain.
-rw-r--r--gdb/symtab.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 30b12d6f4eb..517e843244b 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -6435,7 +6435,8 @@ find_main_name (void)
[&symbol_found_p, pspace] (objfile *obj)
{
language lang
- = obj->lookup_global_symbol_language ("main", SEARCH_VFT,
+ = obj->lookup_global_symbol_language ("main",
+ SEARCH_FUNCTION_DOMAIN,
&symbol_found_p);
if (symbol_found_p)
{