gdb/gdb-testsuite-add-wait_for_msg-arg-to-term-resize-fi.patch

50 lines
1.6 KiB
Diff

From 028d19e262b4086bc266b2657edd566bb4757927 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Mon, 13 Nov 2023 11:33:23 +0100
Subject: [PATCH 5/6] [gdb/testsuite] Add wait_for_msg arg to Term::resize fix
From commit deb1ba4e38b ("[gdb/tui] Fix TUI resizing for TERM=ansi").
Required for "[gdb/tui] Fix resizing of terminal to 1 or 2 lines".
---
gdb/testsuite/lib/tuiterm.exp | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/gdb/testsuite/lib/tuiterm.exp b/gdb/testsuite/lib/tuiterm.exp
index 591c4ca9c4c..eaac09581e9 100644
--- a/gdb/testsuite/lib/tuiterm.exp
+++ b/gdb/testsuite/lib/tuiterm.exp
@@ -1066,7 +1066,7 @@ namespace eval Term {
}
}
- proc resize {rows cols} {
+ proc resize {rows cols {wait_for_msg 1}} {
variable _rows
variable _cols
variable _resize_count
@@ -1080,14 +1080,18 @@ namespace eval Term {
# Due to the strange column resizing behavior, and because we
# don't care about this intermediate resize, we don't check
# the size here.
- wait_for "@@ resize done $_resize_count"
+ if { $wait_for_msg } {
+ wait_for "@@ resize done $_resize_count"
+ }
incr _resize_count
# Somehow the number of columns transmitted to gdb is one less
# than what we request from expect. We hide this weird
# details from the caller.
_do_resize $_rows $cols
stty columns [expr {$_cols + 1}] < $::gdb_tty_name
- wait_for "@@ resize done $_resize_count, size = ${_cols}x${rows}"
+ if { $wait_for_msg } {
+ wait_for "@@ resize done $_resize_count, size = ${_cols}x${rows}"
+ }
incr _resize_count
}
}
--
2.35.3