aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-winsource.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-07-06 15:04:12 -0600
committerTom Tromey <tom@tromey.com>2019-08-15 12:29:28 -0600
commita54700c6c45ea424b668f2201ef14906f2052412 (patch)
treee379e5c24176b5ea9c3017b56a66374f144932f4 /gdb/tui/tui-winsource.h
parente2a678a557b52816a7aa45902a6519bc1cae918e (diff)
downloadgdb-a54700c6c45ea424b668f2201ef14906f2052412.zip
gdb-a54700c6c45ea424b668f2201ef14906f2052412.tar.gz
gdb-a54700c6c45ea424b668f2201ef14906f2052412.tar.bz2
Move contents of tui_show_frame_info to new method
This moves much of the body of tui_show_frame_info to a new method on tui_source_window_base. This removes a check for the type of a window. gdb/ChangeLog 2019-08-15 Tom Tromey <tom@tromey.com> * tui/tui-winsource.h (struct tui_source_window_base) <maybe_update>: Declare. * tui/tui-stack.c (tui_show_frame_info): Call maybe_update method. * tui/tui-source.h (struct tui_source_window) <maybe_update>: Declare. * tui/tui-source.c (tui_source_window::maybe_update): New method. * tui/tui-disasm.h (struct tui_disasm_window) <maybe_update>: Declare. * tui/tui-disasm.c (tui_disasm_window::maybe_update): New method.
Diffstat (limited to 'gdb/tui/tui-winsource.h')
-rw-r--r--gdb/tui/tui-winsource.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h
index abb7ea3..f2fd1eb 100644
--- a/gdb/tui/tui-winsource.h
+++ b/gdb/tui/tui-winsource.h
@@ -23,6 +23,7 @@
#define TUI_TUI_WINSOURCE_H
#include "tui/tui-data.h"
+#include "symtab.h"
/* Flags to tell what kind of breakpoint is at current line. */
enum tui_bp_flag
@@ -116,6 +117,11 @@ public:
void update_exec_info ();
+ /* Update the window to display the given location. Does nothing if
+ the location is already displayed. */
+ virtual void maybe_update (struct frame_info *fi, symtab_and_line sal,
+ int line_no, CORE_ADDR addr) = 0;
+
/* Does the locator belong to this window? */
bool m_has_locator = false;
/* Execution information window. */