[gdb/tui] Show regs when switching to regs layout
authorTom de Vries <tdevries@suse.de>
Sat, 16 Dec 2023 08:31:29 +0000 (09:31 +0100)
committerTom de Vries <tdevries@suse.de>
Sat, 16 Dec 2023 08:31:29 +0000 (09:31 +0100)
commit86a6f9a9fb112614c15cc17630b29fbc62d3bca5
tree49bacf6cc5769d282d3240711ec9b4259ca58dd1
parentbebb0dd44b98f5b6555cb75389b7b14deed9550e
[gdb/tui] Show regs when switching to regs layout

When starting gdb in CLI mode, running to main and switching into the TUI regs
layout:
...
$ gdb -q a.out -ex start -ex "layout regs"
...
we get:
...
+---------------------------------+
|                                 |
| [ Register Values Unavailable ] |
|                                 |
+---------------------------------+
...

Fix this by handling this case in tui_data_window::rerender.

Tested on x86_64-linux.

Approved-By: Tom Tromey <tom@tromey.com>
PR tui/28600
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28600
gdb/testsuite/gdb.tui/regs.exp
gdb/tui/tui-regs.c
gdb/tui/tui-regs.h