From a31bff9d2d78d0d45e3e75dd2513ccbf480a7bc4 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 1 Oct 2019 17:42:17 -0600 Subject: [PATCH] Don't call erase_data_content from tui_data_window::show_registers tui_data_window::show_registers currently calls erase_data_content. However, I think it's better to have fewer calls to this (ideally just one would suffice). This refactors that function to remove this call. gdb/ChangeLog 2019-10-09 Tom Tromey * tui/tui-regs.c (tui_data_window::show_registers): Don't call erase_data_content. --- gdb/ChangeLog | 5 +++++ gdb/tui/tui-regs.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bca7b7b4ffc..a5504a9c00b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-10-09 Tom Tromey + + * tui/tui-regs.c (tui_data_window::show_registers): Don't call + erase_data_content. + 2019-10-09 Tom Tromey * tui/tui-wingeneral.h (tui_delete_win): Don't declare. diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c index 474b62e2047..1d936f712b6 100644 --- a/gdb/tui/tui-regs.c +++ b/gdb/tui/tui-regs.c @@ -154,13 +154,14 @@ tui_data_window::show_registers (struct reggroup *group) for (auto &&data_item_win : m_regs_content) data_item_win.highlight = false; m_current_group = group; - rerender (); } else { m_current_group = 0; - erase_data_content (_("[ Register Values Unavailable ]")); + m_regs_content.clear (); } + + rerender (); } -- 2.30.2