diff options
author | Stephane Carrez <stcarrez@nerim.fr> | 2004-03-28 10:18:07 +0000 |
---|---|---|
committer | Stephane Carrez <stcarrez@nerim.fr> | 2004-03-28 10:18:07 +0000 |
commit | 744b398f75a1a70c09e18fb7636cf9edc64d4764 (patch) | |
tree | f4653020c0536027147fb31f84143ef0ba2242e9 /gdb/tui/tui-regs.c | |
parent | 2e9c54e0b0b1fbdc33bddda14efa5b620395fc20 (diff) | |
download | gdb-744b398f75a1a70c09e18fb7636cf9edc64d4764.tar.gz |
* 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/tui-regs.c')
-rw-r--r-- | gdb/tui/tui-regs.c | 11 |
1 files changed, 10 insertions, 1 deletions
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; |