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.133.124]) by sourceware.org (Postfix) with ESMTPS id 91E22384AB67 for ; Thu, 2 May 2024 18:26:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 91E22384AB67 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 91E22384AB67 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=1714674382; cv=none; b=cyffM65xUx/E5d4eQYRLj4NRXvbomeRwEYkgvafudeY27uctfDbQ2ZGwSI3/VFavr0/j2K1RD31VxZkciOcJk8lSWH0rueNBNwlhB0cGAWZGhiNvuuujz5xKivPGW/oVTxs7hMSQadRBMvkHQAG9J+9rtJE53D0AOuM8lKbJQoU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714674382; c=relaxed/simple; bh=YJPyPS0UlSfU6sc0JRiih95Z4ry3YJKTmtDUc42zFd4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=VI2IrTNWiFJDomwE5eFAVrldCcsmzPdOhvqy0ybRanyMdvfInLyK4IXWvQxcAgAHNVEr6IcX0/UhDLqZEju/Z1iCOZEh2n2X6/l1TW+u8fyyxcewSgQx3zFOmGU3W3ww1Ve/v0f/70nkixs6zpid7UG525C3clbxlvgSFet1HD8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714674380; 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=8E5IiKCW7vh1YxZlFO+B2N57OApwgcwkfkvUZnct96c=; b=YfNqw82Ijf87W3NNHPUoPQKqKBHkvJ0cI1pDjZ8mYNtjOrmc2zVi1k9tHEtRsvvOKWnDoK Pc4C0l/i1H0r14Bus8mmNu51WitM+s4sjhLX8yh5GgD/DJOXJf7ZygiiCDSYh7xcmfnUyn wy2Ca4En116QAol0J+byARTEE6oiGGY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-628-Twiaq-IZOh272esA9cKWuw-1; Thu, 02 May 2024 14:26:17 -0400 X-MC-Unique: Twiaq-IZOh272esA9cKWuw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4343680E95D for ; Thu, 2 May 2024 18:26:17 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.96.134.128]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 88412492BC7; Thu, 2 May 2024 18:26:16 +0000 (UTC) From: Guinevere Larsen To: gdb-patches@sourceware.org Cc: Guinevere Larsen Subject: [PATCH 2/3] gdb/testsuite: ask for DWARF5 in gdb.cp/pass-by-ref.exp Date: Thu, 2 May 2024 15:25:48 -0300 Message-ID: <20240502182549.1607075-3-blarsen@redhat.com> In-Reply-To: <20240502182549.1607075-1-blarsen@redhat.com> References: <20240502182549.1607075-1-blarsen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 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=-12.2 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_H4,RCVD_IN_MSPIKE_WL,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: 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 7b2a6196c50..69437e9799c 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.44.0