From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id NQqBAhm9EGPcHjEAWB0awg (envelope-from ) for ; Thu, 01 Sep 2022 10:09:29 -0400 Received: by simark.ca (Postfix, from userid 112) id EB52C1E4A7; Thu, 1 Sep 2022 10:09:28 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=QfMuZsDn; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 74B911E13B for ; Thu, 1 Sep 2022 10:09:28 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AB42F3858016 for ; Thu, 1 Sep 2022 14:09:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AB42F3858016 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1662041366; bh=/MVRFIlDoPnA+7xq0jzxR1aTrylY5lhnD6qzrUIhRaw=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=QfMuZsDnQ1Qzm6UuLikev1RD0L/bTb6X9/vqOADJ50X9knhm4YgKlL5COXhoDBPDm QpBfSl7+OEhyFrH5GG6Dh1mG/s1Yi23XXbCUaQCV8CD9YQZ267Cg1dZHVFtoMAuwfq nhoZvG5EkZXm0FTm5ISJBUMEnulYRK0YXC0DRSIQ= Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id D655E3858D1E for ; Thu, 1 Sep 2022 14:09:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D655E3858D1E 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-out1.suse.de (Postfix) with ESMTPS id 1DD032293A for ; Thu, 1 Sep 2022 14:09:06 +0000 (UTC) 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 0AD6213A89 for ; Thu, 1 Sep 2022 14:09:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id YLKqAQK9EGN1VAAAMHmgww (envelope-from ) for ; Thu, 01 Sep 2022 14:09:06 +0000 To: gdb-patches@sourceware.org Subject: [PATCH 2/2] [gdb/testsuite] Fix gdb.dwarf2/dw2-dir-file-name.exp for ppc64le Date: Thu, 1 Sep 2022 16:09:05 +0200 Message-Id: <20220901140905.24562-2-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220901140905.24562-1-tdevries@suse.de> References: <20220901140905.24562-1-tdevries@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" In commit cd919f5533c ("[gdb/testsuite] Fix gdb.dwarf2/dw2-dir-file-name.exp"), I made gdb.dwarf2/dw2-dir-file-name.exp independent of prologue analyzers, using this change: ... - gdb_breakpoint $func + gdb_breakpoint *$func ... That however caused a regression on ppc64le. For PowerPC, as described in the ELFv2 ABI, a function can have a global and local entry point. Setting a breakpoint on *$func effectively creates a breakpoint for the global entry point, so if the function is entered through the local entry point, the breakpoint doesn't trigger. Fix this by reverting commit cd919f5533c, and setting the breakpoint on ${func}_label instead. Tested on x86_64-linux and ppc64le-linux. --- gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp | 8 ++++---- gdb/testsuite/lib/gdb.exp | 7 +------ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp index 08b5c645fa2..053f7229537 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp @@ -450,20 +450,20 @@ proc test { func compdir filename } { error "not absolute" } - gdb_breakpoint *$func + gdb_breakpoint ${func}_label gdb_continue_to_breakpoint $func "$func \\(\\) at .*" gdb_test_no_output "set filename-display absolute" verbose -log "expect: ${absolute}" - gdb_test "frame" "#0 $func \\(\\) at [string_to_regexp ${absolute}]:999" "absolute" + gdb_test "frame" " in $func \\(\\) at [string_to_regexp ${absolute}]:999" "absolute" gdb_test_no_output "set filename-display basename" verbose -log "expect: [file tail $filename]" - gdb_test "frame" "#0 $func \\(\\) at [string_to_regexp [file tail $filename]]:999" "basename" + gdb_test "frame" " in $func \\(\\) at [string_to_regexp [file tail $filename]]:999" "basename" gdb_test_no_output "set filename-display relative" verbose -log "expect: $filename" - gdb_test "frame" "#0 $func \\(\\) at [string_to_regexp $filename]:999" "relative" + gdb_test "frame" " in $func \\(\\) at [string_to_regexp $filename]:999" "relative" } } diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 17523f82996..2f1147159ad 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -787,14 +787,9 @@ proc gdb_continue_to_breakpoint {name {location_pattern .*}} { global gdb_prompt set full_name "continue to breakpoint: $name" - set re_at_in " (at|in) " - if { [regexp $re_at_in $location_pattern] } { - set re_at_in " " - } - set kfail_pattern "Process record does not support instruction 0xfae64 at.*" gdb_test_multiple "continue" $full_name { - -re "(?:Breakpoint|Temporary breakpoint) .*$re_at_in$location_pattern\r\n$gdb_prompt $" { + -re "(?:Breakpoint|Temporary breakpoint) .* (at|in) $location_pattern\r\n$gdb_prompt $" { pass $full_name } -re "\[\r\n\]*(?:$kfail_pattern)\[\r\n\]+$gdb_prompt $" { -- 2.35.3