aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2024-08-14 10:45:30 -0600
committerTom Tromey <tromey@adacore.com>2024-08-20 07:58:06 -0600
commita55790e99235b39582a1c3e85199f8139612f24a (patch)
tree6485d733e8157387c4a5c1a86087b80ea2b77d6e
parent60202b0cedbec7bc692e926c9943ab7e7d2504ac (diff)
downloadbinutils-a55790e99235b39582a1c3e85199f8139612f24a.zip
binutils-a55790e99235b39582a1c3e85199f8139612f24a.tar.gz
binutils-a55790e99235b39582a1c3e85199f8139612f24a.tar.bz2
Use SEARCH_FUNCTION_DOMAIN when looking for Ada exception symbols
While working on another bug, I noticed that the Ada code to find exception symbols uses SEARCH_VFT. This will find variables and types -- but only functions are needed here. This patch changes the code to use SEARCH_FUNCTION_DOMAIN. Tested on x86-64 Fedora 38, using a version of GNAT with the debuginfo installed, to ensure the exception-related tests work. Reviewed-by: Keith Seitz <keiths@redhat.com>
-rw-r--r--gdb/ada-lang.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index f293af6..7853a48 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -11679,7 +11679,8 @@ ada_has_this_exception_support (const struct exception_support_info *einfo)
that should be compiled with debugging information. As a result, we
expect to find that symbol in the symtabs. */
- sym = standard_lookup (einfo->catch_exception_sym, NULL, SEARCH_VFT);
+ sym = standard_lookup (einfo->catch_exception_sym, NULL,
+ SEARCH_FUNCTION_DOMAIN);
if (sym == NULL)
{
/* Perhaps we did not find our symbol because the Ada runtime was
@@ -11714,7 +11715,8 @@ ada_has_this_exception_support (const struct exception_support_info *einfo)
error (_("Symbol \"%s\" is not a function (class = %d)"),
sym->linkage_name (), sym->aclass ());
- sym = standard_lookup (einfo->catch_handlers_sym, NULL, SEARCH_VFT);
+ sym = standard_lookup (einfo->catch_handlers_sym, NULL,
+ SEARCH_FUNCTION_DOMAIN);
if (sym == NULL)
{
bound_minimal_symbol msym