From patchwork Thu Oct 17 17:56:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinevere Larsen X-Patchwork-Id: 99098 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 174043858404 for ; Thu, 17 Oct 2024 18:02:13 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 12ECE3858431 for ; Thu, 17 Oct 2024 18:01:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 12ECE3858431 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 12ECE3858431 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729188109; cv=none; b=Kn90FtHaoj7znY6Ab8f3Uv3cL88UHgTXZN5O22nu03GbzHQjqYXXsRV6vETJnrg8+0mwQiku0vT4kcO22tk29VdhDtoy9n63G/K+6w4W+g0nWyDTyARyO0PrfVIPzRn3sFyi2A3bs+KMhHqwmHzs3fZmqKv7oZs1MdjzmZfOwEk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729188109; c=relaxed/simple; bh=Saa/iRTWNfticbnaBvnySoCUknAZT81qCH11Jq1kjgA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=qbKVIZ4hvBWBefa1OqTfJ1/YayjK9hJJEkwOf0vhSvTS69uH/zUYX87LmHc8fYtHbedKy7jU1/So6fGPMEXP04s/beCqR+20g+xRXz3kZBji0dZp0mPCixz2r9+3Ob74BewfvnEoqmUw77B7GHq0THB6g7yAsyhX7YPS8ghxd0U= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729188107; 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=tKhkxF0aXgdy4tGGM0aG+v/Hu14MbajtC1M2cPwUByM=; b=RngiXhHIycHqsiX7HzjhVDAHlBKZNPrhMqVDL1Coxl7lH8VjrO75Wd+aoUi3HbAYjg3jgQ trWaMnfF9jur7HIcxxLgT57Sxb1GPeYz0PkXkd36F9eBgJ6dPaheoqyCuSFo5XHLA0bBFD DPBnSyEPt5wcL509VlWPfRaJygUFbNE= Received: from mx-prod-mc-05.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-376-BmIWZ-EiMRe0XuF7KC-PmQ-1; Thu, 17 Oct 2024 14:01:46 -0400 X-MC-Unique: BmIWZ-EiMRe0XuF7KC-PmQ-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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C042F195608A for ; Thu, 17 Oct 2024 18:01:45 +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 435791956086; Thu, 17 Oct 2024 18:01:44 +0000 (UTC) From: Guinevere Larsen To: gdb-patches@sourceware.org Cc: Guinevere Larsen Subject: [PATCH v3 2/3] gdb/testsuite: ask for DWARF5 in gdb.cp/pass-by-ref.exp Date: Thu, 17 Oct 2024 14:56:22 -0300 Message-ID: <20241017175620.5876-6-guinevere@redhat.com> In-Reply-To: <20241017175620.5876-2-guinevere@redhat.com> References: <20241017175620.5876-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 X-Spam-Status: No, score=-9.7 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org Some test from gdb.cp/pass-by-ref.exp rely on the attributes DW_AT_deleted and DW_AT_defaulted, which were only added in DWARF 5. However, it seems that GCC emits those attributes since version 7, no matter the requested DWARF version. Clang, on the other hand, only produces those attributes if it emits DWARF5, which is the default on newer clangs, and notably in the fedora version used by buildbot. Thhis patch updates the code setting up an XFAIL so that, instead of setting it up for all clangs used, it only does so if clang is NOT using dwarf 5. Reviewed-by: Keith Seitz --- 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..503e67b34c8 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 || ($is_clang && !$::using_dwarf5))} { setup_xfail "*-*-*" } gdb_test "print ${cbvfun}<$name> (${name}_var)" \