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 <keiths@redhat.com>
Approved-By: Andrew Burgess <aburgess@redhat.com>
This commit is contained in:
Simon Marchi
2024-07-16 23:52:02 -04:00
committed by Simon Marchi
parent 8d2f4b7c31
commit 4144d36a68
66 changed files with 218 additions and 123 deletions

View File

@@ -623,7 +623,7 @@ avr_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end,
pc_offset += 2;
bound_minimal_symbol msymbol
= lookup_minimal_symbol ("__prologue_saves__");
= lookup_minimal_symbol (current_program_space, "__prologue_saves__");
if (!msymbol.minsym)
break;