Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [pushed] [gdb/testsuite] Fix section hole detection in gdb.tui/scroll-back.exp
@ 2026-10-13  9:19 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2026-10-13  9:19 UTC (permalink / raw)
  To: gdb-patches

On openSUSE Leap 15.6, with test-case gdb.tui/scroll-back.exp I ran into:
...
(gdb) x /cx bar-1^M
0x40056f:       Cannot access memory at address 0x400571^M
(gdb) UNSUPPORTED: $exp: require no section hole between .text_1 and .text_2
...

When I wrote the command, I thought that I specified printing one byte in hex,
but actually both c and x are format modifiers, so the size defaults to 'w'.

I filed a PR (PR34740) about stricter checking of format letters.

Fix by using "/bx".

Tested on x86_64-linux.
---
 gdb/testsuite/gdb.tui/scroll-back.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.tui/scroll-back.exp b/gdb/testsuite/gdb.tui/scroll-back.exp
index 76eb66eafca..8db7a165852 100644
--- a/gdb/testsuite/gdb.tui/scroll-back.exp
+++ b/gdb/testsuite/gdb.tui/scroll-back.exp
@@ -51,7 +51,7 @@ set re_hole \
 	 {$hex:\s+Cannot access memory at address $hex}]
 
 set section_hole -1
-gdb_test_multiple "x /cx bar-1" "" {
+gdb_test_multiple "x /bx bar-1" "" {
     -re -wrap $re_no_hole {
 	set section_hole 0
     }

base-commit: 80b91cb32b083868945f8da8fdeb2c20b5c9f099
-- 
2.51.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-13  9:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-13  9:19 [pushed] [gdb/testsuite] Fix section hole detection in gdb.tui/scroll-back.exp Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox