X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Ftui%2Ftui-disasm.c;h=8c48d66158fbc44e41d26547780351233813fdb7;hb=8009206ae2dec541b55edc488103c6c1ccb1416a;hp=25775748f293a951eb1741b8ca3d52ff27d4bf7c;hpb=0e9f083f4cb94a9dc861f38ba151aac06efce2b8;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c index 25775748f2..8c48d66158 100644 --- a/gdb/tui/tui-disasm.c +++ b/gdb/tui/tui-disasm.c @@ -1,6 +1,6 @@ /* Disassembly display. - Copyright (C) 1998-2013 Free Software Foundation, Inc. + Copyright (C) 1998-2014 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. @@ -37,6 +37,7 @@ #include "tui/tui-file.h" #include "tui/tui-disasm.h" #include "progspace.h" +#include "objfiles.h" #include "gdb_curses.h" @@ -113,7 +114,7 @@ tui_find_disassembly_address (struct gdbarch *gdbarch, CORE_ADDR pc, int from) { CORE_ADDR last_addr; int pos; - struct minimal_symbol *msymbol; + struct bound_minimal_symbol msymbol; /* Find backward an address which is a symbol and for which disassembling from that address will fill completely the @@ -121,16 +122,16 @@ tui_find_disassembly_address (struct gdbarch *gdbarch, CORE_ADDR pc, int from) pos = max_lines - 1; do { new_low -= 1 * max_lines; - msymbol = lookup_minimal_symbol_by_pc_section (new_low, 0).minsym; + msymbol = lookup_minimal_symbol_by_pc_section (new_low, 0); - if (msymbol) - new_low = SYMBOL_VALUE_ADDRESS (msymbol); + if (msymbol.minsym) + new_low = BMSYMBOL_VALUE_ADDRESS (msymbol); else new_low += 1 * max_lines; tui_disassemble (gdbarch, asm_lines, new_low, max_lines); last_addr = asm_lines[pos].addr; - } while (last_addr > pc && msymbol); + } while (last_addr > pc && msymbol.minsym); /* Scan forward disassembling one instruction at a time until the last visible instruction of the window matches the pc. @@ -339,17 +340,17 @@ tui_get_begin_asm_address (struct gdbarch **gdbarch_p, CORE_ADDR *addr_p) if (element->addr == 0) { - struct minimal_symbol *main_symbol; + struct bound_minimal_symbol main_symbol; /* Find address of the start of program. Note: this should be language specific. */ main_symbol = lookup_minimal_symbol ("main", NULL, NULL); - if (main_symbol == 0) + if (main_symbol.minsym == 0) main_symbol = lookup_minimal_symbol ("MAIN", NULL, NULL); - if (main_symbol == 0) + if (main_symbol.minsym == 0) main_symbol = lookup_minimal_symbol ("_start", NULL, NULL); - if (main_symbol) - addr = SYMBOL_VALUE_ADDRESS (main_symbol); + if (main_symbol.minsym) + addr = BMSYMBOL_VALUE_ADDRESS (main_symbol); else addr = 0; }