aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2022-10-20 09:02:18 +0200
committerTom de Vries <tdevries@suse.de>2022-10-20 09:02:18 +0200
commit9c1c98cc632a7f4721e0b19edcb8f6bcd9347942 (patch)
treee8cefc935329178c10c305ddd94bffb18aa6ad21 /gdb/testsuite/lib
parent53707efa1b9d04a844c445a446c0523e509ac61c (diff)
downloadgdb-9c1c98cc632a7f4721e0b19edcb8f6bcd9347942.zip
gdb-9c1c98cc632a7f4721e0b19edcb8f6bcd9347942.tar.gz
gdb-9c1c98cc632a7f4721e0b19edcb8f6bcd9347942.tar.bz2
[gdb/testsuite] Fix gdb.mi/mi-disassemble.exp with check-read1
With test-case gdb.mi/mi-disassemble.exp and check-read1 I run into: ... FAIL: gdb.mi/mi-disassemble.exp: disassemble /b main FAIL: gdb.mi/mi-disassemble.exp: get valueof "*((unsigned char *) 0x400549)" ... The problem for both FAILs is that the output is parsed using gdb_test_multiple, which has implicit clauses using $gdb_prompt, which can match before the explicit clauses using $mi_gdb_prompt. Fix this by passing -prompt "$mi_gdb_prompt$" to gdb_test_multiple. Tested on x86-64-linux.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r--gdb/testsuite/lib/mi-support.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 2b534f5..e537d3b 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -2849,7 +2849,7 @@ proc mi_get_valueof { fmt exp default {test ""} } {
}
set val ${default}
- gdb_test_multiple "print${fmt} ${exp}" "$test" {
+ gdb_test_multiple "print${fmt} ${exp}" "$test" -prompt "$::mi_gdb_prompt$" {
-re "~\"\\$\[0-9\]* = (\[^\r\n\]*)\\\\n\"\r\n\\^done\r\n$mi_gdb_prompt$" {
set val $expect_out(1,string)
pass "$test"