+2019-08-16 Tom Tromey <tom@tromey.com>
+
+ * tui/tui-winsource.c (tui_update_source_windows_with_addr)
+ (tui_update_source_windows_with_line): Update.
+ * tui/tui-source.h (struct tui_source_window)
+ <show_symtab_source>: Declare.
+ (tui_show_symtab_source): Don't declare.
+ * tui/tui-source.c (tui_show_symtab_source): Rename from
+ tui_show_symtab_source.
+
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (struct tui_source_window_base)
/* Function to display source in the source window. This function
initializes the horizontal scroll to 0. */
void
-tui_show_symtab_source (tui_source_window_base *win_info,
- struct gdbarch *gdbarch, struct symtab *s,
- struct tui_line_or_address line)
+tui_source_window::show_symtab_source (struct gdbarch *gdbarch,
+ struct symtab *s,
+ struct tui_line_or_address line)
{
- win_info->horizontal_offset = 0;
- win_info->update_source_window_as_is (gdbarch, s, line);
+ horizontal_offset = 0;
+ update_source_window_as_is (gdbarch, s, line);
}
do_erase_source_content (NO_SRC_STRING);
}
+ void show_symtab_source (struct gdbarch *, struct symtab *,
+ struct tui_line_or_address);
+
protected:
void do_scroll_vertical (int num_to_scroll) override;
gdb::observers::token m_observable;
};
-extern void tui_show_symtab_source (tui_source_window_base *,
- struct gdbarch *, struct symtab *,
- struct tui_line_or_address);
-
#endif /* TUI_TUI_SOURCE_H */
sal = find_pc_line (addr, 0);
l.loa = LOA_LINE;
l.u.line_no = sal.line;
- tui_show_symtab_source (TUI_SRC_WIN, gdbarch, sal.symtab, l);
+ TUI_SRC_WIN->show_symtab_source (gdbarch, sal.symtab, l);
break;
}
}
default:
l.loa = LOA_LINE;
l.u.line_no = line;
- tui_show_symtab_source (TUI_SRC_WIN, gdbarch, s, l);
+ TUI_SRC_WIN->show_symtab_source (gdbarch, s, l);
if (tui_current_layout () == SRC_DISASSEM_COMMAND)
{
find_line_pc (s, line, &pc);