PR symtab/17559
[deliverable/binutils-gdb.git] / gdb / tui / tui-winsource.c
index 9b936e11613010605209a6dc9f1f32d16b949e84..48a95e4edcb822f2b877639943532b1706d07e87 100644 (file)
@@ -1,7 +1,6 @@
 /* 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
@@ -55,14 +51,14 @@ tui_display_main (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 ("??");
        }
     }
 }
@@ -335,7 +331,7 @@ tui_horizontal_source_scroll (struct tui_win_info *win_info,
            = 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;
        }
@@ -463,8 +459,9 @@ tui_update_breakpoint_info (struct tui_win_info *win,
          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
This page took 0.025403 seconds and 4 git commands to generate.