diff options
author | Tom Tromey <tom@tromey.com> | 2019-07-11 20:00:07 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-08-16 11:28:34 -0600 |
commit | bb01dbfc041dccab2f2a2818068158f61b4c0fe2 (patch) | |
tree | 01be029c4f8b19808e0445c24ca961e0fb987ced /gdb/tui | |
parent | 81c82c4b9005acf7865d8a19ee651968e059a848 (diff) | |
download | gdb-bb01dbfc041dccab2f2a2818068158f61b4c0fe2.zip gdb-bb01dbfc041dccab2f2a2818068158f61b4c0fe2.tar.gz gdb-bb01dbfc041dccab2f2a2818068158f61b4c0fe2.tar.bz2 |
Change tui_show_symtab_source to be a method
This changes tui_show_symtab_source to be a method on
tui_source_window.
gdb/ChangeLog
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.
Diffstat (limited to 'gdb/tui')
-rw-r--r-- | gdb/tui/tui-source.c | 10 | ||||
-rw-r--r-- | gdb/tui/tui-source.h | 7 | ||||
-rw-r--r-- | gdb/tui/tui-winsource.c | 4 |
3 files changed, 10 insertions, 11 deletions
diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c index 9eb7c48..57d27ae 100644 --- a/gdb/tui/tui-source.c +++ b/gdb/tui/tui-source.c @@ -202,12 +202,12 @@ 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_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); } diff --git a/gdb/tui/tui-source.h b/gdb/tui/tui-source.h index c623f5e..9c30136 100644 --- a/gdb/tui/tui-source.h +++ b/gdb/tui/tui-source.h @@ -56,6 +56,9 @@ struct tui_source_window : public tui_source_window_base 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; @@ -77,8 +80,4 @@ private: 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 */ diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 3a678f2..43e8a28 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -139,7 +139,7 @@ tui_update_source_windows_with_addr (struct gdbarch *gdbarch, CORE_ADDR addr) 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; } } @@ -174,7 +174,7 @@ tui_update_source_windows_with_line (struct symtab *s, int line) 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); |