aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2023-12-16 09:31:29 +0100
committerTom de Vries <tdevries@suse.de>2023-12-16 09:31:29 +0100
commit86a6f9a9fb112614c15cc17630b29fbc62d3bca5 (patch)
tree49bacf6cc5769d282d3240711ec9b4259ca58dd1 /gdb/testsuite
parentbebb0dd44b98f5b6555cb75389b7b14deed9550e (diff)
downloadgdb-86a6f9a9fb112614c15cc17630b29fbc62d3bca5.zip
gdb-86a6f9a9fb112614c15cc17630b29fbc62d3bca5.tar.gz
gdb-86a6f9a9fb112614c15cc17630b29fbc62d3bca5.tar.bz2
[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
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/gdb.tui/regs.exp10
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.tui/regs.exp b/gdb/testsuite/gdb.tui/regs.exp
index 520f6dd..0be9962 100644
--- a/gdb/testsuite/gdb.tui/regs.exp
+++ b/gdb/testsuite/gdb.tui/regs.exp
@@ -41,10 +41,12 @@ Term::command "layout regs"
Term::check_box "register box" 0 0 80 8
Term::check_box "source box in regs layout" 0 7 80 8
-set text [Term::get_line 1]
-# Just check for any register window content at all.
-Term::check_contents "any register contents" "\\|.*\[^ \].*\\|"
-
+# The current frame is main, check that registers are available.
+set re_reg_vals_unavailable \
+ [string_to_regexp {[ Register Values Unavailable ]}]
+gdb_assert \
+ { ![Term::check_region_contents_p 0 0 80 8 $re_reg_vals_unavailable] } \
+ "Register values available"
# Check that we can successfully cause the register window to appear
# using the 'tui reg next' and 'tui reg prev' commands.