aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2024-07-16 23:52:04 -0400
committerSimon Marchi <simon.marchi@efficios.com>2024-08-12 10:38:29 -0400
commit2e7c4d0fe5b7d28af9c6ba94e76c42fe8ca08eb7 (patch)
tree82a10a850a14715d8ba64f23c6653e0d3bd530f8 /gdb/symtab.c
parent3b996cc7aee674615de57126ad4837daa4f5ac94 (diff)
downloadgdb-2e7c4d0fe5b7d28af9c6ba94e76c42fe8ca08eb7.zip
gdb-2e7c4d0fe5b7d28af9c6ba94e76c42fe8ca08eb7.tar.gz
gdb-2e7c4d0fe5b7d28af9c6ba94e76c42fe8ca08eb7.tar.bz2
gdb: add program_space parameter to lookup_minimal_symbol_linkage
Make the current_program_space reference bubble up one level. Change-Id: Ic349dc96b7d375ad7c66022d84657136f0de8c87 Reviewed-by: Keith Seitz <keiths@redhat.com> Approved-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index c77537f..9da148b 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -6775,10 +6775,12 @@ symbol::get_maybe_copied_address () const
gdb_assert (this->aclass () == LOC_STATIC);
const char *linkage_name = this->linkage_name ();
- bound_minimal_symbol minsym = lookup_minimal_symbol_linkage (linkage_name,
- false);
+ bound_minimal_symbol minsym
+ = lookup_minimal_symbol_linkage (this->objfile ()->pspace (), linkage_name,
+ false);
if (minsym.minsym != nullptr)
return minsym.value_address ();
+
return this->m_value.address;
}
@@ -6791,10 +6793,11 @@ minimal_symbol::get_maybe_copied_address (objfile *objf) const
gdb_assert ((objf->flags & OBJF_MAINLINE) == 0);
const char *linkage_name = this->linkage_name ();
- bound_minimal_symbol found = lookup_minimal_symbol_linkage (linkage_name,
- true);
+ bound_minimal_symbol found
+ = lookup_minimal_symbol_linkage (objf->pspace (), linkage_name, true);
if (found.minsym != nullptr)
return found.value_address ();
+
return (this->m_value.address
+ objf->section_offsets[this->section_index ()]);
}