diff options
Diffstat (limited to 'gdb/tui/tui-disasm.c')
-rw-r--r-- | gdb/tui/tui-disasm.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c index 0727d3a..cd82853 100644 --- a/gdb/tui/tui-disasm.c +++ b/gdb/tui/tui-disasm.c @@ -157,11 +157,11 @@ tui_disassemble (struct gdbarch *gdbarch, static CORE_ADDR tui_find_backward_disassembly_start_address (CORE_ADDR addr) { - struct bound_minimal_symbol msym, msym_prev; - - msym = lookup_minimal_symbol_by_pc_section (addr - 1, nullptr, - lookup_msym_prefer::TEXT, - &msym_prev); + bound_minimal_symbol msym_prev; + bound_minimal_symbol msym + = lookup_minimal_symbol_by_pc_section (addr - 1, nullptr, + lookup_msym_prefer::TEXT, + &msym_prev); if (msym.minsym != nullptr) return msym.value_address (); else if (msym_prev.minsym != nullptr) @@ -389,10 +389,12 @@ tui_get_begin_asm_address (struct gdbarch **gdbarch_p, CORE_ADDR *addr_p) if (tui_location.addr () == 0) { - if (have_full_symbols () || have_partial_symbols ()) + if (have_full_symbols (current_program_space) + || have_partial_symbols (current_program_space)) { set_default_source_symtab_and_line (); - struct symtab_and_line sal = get_current_source_symtab_and_line (); + symtab_and_line sal + = get_current_source_symtab_and_line (current_program_space); if (sal.symtab != nullptr) find_line_pc (sal.symtab, sal.line, &addr); @@ -400,8 +402,8 @@ tui_get_begin_asm_address (struct gdbarch **gdbarch_p, CORE_ADDR *addr_p) if (addr == 0) { - struct bound_minimal_symbol main_symbol - = lookup_minimal_symbol (main_name (), nullptr, nullptr); + bound_minimal_symbol main_symbol + = lookup_minimal_symbol (current_program_space, main_name ()); if (main_symbol.minsym != nullptr) addr = main_symbol.value_address (); } |