From 017f982820d408fb49657b9b9b8f45a9616c5f21 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 11 Jul 2019 18:24:07 -0600 Subject: Change tui_update_source_window to be a method This changes tui_update_source_window to be a method on tui_source_window_base. gdb/ChangeLog 2019-08-16 Tom Tromey * tui/tui-winsource.h (struct tui_source_window_base) : Declare. (tui_update_source_window): Don't declare. * tui/tui-winsource.c (tui_source_window_base::update_source_window): Rename from tui_update_source_window. (tui_source_window_base::rerender): Update. * tui/tui-source.c (tui_source_window::maybe_update): Update. * tui/tui-disasm.c (tui_show_disassem) (tui_show_disassem_and_update_source) (tui_disasm_window::maybe_update): Update. --- gdb/tui/tui-winsource.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'gdb/tui/tui-winsource.c') diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 2c747eb..3d1d6c4 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -70,13 +70,13 @@ tui_display_main () /* Function to display source in the source window. This function initializes the horizontal scroll to 0. */ void -tui_update_source_window (struct tui_source_window_base *win_info, - struct gdbarch *gdbarch, - struct symtab *s, - struct tui_line_or_address line_or_addr) +tui_source_window_base::update_source_window + (struct gdbarch *gdbarch, + struct symtab *s, + struct tui_line_or_address line_or_addr) { - win_info->horizontal_offset = 0; - win_info->update_source_window_as_is (gdbarch, s, line_or_addr); + horizontal_offset = 0; + update_source_window_as_is (gdbarch, s, line_or_addr); } @@ -325,8 +325,7 @@ tui_source_window_base::rerender () = get_current_source_symtab_and_line (); line_or_addr = start_line_or_addr; - tui_update_source_window (this, gdbarch, - cursal.symtab, line_or_addr); + update_source_window (gdbarch, cursal.symtab, line_or_addr); } else if (deprecated_safe_get_selected_frame () != NULL) { @@ -347,7 +346,7 @@ tui_source_window_base::rerender () line.loa = LOA_ADDRESS; find_line_pc (s, cursal.line, &line.u.addr); } - tui_update_source_window (this, gdbarch, s, line); + update_source_window (gdbarch, s, line); } else erase_source_content (); -- cgit v1.1