diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2024-07-16 23:52:00 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2024-08-12 10:31:09 -0400 |
commit | c8979ae4fbcc2b84b4192d0596597c3352fa430b (patch) | |
tree | f5a24bbbe6ab8b3aee270ce5bb586933371fae93 /gdb/arm-tdep.c | |
parent | 03b40f6f55bed82bd16b2a1fd94fb8c8dbf797bf (diff) | |
download | gdb-c8979ae4fbcc2b84b4192d0596597c3352fa430b.zip gdb-c8979ae4fbcc2b84b4192d0596597c3352fa430b.tar.gz gdb-c8979ae4fbcc2b84b4192d0596597c3352fa430b.tar.bz2 |
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>
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r-- | gdb/arm-tdep.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 6278113..f3db289 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -9388,8 +9388,7 @@ arm_skip_cmse_entry (CORE_ADDR pc, const char *name, struct objfile *objfile) char *target_name = (char *) alloca (target_len); xsnprintf (target_name, target_len, "%s%s", "__acle_se_", name); - bound_minimal_symbol minsym - = lookup_minimal_symbol (target_name, NULL, objfile); + bound_minimal_symbol minsym = lookup_minimal_symbol (target_name, objfile); if (minsym.minsym != nullptr) return minsym.value_address (); @@ -9478,7 +9477,7 @@ arm_skip_stub (const frame_info_ptr &frame, CORE_ADDR pc) sec = find_pc_section (pc); objfile = (sec == NULL) ? NULL : sec->objfile; bound_minimal_symbol minsym - = lookup_minimal_symbol (target_name, NULL, objfile); + = lookup_minimal_symbol (target_name, objfile); if (minsym.minsym != NULL) return minsym.value_address (); else |