From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 5778C3858D28; Wed, 25 Jan 2023 12:44:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5778C3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674650660; bh=LdpQmRuS+37TuCC6Wwc8il4V0vpJ7iB3YntIAwiQjDQ=; h=From:To:Subject:Date:From; b=lpc8c0BJy1KKFRhF1gzGNxrImr3Z0GWBEvsbOhCusMWczAIpMeGG2Z0sVWrB/yKwL RQ0hJNzDu8VdhR24V9ljCDNJIUx2ztvT2/C09JtjGxq0+EtnCtn686u0FydWev/RWv Ovjp9xkLNqGjp9ci/lB0LD6cBoDS/WaQALvTfagg= 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] Allow nodebug srcfile in gdb.base/unwind-on-each-insn.exp X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 1b2fb35d5920fc27624823de92c30d346161058e X-Git-Newrev: 621271c7819c3337e3eb5e48b7a7ee66573543da Message-Id: <20230125124420.5778C3858D28@sourceware.org> Date: Wed, 25 Jan 2023 12:44:20 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D621271c7819c= 3337e3eb5e48b7a7ee66573543da commit 621271c7819c3337e3eb5e48b7a7ee66573543da Author: Tom de Vries Date: Wed Jan 25 13:44:17 2023 +0100 [gdb/testsuite] Allow nodebug srcfile in gdb.base/unwind-on-each-insn.e= xp =20 Test-case gdb.base/unwind-on-each-insn.exp compiles $srcfile with debug= info, and $srcfile2 without. =20 Occasionally, I try both files with debug info: ... - $srcfile $debug_flags $srcfile2 $nodebug_flags]]} { + $srcfile $debug_flags $srcfile2 $debug_flags]]} { ... and both files without: ... - $srcfile $debug_flags $srcfile2 $nodebug_flags]]} { + $srcfile $nodebug_flags $srcfile2 $nodebug_flags]]} { ... =20 In the latter case, I run into: ... FAIL: gdb.base/unwind-on-each-insn.exp: foo: instruction 1: bt 2 FAIL: gdb.base/unwind-on-each-insn.exp: foo: instruction 1: up ... due to a mismatch between the regexp and the different output due to us= ing nodebug. =20 Fix this by making the regexp less strict. =20 Tested on x86_64-linux. Diff: --- gdb/testsuite/gdb.base/unwind-on-each-insn.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp b/gdb/testsuite= /gdb.base/unwind-on-each-insn.exp index a5e43c6228b..d6f90dde8c1 100644 --- a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp +++ b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp @@ -111,11 +111,11 @@ proc do_test { function step_cmd } { "check frame-id matches" =20 # Check that the previous frame is 'main'. - gdb_test "bt 2" "\r\n#1\\s+\[^\r\n\]+ in main \\(\\) .*" + gdb_test "bt 2" "\r\n#1\\s+\[^\r\n\]+ in main \\(\\)( .*)?" =20 # Move up the stack (to main). gdb_test "up" \ - "\r\n#1\\s+\[^\r\n\]+ in main \\(\\) .*" + "\r\n#1\\s+\[^\r\n\]+ in main \\(\\)( .*)?" =20 # Check we can unwind the stack-pointer and the frame base # address correctly.