PR symtab/17559
[deliverable/binutils-gdb.git] / gdb / tui / tui-winsource.c
index ffa1ee6242b818953e5fc382c445d22d5d5605ed..48a95e4edcb822f2b877639943532b1706d07e87 100644 (file)
@@ -1,6 +1,6 @@
 /* TUI display source/assembly window.
 
-   Copyright (C) 1998-2013 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 <string.h>
 #include "gdb_curses.h"
-#include "gdb_assert.h"
 
 /* Function to display the "main" routine.  */
 void
@@ -54,12 +51,12 @@ 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_fullname (symtab_to_fullname (sal.symtab));
+         s = find_pc_line_symtab (addr);
+          if (s != NULL)
+             tui_update_locator_fullname (symtab_to_fullname (s));
           else
              tui_update_locator_fullname ("??");
        }
@@ -334,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;
        }
This page took 0.024596 seconds and 4 git commands to generate.