mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-12 10:32:50 +00:00
gdb: make lookup_minimal_symbol objf and sfile parameters optional
Most calls to lookup_minimal_symbol don't pass a value for sfile and objf. Make these parameters optional (have a default value of nullptr). And since passing a value to `objf` is much more common than passing a value to `sfile`, swap the order so `objf` comes first, to avoid having to pass a nullptr value to `sfile` when wanting to pass a value to `objf`. Change-Id: I8e9cc6b942e593bec640f9dfd30f62786b0f5a27 Reviewed-by: Keith Seitz <keiths@redhat.com> Approved-By: Andrew Burgess <aburgess@redhat.com>
This commit is contained in:
committed by
Simon Marchi
parent
03b40f6f55
commit
c8979ae4fb
@@ -470,8 +470,7 @@ 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, NULL, NULL);
|
||||
bound_minimal_symbol version_msym = lookup_minimal_symbol (ver_symbol);
|
||||
if (version_msym.minsym == NULL)
|
||||
return 0;
|
||||
|
||||
@@ -810,9 +809,7 @@ static bool
|
||||
libpthread_objfile_p (objfile *obj)
|
||||
{
|
||||
return (libpthread_name_p (objfile_name (obj))
|
||||
&& lookup_minimal_symbol ("pthread_create",
|
||||
NULL,
|
||||
obj).minsym != NULL);
|
||||
&& lookup_minimal_symbol ("pthread_create", obj).minsym != nullptr);
|
||||
}
|
||||
|
||||
/* Attempt to initialize dlopen()ed libthread_db, described by INFO.
|
||||
|
||||
Reference in New Issue
Block a user