aboutsummaryrefslogtreecommitdiff
path: root/gdb/minsyms.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2021-02-10 15:07:04 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2021-02-11 09:50:58 +0000
commit1db66e348ac6fb5456dd76ddd700434e5cb5ba31 (patch)
treedafcb5402eda5fe2fc192ba62926b8af192d0379 /gdb/minsyms.c
parent31c711a2b302cf27f2cb4d5dd2c495407b384b94 (diff)
downloadgdb-1db66e348ac6fb5456dd76ddd700434e5cb5ba31.zip
gdb-1db66e348ac6fb5456dd76ddd700434e5cb5ba31.tar.gz
gdb-1db66e348ac6fb5456dd76ddd700434e5cb5ba31.tar.bz2
gdb: add obj_section function to bound_minimal_symbol
Add a new obj_section function to bound_minimal_symbol, this just calls obj_section on the contained minimal_symbol passing in the contained objfile. This allows some minor code simplification in a few places. There should be no user visible changes after this commit. gdb/ChangeLog: * breakpoint.c (resolve_sal_pc): Make use of bound_minimal_symbol::obj_section. * maint.c (maintenance_translate_address): Likewise. * minsyms.c (minimal_symbol_upper_bound): Likewise. * minsyms.h (struct bound_minimal_symbol) <obj_section>: New member function. * printcmd.c (info_address_command): Make use of bound_minimal_symbol::obj_section.
Diffstat (limited to 'gdb/minsyms.c')
-rw-r--r--gdb/minsyms.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index 8b8e11a..3cf849f 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -1561,7 +1561,7 @@ minimal_symbol_upper_bound (struct bound_minimal_symbol minsym)
break;
}
- obj_section = minsym.minsym->obj_section (minsym.objfile);
+ obj_section = minsym.obj_section ();
if (iter != past_the_end
&& (MSYMBOL_VALUE_ADDRESS (minsym.objfile, iter)
< obj_section_endaddr (obj_section)))