mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 18:10:46 +00:00
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:
committed by
Simon Marchi
parent
8d2f4b7c31
commit
4144d36a68
@@ -355,7 +355,8 @@ gcc_convert_symbol (void *datum,
|
||||
}
|
||||
else if (request == GCC_C_ORACLE_SYMBOL)
|
||||
{
|
||||
bound_minimal_symbol bmsym = lookup_minimal_symbol (identifier);
|
||||
bound_minimal_symbol bmsym
|
||||
= lookup_minimal_symbol (current_program_space, identifier);
|
||||
if (bmsym.minsym != NULL)
|
||||
{
|
||||
convert_symbol_bmsym (context, bmsym);
|
||||
@@ -410,7 +411,8 @@ gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context,
|
||||
}
|
||||
else
|
||||
{
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol (identifier);
|
||||
bound_minimal_symbol msym
|
||||
= lookup_minimal_symbol (current_program_space, identifier);
|
||||
if (msym.minsym != NULL)
|
||||
{
|
||||
if (compile_debug)
|
||||
|
||||
@@ -453,7 +453,8 @@ gcc_cplus_symbol_address (void *datum, struct gcc_cp_context *gcc_context,
|
||||
}
|
||||
else
|
||||
{
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol (identifier);
|
||||
bound_minimal_symbol msym
|
||||
= lookup_minimal_symbol (current_program_space, identifier);
|
||||
if (msym.minsym != nullptr)
|
||||
{
|
||||
if (compile_debug)
|
||||
|
||||
@@ -764,7 +764,8 @@ compile_object_load (const compile_file_names &file_names,
|
||||
continue;
|
||||
}
|
||||
|
||||
bound_minimal_symbol bmsym = lookup_minimal_symbol (sym->name);
|
||||
bound_minimal_symbol bmsym
|
||||
= lookup_minimal_symbol (current_program_space, sym->name);
|
||||
switch (bmsym.minsym == NULL
|
||||
? mst_unknown : bmsym.minsym->type ())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user