aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-07-06 07:37:39 -0600
committerTom Tromey <tom@tromey.com>2019-08-13 14:52:10 -0600
commit93858ad34ec1d2250d33365468c6721023786f51 (patch)
tree657fb60d2ec33cb724b1b8049bec8771c40db487 /gdb/tui
parente321e7ce753f27ca9664ca08a8314924b5771d61 (diff)
downloadgdb-93858ad34ec1d2250d33365468c6721023786f51.zip
gdb-93858ad34ec1d2250d33365468c6721023786f51.tar.gz
gdb-93858ad34ec1d2250d33365468c6721023786f51.tar.bz2
Remove tui_clear_exec_info_content
After the previous patch, all calls to tui_clear_exec_info_content come just after a call to tui_clear_source_content. Because these two windows are linked, I think it makes sense to have tui_clear_source_content simply do the work. So, this patch removes tui_clear_exec_info_content. gdb/ChangeLog 2019-08-13 Tom Tromey <tom@tromey.com> * tui/tui-winsource.h (tui_clear_exec_info_content): Don't declare. * tui/tui-winsource.c (tui_update_source_window_as_is) (tui_update_source_windows_with_addr, tui_erase_source_content): Update. (tui_clear_exec_info_content): Remove.
Diffstat (limited to 'gdb/tui')
-rw-r--r--gdb/tui/tui-winsource.c24
-rw-r--r--gdb/tui/tui-winsource.h1
2 files changed, 7 insertions, 18 deletions
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c
index ed2af06..2f02c6a 100644
--- a/gdb/tui/tui-winsource.c
+++ b/gdb/tui/tui-winsource.c
@@ -98,10 +98,7 @@ tui_update_source_window_as_is (struct tui_source_window_base *win_info,
ret = tui_set_disassem_content (win_info, gdbarch, line_or_addr.u.addr);
if (ret == TUI_FAILURE)
- {
- tui_clear_source_content (win_info);
- tui_clear_exec_info_content (win_info);
- }
+ tui_clear_source_content (win_info);
else
{
tui_update_breakpoint_info (win_info, nullptr, false);
@@ -156,10 +153,7 @@ tui_update_source_windows_with_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
else
{
for (struct tui_source_window_base *win_info : tui_source_windows ())
- {
- tui_clear_source_content (win_info);
- tui_clear_exec_info_content (win_info);
- }
+ tui_clear_source_content (win_info);
}
}
@@ -244,6 +238,11 @@ tui_erase_source_content (struct tui_source_window_base *win_info)
win_info->content.clear ();
win_info->refresh_window ();
+
+ struct tui_gen_win_info *exec_info = win_info->execution_info;
+
+ werase (exec_info->handle);
+ exec_info->refresh_window ();
}
}
@@ -655,15 +654,6 @@ tui_source_window_base::show_exec_info_content ()
}
-void
-tui_clear_exec_info_content (struct tui_source_window_base *win_info)
-{
- struct tui_gen_win_info *exec_info = win_info->execution_info;
-
- werase (exec_info->handle);
- exec_info->refresh_window ();
-}
-
/* Function to update the execution info window. */
void
tui_source_window_base::update_exec_info ()
diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h
index d8a84b0..e0a96c1 100644
--- a/gdb/tui/tui-winsource.h
+++ b/gdb/tui/tui-winsource.h
@@ -188,7 +188,6 @@ extern void tui_update_source_windows_with_line (struct symtab *,
int);
extern void tui_clear_source_content (struct tui_source_window_base *);
extern void tui_erase_source_content (struct tui_source_window_base *);
-extern void tui_clear_exec_info_content (struct tui_source_window_base *);
extern void tui_alloc_source_buffer (struct tui_source_window_base *);
extern int tui_line_is_displayed (int,