From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 7B3953858407 for ; Wed, 25 Jan 2023 14:24:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7B3953858407 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id AD4F21F854 for ; Wed, 25 Jan 2023 14:24:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1674656680; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=SHmDbydAgxtrp63Boz0wBX+FPZbfrmsIyBmyjGmr894=; b=RXU4V9a+Zdm5gqW4GNIrkTVtNRq22S3MG3O4sVtJvBTmt4YfZYtO5kfkeL8RNts3ndh44M Gkc63of9BGyYBjF+ERjJYodh2DvpJSXh+VGvMXl/v9nqgF8bUe6pk+ddBnZ710G6a/WPub JE4h9hXpf9TXM5N8KERNnLe6+E1bKDE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1674656680; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=SHmDbydAgxtrp63Boz0wBX+FPZbfrmsIyBmyjGmr894=; b=0W8h/5blNgek+DcBBnRZfnvZ3edP0NVT6/4dYlCtUKNwPr0I88HKm1VmvipansoyUGx0Cd NYXsIgyuhtZslkAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9C81D1358F for ; Wed, 25 Jan 2023 14:24:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Cf0tJag70WMySwAAMHmgww (envelope-from ) for ; Wed, 25 Jan 2023 14:24:40 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed] [gdb/testsuite] Allow debug srcfile2 in gdb.base/unwind-on-each-insn.exp Date: Wed, 25 Jan 2023 15:24:40 +0100 Message-Id: <20230125142440.29694-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Test-case gdb.base/unwind-on-each-insn.exp compiles $srcfile with debug info, and $srcfile2 without. Occasionally, I try both files with debug info: ... - $srcfile $debug_flags $srcfile2 $nodebug_flags]]} { + $srcfile $debug_flags $srcfile2 $debug_flags]]} { ... This shortcuts the test due to no longer recognizing that stepi still lands in foo. Fix this by determining whether still in foo by checking the info frame output. Tested on x86_64-linux. --- 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 } + 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 = $::hex in ${function}( \\(.*\\))?;.*" { set in_fn 1 } -re -wrap "" {} base-commit: 621271c7819c3337e3eb5e48b7a7ee66573543da -- 2.35.3