mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-05 23:23:09 +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
@@ -323,7 +323,7 @@ get_bitsize (ctf_dict_t *fp, ctf_id_t tid, uint32_t kind)
|
||||
static void
|
||||
set_symbol_address (struct objfile *of, struct symbol *sym, const char *name)
|
||||
{
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol (name, nullptr, of);
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol (name, of);
|
||||
if (msym.minsym != NULL)
|
||||
{
|
||||
sym->set_value_address (msym.value_address ());
|
||||
|
||||
Reference in New Issue
Block a user