aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-07-05 17:24:07 -0600
committerTom Tromey <tom@tromey.com>2019-08-13 14:52:09 -0600
commit7ba913dcdf2f94cbd501d763f0fc55a46d10331c (patch)
treee9e260dbe1a484891ac4c20352b4b3088d829632 /gdb/tui
parent37a4a1310484490878ce0af9ea1924d6c7dbec7b (diff)
downloadgdb-7ba913dcdf2f94cbd501d763f0fc55a46d10331c.zip
gdb-7ba913dcdf2f94cbd501d763f0fc55a46d10331c.tar.gz
gdb-7ba913dcdf2f94cbd501d763f0fc55a46d10331c.tar.bz2
Change tui_update_exec_info to be a method
This changes tui_update_exec_info to be a method on tui_source_window_base. gdb/ChangeLog 2019-08-13 Tom Tromey <tom@tromey.com> * tui/tui-winsource.h (struct tui_source_window_base) <update_exec_info>: Declare. (tui_update_exec_info): Don't declare. * tui/tui-winsource.c (tui_update_source_window_as_is) (tui_source_window_base::refresh_all) (tui_update_all_breakpoint_info): Update. (tui_source_window_base::update_exec_info): Rename from tui_update_exec_info. * tui/tui-stack.c (tui_show_frame_info): Update.
Diffstat (limited to 'gdb/tui')
-rw-r--r--gdb/tui/tui-stack.c4
-rw-r--r--gdb/tui/tui-winsource.c12
-rw-r--r--gdb/tui/tui-winsource.h2
3 files changed, 9 insertions, 9 deletions
diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c
index 6acc227..0a71223 100644
--- a/gdb/tui/tui-stack.c
+++ b/gdb/tui/tui-stack.c
@@ -428,7 +428,7 @@ tui_show_frame_info (struct frame_info *fi)
}
}
- tui_update_exec_info (win_info);
+ win_info->update_exec_info ();
}
return 1;
@@ -445,7 +445,7 @@ tui_show_frame_info (struct frame_info *fi)
for (struct tui_source_window_base *win_info : tui_source_windows ())
{
tui_clear_source_content (win_info);
- tui_update_exec_info (win_info);
+ win_info->update_exec_info ();
}
return 1;
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c
index c47da04..53113bd 100644
--- a/gdb/tui/tui-winsource.c
+++ b/gdb/tui/tui-winsource.c
@@ -106,7 +106,7 @@ tui_update_source_window_as_is (struct tui_source_window_base *win_info,
{
tui_update_breakpoint_info (win_info, nullptr, false);
win_info->show_source_content ();
- tui_update_exec_info (win_info);
+ win_info->update_exec_info ();
if (win_info->type == SRC_WIN)
{
symtab_and_line sal;
@@ -335,7 +335,7 @@ tui_source_window_base::refresh_all ()
show_source_content ();
check_and_display_highlight_if_needed ();
tui_erase_exec_info_content (this);
- tui_update_exec_info (this);
+ update_exec_info ();
}
/* See tui-data.h. */
@@ -517,7 +517,7 @@ tui_update_all_breakpoint_info (struct breakpoint *being_deleted)
{
if (tui_update_breakpoint_info (win, being_deleted, false))
{
- tui_update_exec_info (win);
+ win->update_exec_info ();
}
}
}
@@ -673,10 +673,10 @@ tui_clear_exec_info_content (struct tui_source_window_base *win_info)
/* Function to update the execution info window. */
void
-tui_update_exec_info (struct tui_source_window_base *win_info)
+tui_source_window_base::update_exec_info ()
{
- win_info->set_exec_info_content ();
- tui_show_exec_info_content (win_info);
+ set_exec_info_content ();
+ tui_show_exec_info_content (this);
}
void
diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h
index 645cd67..bce889d 100644
--- a/gdb/tui/tui-winsource.h
+++ b/gdb/tui/tui-winsource.h
@@ -92,6 +92,7 @@ public:
void show_source_content ();
void set_exec_info_content ();
+ void update_exec_info ();
/* Does the locator belong to this window? */
bool m_has_locator = false;
@@ -146,7 +147,6 @@ extern void tui_erase_source_content (struct tui_source_window_base *);
extern void tui_show_exec_info_content (struct tui_source_window_base *);
extern void tui_erase_exec_info_content (struct tui_source_window_base *);
extern void tui_clear_exec_info_content (struct tui_source_window_base *);
-extern void tui_update_exec_info (struct tui_source_window_base *);
extern void tui_alloc_source_buffer (struct tui_source_window_base *);
extern int tui_line_is_displayed (int,