]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* tui/tui-regs.c (tui_show_registers): Make sure the TUI is active
authorStephane Carrez <stcarrez@nerim.fr>
Sun, 28 Mar 2004 10:19:46 +0000 (10:19 +0000)
committerStephane Carrez <stcarrez@nerim.fr>
Sun, 28 Mar 2004 10:19:46 +0000 (10:19 +0000)
and switch the layout to force a display of register window.

gdb/ChangeLog
gdb/tui/tui-regs.c

index 64bcc2ab0f4d31825fdd0452157665fdf59a4ccf..61e1fbb0eda12d4a196b99e04658a62ddfbcb329 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-28  Stephane Carrez  <stcarrez@nerim.fr>
+
+       * 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-03-26  David Carlton  <carlton@kealia.com>
 
        * PROBLEMS: Refer to gdb/1588 instead of gdb/826.
index c0eab97513c1dd3e7b30e9d55d1afcec8af470ce..abb92a4333660f12ddeeede99178785b10cfd4ba 100644 (file)
@@ -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;