aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2004-03-28 10:18:07 +0000
committerStephane Carrez <stcarrez@nerim.fr>2004-03-28 10:18:07 +0000
commit0bfbda3b653c5fe2a2abc5b1aa50496d7803cdcc (patch)
treeaa13baa10dac450eea1a8b8b326751321e77c212 /gdb/tui
parent3c9a4beb8015dcfd20e5f15444538386a518d870 (diff)
downloadgdb-0bfbda3b653c5fe2a2abc5b1aa50496d7803cdcc.zip
gdb-0bfbda3b653c5fe2a2abc5b1aa50496d7803cdcc.tar.gz
gdb-0bfbda3b653c5fe2a2abc5b1aa50496d7803cdcc.tar.bz2
* tui/tui-regs.c (tui_show_registers): Make sure the TUI is active
and switch the layout to force a display of register window.
Diffstat (limited to 'gdb/tui')
-rw-r--r--gdb/tui/tui-regs.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c
index c0eab97..abb92a4 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;