/* TUI display source/assembly window.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008,
- 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-2014 Free Software Foundation, Inc.
Contributed by Hewlett-Packard Company.
#include "tui/tui-winsource.h"
#include "tui/tui-source.h"
#include "tui/tui-disasm.h"
-
-#include "gdb_string.h"
#include "gdb_curses.h"
-#include "gdb_assert.h"
/* Function to display the "main" routine. */
void
tui_get_begin_asm_address (&gdbarch, &addr);
if (addr != (CORE_ADDR) 0)
{
- struct symtab_and_line sal;
+ struct symtab *s;
tui_update_source_windows_with_addr (gdbarch, addr);
- sal = find_pc_line (addr, 0);
- if (sal.symtab)
- tui_update_locator_filename (sal.symtab->filename);
+ s = find_pc_line_symtab (addr);
+ if (s != NULL)
+ tui_update_locator_fullname (symtab_to_fullname (s));
else
- tui_update_locator_filename ("??");
+ tui_update_locator_fullname ("??");
}
}
}
= get_current_source_symtab_and_line ();
if (cursal.symtab == NULL)
- s = find_pc_symtab (get_frame_pc (get_selected_frame (NULL)));
+ s = find_pc_line_symtab (get_frame_pc (get_selected_frame (NULL)));
else
s = cursal.symtab;
}
for (loc = bp->loc; loc != NULL; loc = loc->next)
{
if ((win == TUI_SRC_WIN
- && loc->source_file
- && (filename_cmp (src->filename, loc->source_file) == 0)
+ && loc->symtab != NULL
+ && filename_cmp (src->fullname,
+ symtab_to_fullname (loc->symtab)) == 0
&& line->line_or_addr.loa == LOA_LINE
&& loc->line_number == line->line_or_addr.u.line_no)
|| (win == TUI_DISASM_WIN