From 4144d36a68bda0f20c02e6a4444052b44a462155 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Tue, 16 Jul 2024 23:52:02 -0400 Subject: gdb: add program_space parameter to lookup_minimal_symbol >From what I can see, lookup_minimal_symbol doesn't have any dependencies on the global current state other than the single reference to current_program_space. Add a program_space parameter and make that current_program_space reference bubble up one level. Change-Id: I759415e2f9c74c9627a2fe05bd44eb4147eee6fe Reviewed-by: Keith Seitz Approved-By: Andrew Burgess --- gdb/ada-lang.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gdb/ada-lang.c') diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 972c756..f293af6 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -806,7 +806,8 @@ ada_main_name () that string, then most probably the main procedure is not written in Ada. */ bound_minimal_symbol msym - = lookup_minimal_symbol (ADA_MAIN_PROGRAM_SYMBOL_NAME); + = lookup_minimal_symbol (current_program_space, + ADA_MAIN_PROGRAM_SYMBOL_NAME); if (msym.minsym != NULL) { @@ -11696,7 +11697,8 @@ ada_has_this_exception_support (const struct exception_support_info *einfo) the catchpoint message, and is also used when trying to catch a specific exception). We do not handle this case for now. */ bound_minimal_symbol msym - = lookup_minimal_symbol (einfo->catch_exception_sym); + = lookup_minimal_symbol (current_program_space, + einfo->catch_exception_sym); if (msym.minsym && msym.minsym->type () != mst_solib_trampoline) error (_("Your Ada runtime appears to be missing some debugging " @@ -11716,7 +11718,8 @@ ada_has_this_exception_support (const struct exception_support_info *einfo) if (sym == NULL) { bound_minimal_symbol msym - = lookup_minimal_symbol (einfo->catch_handlers_sym); + = lookup_minimal_symbol (current_program_space, + einfo->catch_handlers_sym); if (msym.minsym && msym.minsym->type () != mst_solib_trampoline) error (_("Your Ada runtime appears to be missing some debugging " -- cgit v1.1