diff options
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r-- | gdb/printcmd.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 6ac0ba5..4f8c9d4 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -1219,7 +1219,9 @@ address_info (char *exp, int from_tty) if (msymbol != NULL) { - gdbarch = get_objfile_arch (msymbol_objfile (msymbol)); + struct objfile *objfile = msymbol_objfile (msymbol); + + gdbarch = get_objfile_arch (objfile); load_addr = SYMBOL_VALUE_ADDRESS (msymbol); printf_filtered ("Symbol \""); @@ -1228,7 +1230,7 @@ address_info (char *exp, int from_tty) printf_filtered ("\" is at "); fputs_filtered (paddress (gdbarch, load_addr), gdb_stdout); printf_filtered (" in a file compiled without debugging"); - section = SYMBOL_OBJ_SECTION (msymbol); + section = SYMBOL_OBJ_SECTION (objfile, msymbol); if (section_is_overlay (section)) { load_addr = overlay_unmapped_address (load_addr, section); @@ -1249,7 +1251,7 @@ address_info (char *exp, int from_tty) current_language->la_language, DMGL_ANSI); printf_filtered ("\" is "); val = SYMBOL_VALUE (sym); - section = SYMBOL_OBJ_SECTION (sym); + section = SYMBOL_OBJ_SECTION (SYMBOL_OBJFILE (sym), sym); gdbarch = get_objfile_arch (SYMBOL_SYMTAB (sym)->objfile); if (SYMBOL_COMPUTED_OPS (sym) != NULL) @@ -1354,15 +1356,15 @@ address_info (char *exp, int from_tty) case LOC_UNRESOLVED: { - struct minimal_symbol *msym; + struct bound_minimal_symbol msym; - msym = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (sym), NULL, NULL); - if (msym == NULL) + msym = lookup_minimal_symbol_and_objfile (SYMBOL_LINKAGE_NAME (sym)); + if (msym.minsym == NULL) printf_filtered ("unresolved"); else { - section = SYMBOL_OBJ_SECTION (msym); - load_addr = SYMBOL_VALUE_ADDRESS (msym); + section = SYMBOL_OBJ_SECTION (msym.objfile, msym.minsym); + load_addr = SYMBOL_VALUE_ADDRESS (msym.minsym); if (section && (section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0) |