From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 4EE3F3858C39; Fri, 29 Jul 2022 14:12:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4EE3F3858C39 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.ada/convvar_comp.exp with broken debug info X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 10948fb9fd66c029d59c97e04556ab827076336c X-Git-Newrev: 5ec878132bb39fb43e081dcf53e42aca202b24d9 Message-Id: <20220729141258.4EE3F3858C39@sourceware.org> Date: Fri, 29 Jul 2022 14:12:58 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2022 14:12:58 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D5ec878132bb3= 9fb43e081dcf53e42aca202b24d9 commit 5ec878132bb39fb43e081dcf53e42aca202b24d9 Author: Tom de Vries Date: Fri Jul 29 16:12:55 2022 +0200 [gdb/testsuite] Fix gdb.ada/convvar_comp.exp with broken debug info =20 On aarch64-linux I run into this failure with gcc 7.5.0: ... (gdb) print $item.started^M $1 =3D (-5312, 65535, 4202476)^M (gdb) FAIL: gdb.ada/convvar_comp.exp: print $item.started ... =20 The test-case expects (0, 0, 0), but we're getting another value due to incorrect location information. =20 Work around this by: - first printing the value, and then - verifying that the convenience variable matches the printed value. =20 I've verified that the test-case still checks what it should by disabli= ng the fix from commit cc0e770c0d0 ("memory error printing component of re= cord from convenience variable") and observing the test-case fail. =20 Tested on x86_64-linux and aarch64-linux. =20 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29420 Diff: --- gdb/testsuite/gdb.ada/convvar_comp.exp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.ada/convvar_comp.exp b/gdb/testsuite/gdb.ada= /convvar_comp.exp index ebc2659aeaa..1923bd785c7 100644 --- a/gdb/testsuite/gdb.ada/convvar_comp.exp +++ b/gdb/testsuite/gdb.ada/convvar_comp.exp @@ -30,7 +30,15 @@ if ![runto "break_me" ] then { return } =20 +set val "" +gdb_test_multiple "print item.started" "" { + -re -wrap " =3D \\((.*)\\)" { + set val $expect_out(1,string) + pass $gdb_test_name + } +} + gdb_test_no_output "set variable \$item :=3D item" =20 gdb_test "print \$item.started" \ - " =3D \\(0, 0, 0\\)" + " =3D \\($val\\)"