From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 6465E3853564; Thu, 20 Oct 2022 07:02:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6465E3853564 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666249342; bh=4H8wacklMsx95AALpmS2ebptkUC57zfztTzo2ixPazw=; h=From:To:Subject:Date:From; b=QdGpwteTybs2N/hrBnfIwLGywHyhTdk923oTGGIY7c8JYx2DZPnzSwREQ3BQgdove uvZODMeiyc1CP+xJyQ2tQwXzmgBPIhJ8M9kbbStivxU+rUH8vVLV1ZZyFF/YWv4SSo TrI0j91i7+BF+ZqR+C8rbqjPJZgrmE2xPAwiEFL0= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Fix gdb.mi/mi-disassemble.exp with check-read1 X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 53707efa1b9d04a844c445a446c0523e509ac61c X-Git-Newrev: 9c1c98cc632a7f4721e0b19edcb8f6bcd9347942 Message-Id: <20221020070222.6465E3853564@sourceware.org> Date: Thu, 20 Oct 2022 07:02:22 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D9c1c98cc632a= 7f4721e0b19edcb8f6bcd9347942 commit 9c1c98cc632a7f4721e0b19edcb8f6bcd9347942 Author: Tom de Vries Date: Thu Oct 20 09:02:18 2022 +0200 [gdb/testsuite] Fix gdb.mi/mi-disassemble.exp with check-read1 =20 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 *) 0x400= 549)" ... =20 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. =20 Fix this by passing -prompt "$mi_gdb_prompt$" to gdb_test_multiple. =20 Tested on x86-64-linux. Diff: --- gdb/testsuite/gdb.mi/mi-disassemble.exp | 2 +- gdb/testsuite/lib/mi-support.exp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.mi/mi-disassemble.exp b/gdb/testsuite/gdb.mi= /mi-disassemble.exp index cac3689071c..d2b60f1bb22 100644 --- a/gdb/testsuite/gdb.mi/mi-disassemble.exp +++ b/gdb/testsuite/gdb.mi/mi-disassemble.exp @@ -269,7 +269,7 @@ proc test_disassembly_opcode_format {} { # then disassemble using the MI command. set longest_insn_bytes "" set longest_insn_addr "" - gdb_test_multiple "disassemble /b main" "" { + gdb_test_multiple "disassemble /b main" "" -prompt "$::mi_gdb_prompt$"= { -re "^disassemble /b main\r\n" { exp_continue } diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-suppor= t.exp index 2b534f5d871..e537d3b546b 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 ""} } { } =20 set val ${default} - gdb_test_multiple "print${fmt} ${exp}" "$test" { + gdb_test_multiple "print${fmt} ${exp}" "$test" -prompt "$::mi_gdb_prom= pt$" { -re "~\"\\$\[0-9\]* =3D (\[^\r\n\]*)\\\\n\"\r\n\\^done\r\n$mi_gdb_prompt$= " { set val $expect_out(1,string) pass "$test"