mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 01:07:52 +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
@@ -470,7 +470,8 @@ inferior_has_bug (const char *ver_symbol, int ver_major_min, int ver_minor_min)
|
||||
CORE_ADDR version_addr;
|
||||
int got, retval = 0;
|
||||
|
||||
bound_minimal_symbol version_msym = lookup_minimal_symbol (ver_symbol);
|
||||
bound_minimal_symbol version_msym
|
||||
= lookup_minimal_symbol (current_program_space, ver_symbol);
|
||||
if (version_msym.minsym == NULL)
|
||||
return 0;
|
||||
|
||||
@@ -809,7 +810,8 @@ static bool
|
||||
libpthread_objfile_p (objfile *obj)
|
||||
{
|
||||
return (libpthread_name_p (objfile_name (obj))
|
||||
&& lookup_minimal_symbol ("pthread_create", obj).minsym != nullptr);
|
||||
&& lookup_minimal_symbol (current_program_space,
|
||||
"pthread_create", obj).minsym != nullptr);
|
||||
}
|
||||
|
||||
/* Attempt to initialize dlopen()ed libthread_db, described by INFO.
|
||||
|
||||
Reference in New Issue
Block a user