Remove tui_source_window::show_symtab_source
[deliverable/binutils-gdb.git] / gdb / tui / tui-source.c
index 32877d7bc87a009205b7a880bf54bd2e9ea7ac98..062f26f55ebc7ad647bf3cd79e6f20a8e30389fe 100644 (file)
@@ -85,7 +85,9 @@ tui_source_window::set_contents (struct gdbarch *arch,
          int digits = 0;
          if (compact_source)
            {
-             double l = log10 (offsets->size ());
+             /* Solaris 11+gcc 5.5 has ambiguous overloads of log10, so we
+                cast to double to get the right one.  */
+             double l = log10 ((double) offsets->size ());
              digits = 1 + (int) l;
            }
 
@@ -123,18 +125,6 @@ tui_source_window::set_contents (struct gdbarch *arch,
 }
 
 
-/* Function to display source in the source window.  This function
-   initializes the horizontal scroll to 0.  */
-void
-tui_source_window::show_symtab_source (struct gdbarch *gdbarch,
-                                      struct symtab *s,
-                                      struct tui_line_or_address line)
-{
-  horizontal_offset = 0;
-  update_source_window_as_is (gdbarch, s, line);
-}
-
-
 /* Answer whether the source is currently displayed in the source
    window.  */
 bool
@@ -207,10 +197,9 @@ tui_source_window::line_is_displayed (int line) const
 }
 
 void
-tui_source_window::maybe_update (struct frame_info *fi, symtab_and_line sal,
-                                int line_no, CORE_ADDR addr)
+tui_source_window::maybe_update (struct frame_info *fi, symtab_and_line sal)
 {
-  int start_line = (line_no - (viewport_height / 2)) + 1;
+  int start_line = (sal.line - (viewport_height / 2)) + 1;
   if (start_line <= 0)
     start_line = 1;
 
@@ -221,12 +210,11 @@ tui_source_window::maybe_update (struct frame_info *fi, symtab_and_line sal,
 
   l.loa = LOA_LINE;
   l.u.line_no = start_line;
-  if (!(source_already_displayed
-       && line_is_displayed (line_no)))
+  if (!(source_already_displayed && line_is_displayed (sal.line)))
     update_source_window (get_frame_arch (fi), sal.symtab, l);
   else
     {
-      l.u.line_no = line_no;
+      l.u.line_no = sal.line;
       set_is_exec_point_at (l);
     }
 }
This page took 0.024362 seconds and 4 git commands to generate.