From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id iTj6OnmuPmoNdxkAWB0awg (envelope-from ) for ; Fri, 26 Jun 2026 12:53:13 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=N83Ualdf; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id EB8091E098; Fri, 26 Jun 2026 12:53:13 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 477D81E024 for ; Fri, 26 Jun 2026 12:53:13 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 96AAB4BA2E28 for ; Fri, 26 Jun 2026 16:53:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 96AAB4BA2E28 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=N83Ualdf Received: from mail-oa1-x2b.google.com (mail-oa1-x2b.google.com [IPv6:2001:4860:4864:20::2b]) by sourceware.org (Postfix) with ESMTPS id 338EF4BA2E07 for ; Fri, 26 Jun 2026 16:52:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 338EF4BA2E07 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 338EF4BA2E07 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2001:4860:4864:20::2b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1782492767; cv=none; b=sCfopOcY1a+nZxZs3o42+RamSCopPT6DdKY0zpn1vImOeuNqj6VvCjOA4qApew3y0Wyf1Ey0++5a8wxXFy43jR72hcq2UHkaemSMDcBR0gqgXNK4/N/RZz90F4oaMMs20L78Z7tli9RJLFhmoeoCqGrhn/Tr0gmGEcXHy4kgfTg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1782492767; c=relaxed/simple; bh=BexsjowrV34PezJa/osLzNDyCD4VzNJzja3GObeYoo4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=It+XZu/hSAFeAXAu2ees/4K3sSmTDmm0bThSZtIlssuORi3lE48yrvD1anAdhDO17pO2IzgCuZFIQzGp5B2wghKGlpqL1HGIplckjIWoLmVq0/UasaW8G1bH237hynqsmT7txcQ1hg4vL8lkj7uzpWSgerK41tEFEfk5Fkb78k8= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=N83Ualdf DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 338EF4BA2E07 Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-43bf9548df4so797159fac.0 for ; Fri, 26 Jun 2026 09:52:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1782492766; x=1783097566; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=EQJHFCOdqs7Nk5jkHTNXkpIb82Dnop41pcDVDeTNCq0=; b=N83Ualdf3bgMkEkoUG57fCu/2dCy277f0QNL7Zno2leG0nWJDL1ryzwNr1SsJMnRs5 xZnC+Nng5ZEUHGg82epbMWirkNLQBWx9b7fucn13IROAzexsGhonVesrkdEQfKG3To8x P61wEXvtmOC+XNEd4fWFWapJPqQWjlCZE9VvxkveyXikkxgXAF6MNBdG+oDhiZQwoCIN Yx+jW/qfeqsvOkH0lBcbIJqL5ZA4c4wviWADsj2vFkkkSpqdRXbRjNMPSi1gtIVCUtPk Zg32ur5XEQZB/erMgLGC6cSji/MLcNjEDUrtoJOstIr997p5Drgrn7DoI1xzv7PH4bo7 lHWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782492766; x=1783097566; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=EQJHFCOdqs7Nk5jkHTNXkpIb82Dnop41pcDVDeTNCq0=; b=OF7lWUdjJ3JlFIvv/Zsms7pMlB2RzFHnqH0wS+syRmsvA/E8pLh5lC1ujb9+BtPMrk HTlk6xUK4zIczPz5Tccu8Iq8N8cqbh93Wuq9E4pUA7iDSxpOlokXn9iC0UmvTOW8CtiD eAS4J+kSJ3sdh6JxX1iqAbjcfrbi9AsDLL4/D7T/pU5++kG+RKSkvQpRVQKj0HIrZ4os eOFZI4N7TlR2BVNmL5WZGgnf7hSX1MXE9W20CeM9BTwMrWddW3bZi7ccbbVxW4O4eoe7 gjcVApxHZfvlONlfW/K4RAGzo3FyTuXt3RkIRD3N1nyWtmKsjKwx0gQFw4Hu3EDR5DKq CbuQ== X-Gm-Message-State: AOJu0YwEjfSQHERMBrQkGi1p/TUqGnw+6Qow9rj9xZb9LcBIVTqaXXxE 5vkK2wucm4e/TWfpd2KAQaRMvSFyVtl0SnPF6jC6CR9qmwigGNX0D70CEOAzbPuwWuBNYaY8ndP 36AU= X-Gm-Gg: AfdE7cn8cOKqCOBeGwvVC2M7QlG/Y28/+jwZNalfj5/TQMkHVoLQPEIhn6nU63D0o3h mAOPqAaNcmF+xMSDYrWWSKGYu0dspfZOme4yq9mMhURePuJmrZEJTwE8DOp0A9qkOaCMz1hHdiJ MCsjhTyd7P/WQpojEeSb68P3k+pTiBiIxi24z75vmpiJvILE70L84UWGVf61gqjGEKpi6mBkbHg zF6a+Zu7m8ESYCZWGlpzLHxzxehclglk21kq9PMOktuIMqvjfffQM/KHcLgVkQB2laK8W1vFk4n 3RX3DJLND70ML8hsnaYnNhkiRnRiySPiolYEnCSEqMOZHUlK5Q9yuXVnClWt5oZ/rlwGFlmYrW8 nGPjYZg8/2XjSML1Nfya1mAJ5c8HAE5KJugzkTatqdM5jN0pa1xIHmZFBFKGfASXgDko0yM89rU F61pTpLa5n3ECreIj5jFQnoEJfhCFMxYp0bgH1RB+ht3w= X-Received: by 2002:a05:6871:c08c:b0:448:4426:cb05 with SMTP id 586e51a60fabf-4484426f6bfmr820987fac.18.1782492766430; Fri, 26 Jun 2026 09:52:46 -0700 (PDT) Received: from bapiya (75-166-225-82.hlrn.qwest.net. [75.166.225.82]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-4472ecd3de2sm16186148fac.8.2026.06.26.09.52.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2026 09:52:45 -0700 (PDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [pushed] Disable gdb.ada/dgopt.exp with gnat-llvm Date: Fri, 26 Jun 2026 10:52:43 -0600 Message-ID: <20260626165243.1865725-1-tromey@adacore.com> X-Mailer: git-send-email 2.54.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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~public-inbox=simark.ca@sourceware.org gdb.ada/dgopt.exp fails with gnat-llvm. Looking into it, it turns out that this test case relies on a bug in GNAT. In particular, despite the use of -gnatDG, GNAT will still put a reference to "x.adb" into both the DWARF .debug_info and into the line table. The test relies on this, because the original problem being fixed here is that, when the test was written, there was a bug causing these references to be dropped when writing .debug_names. gnat-llvm does not have this same bug -- it only emits references to x.adb.dg. This patch disables this test for gnat-llvm. There's not really a good way to tell that gnatmake is llvm-based, so while I've added a new caching proc for this, it is just a proxy for an existing proc. Since this only affects gnat-llvm, and was discussed internally, I am going to check it in. --- gdb/testsuite/gdb.ada/dgopt.exp | 8 ++++++++ gdb/testsuite/lib/ada.exp | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/gdb/testsuite/gdb.ada/dgopt.exp b/gdb/testsuite/gdb.ada/dgopt.exp index 9e8e8a676a8..831aa053f36 100644 --- a/gdb/testsuite/gdb.ada/dgopt.exp +++ b/gdb/testsuite/gdb.ada/dgopt.exp @@ -19,6 +19,14 @@ load_lib "ada.exp" require allow_ada_tests +# Despite appearances, this is not really an "Ada" test -- instead the +# scenario here is that GNAT ends up putting one reference to x.adb +# into the DWARF (whereas it mostly refers to x.adb.dg); and this +# reference was being incorrectly omitted from .debug_names. +# gnat-llvm does not have this bug, so the test does not make sense +# there. +require !using_gnat_llvm + standard_ada_testfile x if {[gdb_compile_ada "${srcfile}" "${binfile}" executable \ diff --git a/gdb/testsuite/lib/ada.exp b/gdb/testsuite/lib/ada.exp index 8c9821bb897..e20b35c8ebe 100644 --- a/gdb/testsuite/lib/ada.exp +++ b/gdb/testsuite/lib/ada.exp @@ -292,6 +292,14 @@ gdb_caching_proc ada_minimal_encodings {} { additional_flags=-fgnat-encodings=minimal] } +# Return 1 if GNAT is based on LLVM. +gdb_caching_proc using_gnat_llvm {} { + # Whether or not gnatmake will use LLVM can't be determined from + # the command line -- e.g., --version doesn't provide any + # indication. So for now use a proxy. + return [expr {![ada_minimal_encodings]}] +} + # Return 1 if GNAT supports -Og. gdb_caching_proc ada_og {} { return [ada_simple_compile gnat_og additional_flags=-Og] base-commit: 108db853326a1335fadb6d0ad9955dd7714b1ce1 -- 2.54.0