From f1f6aadf8c572a21149a59d65adc49f2df5feeb6 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Wed, 20 Aug 2008 11:21:44 +0000 Subject: * objfiles.h (struct obj_section): Remove addr and endaddr fields. (obj_section_offset, obj_section_addr, obj_section_endaddr): New macros. * objfiles.c (add_to_objfile_sections): Don't set addr, endaddr and offset. Use size_t instead of unsigned long. (build_objfile_section_table): Use size_t instead of unsigned long. (objfile_relocate): Don't relocate s->addr and s->endaddr, they're gone. (find_pc_sect_section): Use obj_section_addr and obj_section_endaddr. * symfile.c (symfile.c): Remove code that maps sections offsets in "addr" to the object's sections. * blockframe.c (find_pc_partial_function): Use obj_section_endaddr. * gcore.c (gcore_create_callback): Use obj_section_addr and obj_section_endaddr. * maint.c (print_objfile_section_info): Likewise. * printcmd.c (sym_info): Use obj_section_addr and obj_section_endaddr. * symtab.c (fixup_section): Likewise. --- gdb/printcmd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gdb/printcmd.c') diff --git a/gdb/printcmd.c b/gdb/printcmd.c index e25c73c..cb280e0 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -995,8 +995,9 @@ sym_info (char *arg, int from_tty) sect = osect->the_bfd_section; sect_addr = overlay_mapped_address (addr, sect); - if (osect->addr <= sect_addr && sect_addr < osect->endaddr && - (msymbol = lookup_minimal_symbol_by_pc_section (sect_addr, sect))) + if (obj_section_addr (osect) <= sect_addr + && sect_addr < obj_section_endaddr (osect) + && (msymbol = lookup_minimal_symbol_by_pc_section (sect_addr, sect))) { matches = 1; offset = sect_addr - SYMBOL_VALUE_ADDRESS (msymbol); -- cgit v1.1