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;
}
}
-/* 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
}
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;
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);
}
}