From 0bfbda3b653c5fe2a2abc5b1aa50496d7803cdcc Mon Sep 17 00:00:00 2001 From: Stephane Carrez Date: Sun, 28 Mar 2004 10:18:07 +0000 Subject: [PATCH] * tui/tui-regs.c (tui_show_registers): Make sure the TUI is active and switch the layout to force a display of register window. --- gdb/ChangeLog | 5 +++++ gdb/tui/tui-regs.c | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fc634276c9e..c5812d43086 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2004-03-28 Stephane Carrez + + * tui/tui-regs.c (tui_show_registers): Make sure the TUI is active + and switch the layout to force a display of register window. + 2004-02-26 J. Brobecker * amd64-tdep.c (amd64_classify): make RANGE_TYPE objects be part diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c index c0eab97513c..abb92a43336 100644 --- a/gdb/tui/tui-regs.c +++ b/gdb/tui/tui-regs.c @@ -148,8 +148,17 @@ void tui_show_registers (struct reggroup *group) { enum tui_status ret = TUI_FAILURE; - struct tui_data_info *display_info = &TUI_DATA_WIN->detail.data_display_info; + struct tui_data_info *display_info; + + /* Make sure the curses mode is enabled. */ + tui_enable (); + + /* Make sure the register window is visible. If not, select an + appropriate layout. */ + if (TUI_DATA_WIN == NULL || !TUI_DATA_WIN->generic.is_visible) + tui_set_layout_for_display_command (DATA_NAME); + display_info = &TUI_DATA_WIN->detail.data_display_info; if (group == 0) group = general_reggroup; -- 2.30.2