From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 72FFE3858D26 for ; Tue, 15 Oct 2024 14:40:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 72FFE3858D26 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 72FFE3858D26 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729003258; cv=none; b=V6k9+kDrA4ss1aEZAp3F4oUzfWIZej0iGYRu1ky1dXxH5w7Fwysge18pKDFtYpL2DaqY8jJ9FQ5RDyFg4zu8+NU6sXLP6HUFB8GLim1TbHqegx8trIgQ1EPf/XcTmMBo8C+02/kOwiKXyRTF/pkILyXIrXmHm0crZBENBfKDTMg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729003258; c=relaxed/simple; bh=is9y2YVl5nNOSxJ665NzL0Fdpj61unIthymnGQ5I8tM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=OvDysglgBl9BVsgR9ORza3HWrWn20kJJgeoFScTFtkg03rWF4yKY4gYGaE77lNv2Y1l95puw4xu4Xrnr9+/7GnRLIMXfL5SSWrhj6ZahQdYhIRqH9gDASo/HL17UNj8OBKx1cf6caDf9MNrrg2dPfeUc0bXQbZ+1dyjzP/t+7PU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729003252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8/A1v2Mp/V/umfYC3y17uF9fHqPEHu1zwmqOTWaO0U8=; b=FgKQsdjbPt/anHQ/1nJucC8wKxoXLOtOWn7rjpvLOsfygpcrU4NeeZWOQJj1KUu/SOXZvC ZaS8C769pUGh57fZPpqyNoplw1RR56gtPd9A9poV1mP9Krq+lpL1Laix54oLOpakX7lblJ iDtKDDXDr4l5FpsWLs/Bzjpm+jOt8Z8= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-643-lXvqYGjFNNS9TZwtof-F_g-1; Tue, 15 Oct 2024 10:40:51 -0400 X-MC-Unique: lXvqYGjFNNS9TZwtof-F_g-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (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 mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4AA741955D92 for ; Tue, 15 Oct 2024 14:40:50 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.96.134.67]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 35BAC1955F45; Tue, 15 Oct 2024 14:40:48 +0000 (UTC) From: Guinevere Larsen To: gdb-patches@sourceware.org Cc: Guinevere Larsen Subject: [PATCH v2 2/3] gdb/testsuite: ask for DWARF5 in gdb.cp/pass-by-ref.exp Date: Tue, 15 Oct 2024 11:38:47 -0300 Message-ID: <20241015143847.1694961-4-guinevere@redhat.com> In-Reply-To: <20241015143847.1694961-2-guinevere@redhat.com> References: <20241015143847.1694961-2-guinevere@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_NONE,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: From: Guinevere Larsen The test gdb.cp/pass-by-ref.exp relies on some DWARF attributes that were only added in version 5. Some compilers (notably clang on fedoras older than 40) default to using DWARF4, which is why there are many XFAILs in the output. However, clang is able to emit dwarf5, and will start doing so as the default in fedora 40 (which is what the buildbot is using) causing 80 XPASSes to be emitted. This patch identifies which debug version is being produced by the compiler, and only sets up the XFAIL if DWARF5 is not used. --- gdb/testsuite/gdb.cp/pass-by-ref.exp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.cp/pass-by-ref.exp b/gdb/testsuite/gdb.cp/pass-by-ref.exp index a1f1df4f3e7..b38098c916c 100644 --- a/gdb/testsuite/gdb.cp/pass-by-ref.exp +++ b/gdb/testsuite/gdb.cp/pass-by-ref.exp @@ -343,6 +343,9 @@ if {![runto_main]} { return -1 } +get_debug_format +set using_dwarf5 [test_debug_format "DWARF 5"] + set bp_location [gdb_get_line_number "stop here"] gdb_breakpoint $bp_location gdb_continue_to_breakpoint "end of main" ".*return .*;" @@ -412,7 +415,8 @@ proc test_for_class { prefix states cbvfun data_field length} { "destructor should be called" } } else { - if {$cctor == "deleted" && ($is_gcc_6_or_older || $is_clang)} { + if {$cctor == "deleted" + && ($is_gcc_6_or_older || !$::using_dwarf5)} { setup_xfail "*-*-*" } gdb_test "print ${cbvfun}<$name> (${name}_var)" \ -- 2.47.0