aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-source.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-07-06 15:09:01 -0600
committerTom Tromey <tom@tromey.com>2019-08-15 12:29:28 -0600
commitc9033fe839e37a378ff86e614a7d6e939b94f6c9 (patch)
treef40043e9df2726d275000b41b03f072c3947452c /gdb/tui/tui-source.h
parent088f37dd90eecb647347c1aa53d36b3f5be64b21 (diff)
downloadgdb-c9033fe839e37a378ff86e614a7d6e939b94f6c9.zip
gdb-c9033fe839e37a378ff86e614a7d6e939b94f6c9.tar.gz
gdb-c9033fe839e37a378ff86e614a7d6e939b94f6c9.tar.bz2
Change tui_line_is_displayed to be a method
This changes tui_line_is_displayed to be a method on tui_source_window, now that it is obvious that it can only be called for this type. gdb/ChangeLog 2019-08-15 Tom Tromey <tom@tromey.com> * tui/tui-winsource.h (tui_line_is_displayed): Don't declare. * tui/tui-winsource.c (tui_line_is_displayed): Move to tui-source.c. * tui/tui-source.h (struct tui_source_window) <line_is_displayed>: Declare. * tui/tui-source.c (tui_source_window::line_is_displayed): New method. (tui_source_window::maybe_update): Update.
Diffstat (limited to 'gdb/tui/tui-source.h')
-rw-r--r--gdb/tui/tui-source.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/tui/tui-source.h b/gdb/tui/tui-source.h
index dc4470e..4233879 100644
--- a/gdb/tui/tui-source.h
+++ b/gdb/tui/tui-source.h
@@ -59,6 +59,10 @@ private:
void style_changed ();
+ /* Answer whether a particular line number or address is displayed
+ in the current source window. */
+ bool line_is_displayed (int line) const;
+
/* A token used to register and unregister an observer. */
gdb::observers::token m_observable;
};