From 543a9323382edcccf7a0d409c16c0263604f6be7 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 17 Oct 2011 17:10:55 +0000 Subject: [PATCH] * lib/gdb.exp (gdb_test_multiple): Expect newline and secondary prompt for each extra line in command. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/lib/gdb.exp | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 6e9302e435b..52624e49de3 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-10-17 Joseph Myers + + * lib/gdb.exp (gdb_test_multiple): Expect newline and secondary + prompt for each extra line in command. + 2011-10-17 Jan Kratochvil * gdb.dwarf2/dw2-simple-locdesc.exp (p &s.shl): KFAIL it. diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 4a4708ef697..49a4c7efbef 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -677,6 +677,7 @@ proc gdb_test_multiple { command message user_code } { set result -1 set string "${command}\n"; if { $command != "" } { + set multi_line_re "\[\r\n\] *>" while { "$string" != "" } { set foo [string first "\n" "$string"]; set len [string length "$string"]; @@ -697,10 +698,11 @@ proc gdb_test_multiple { command message user_code } { # command output is not lost for pattern matching # - guo gdb_expect 2 { - -notransfer -re "\[\r\n\]" { verbose "partial: match" 3 } + -notransfer -re "$multi_line_re$" { verbose "partial: match" 3 } timeout { verbose "partial: timeout" 3 } } set string [string range "$string" [expr $foo + 1] end]; + set multi_line_re "$multi_line_re.*\[\r\n\] *>" } else { break; } -- 2.30.2