From 1db66e348ac6fb5456dd76ddd700434e5cb5ba31 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Wed, 10 Feb 2021 15:07:04 +0000 Subject: 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) : New member function. * printcmd.c (info_address_command): Make use of bound_minimal_symbol::obj_section. --- gdb/breakpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/breakpoint.c') diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 5f1914e..e9aba79 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -9691,7 +9691,7 @@ resolve_sal_pc (struct symtab_and_line *sal) bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (sal->pc); if (msym.minsym) - sal->section = msym.minsym->obj_section (msym.objfile); + sal->section = msym.obj_section (); } } } -- cgit v1.1