From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 462343858D28; Wed, 25 Jan 2023 14:24:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 462343858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674656661; bh=ximiF/jnrw5XvNnU3LIZQkJZkuYxiDtlomiQFl99F5Q=; h=From:To:Subject:Date:From; b=FYvnjigp7B8y+r8GMG2wBAwKzBa80KfbmomHuIPCxrW+pci3gePUonYKYevELvxkS eA79ZnIS2t1hzjDstaOAkqdEkb7BTGeXkmYsITSvCn+ixtaTHpTwSm6toFLfZaSBFG bOWh1KOJPEDiFsTCJ9XcawL8CYJJ3lqEFcr2q9sY= 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 debug srcfile2 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: 621271c7819c3337e3eb5e48b7a7ee66573543da X-Git-Newrev: d25a8dbc7c3ae12aea8a203ce64f78608e22daa0 Message-Id: <20230125142421.462343858D28@sourceware.org> Date: Wed, 25 Jan 2023 14:24:21 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dd25a8dbc7c3a= e12aea8a203ce64f78608e22daa0 commit d25a8dbc7c3ae12aea8a203ce64f78608e22daa0 Author: Tom de Vries Date: Wed Jan 25 15:24:17 2023 +0100 [gdb/testsuite] Allow debug srcfile2 in gdb.base/unwind-on-each-insn.exp =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]]} { ... =20 This shortcuts the test due to no longer recognizing that stepi still l= ands in foo. =20 Fix this by determining whether still in foo by checking the info frame= output. =20 Tested on x86_64-linux. Diff: --- gdb/testsuite/gdb.base/unwind-on-each-insn.exp | 6 ++++-- 1 file changed, 4 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 d6f90dde8c1..059967a2b2e 100644 --- a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp +++ b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp @@ -142,9 +142,11 @@ proc do_test { function step_cmd } { break } =20 + gdb_test $step_cmd + set in_fn 0 - gdb_test_multiple $step_cmd "" { - -re -wrap "$::hex in $function \\(\\)" { + gdb_test_multiple "info frame" "" { + -re -wrap "rip =3D $::hex in ${function}( \\(.*\\))?;.*" { set in_fn 1 } -re -wrap "" {}