From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id MelEKU8hNGruyA0AWB0awg (envelope-from ) for ; Thu, 18 Jun 2026 12:48:15 -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=ZUNZlX0M; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 9D2221E098; Thu, 18 Jun 2026 12:48:15 -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 115ED1E070 for ; Thu, 18 Jun 2026 12:48:15 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3AD194BA2E36 for ; Thu, 18 Jun 2026 16:48:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3AD194BA2E36 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=ZUNZlX0M Received: from mail-oa1-x35.google.com (mail-oa1-x35.google.com [IPv6:2001:4860:4864:20::35]) by sourceware.org (Postfix) with ESMTPS id BE41F4BA5436 for ; Thu, 18 Jun 2026 16:47:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BE41F4BA5436 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 BE41F4BA5436 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2001:4860:4864:20::35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1781801269; cv=none; b=J4swomqBrGhd/1pPFrg4BhtSkvqN9mOLUHnjyL/oa2ob2+3c3gt1YQozJFsz2thn9gVJtQgeojKMVGKWF3XjKHjjNJbD30qAh8TNF4mODXMHBVZ9+6u9FgBlRKvfbbN5Lf/6SeOEcx3Uqa6cMIGq4NA3j2osQu4Qo0bJk1StmGA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1781801269; c=relaxed/simple; bh=zBfOglnCcxafTsT8bVRIbQuHlgK5zrAcIP8CUXTO/3U=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ZtNrpWDhhhu5lY+2rme9xD/4ZiS626tOc0jRCPgep/3lJDpjWejGz2pyNoJoeK0MCpE5LGWh018XOj2KIGUyb9P1JqZ1VzLF/RxVpxu9Q2u0/WLKwttAlyuvGsQDEFmS8MfXLwaGM0SHaOEk9aBKBcWnDuz0X9b9+WuNtn7BMZ4= 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=ZUNZlX0M DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE41F4BA5436 Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-447046c980aso199182fac.1 for ; Thu, 18 Jun 2026 09:47:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1781801269; x=1782406069; darn=sourceware.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=5HkgThFfb4zdu5pGJymkDnPc1HhLW+Uy17BhgnIYcWs=; b=ZUNZlX0Mjmax906SNliXLGcjzN4xDwUfGvA2riPDygIlW/GbZ3R4R5XYaBcgJ6uLGq HRmQryURpsxfxs+CXC+I8rtOF48dOdzvgJlV7fsJWX1S7RzWBhkyezuz0l/+3W+yt2rk 0JMh2Xafoyc0Xvx9zzymiqsYiQ6rCeAQLEtw7/+Ya75y6kzFrqsT+pwc0EtHkCHV678t bB10Up4PrEZG23DJG08mihRE4HvSweX0y6gCPP3lC0zVqh+FKt5LJfFHiALX8hL5nPWx U0lj6yLern0Q57Ej7jh84ci1LoLQTdc7MSxDD66tqKcQwzE6zCBG96Hg4soUiDQCY+QA PnDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781801269; x=1782406069; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=5HkgThFfb4zdu5pGJymkDnPc1HhLW+Uy17BhgnIYcWs=; b=hgmJYldp4WeemeBZHZyIvMhbO7DjuIdeAgnjDSgVk1NZkjtlxSF61x0M0zfsirztf5 0hFYu34MWA0Wb99uHmkHs9V05DtaSFdkGyPPQh5MwUA54QbODKtzqqsyzu43sPiiQLdY BIdzk6/hfUqfJTxfe/o4ksUphhg9vdEllxuB03MENVmYdKqUT/llJcyNj6usc9MirqQ3 7WkltDmIlExU5or7m4fYH8F8db6erFClto4ny3gwUQEgADjb70V2i6nEm+Av1h54Mx7m crsLTny1PI+vQ3InBSqOgKvg3/e+59rUuuVsPu1M0+f6Ay6CH0mgrfXYtujiRTrZGMIw 3RtA== X-Gm-Message-State: AOJu0Yx/YQjGVT/s05qBp9TndynRMb7QYtD1skeS1szq3etepUbuFISb t1WPWJkzZQshRFElFYyY+BSF0hswqUEQk5awhhK6piFBBsupybzErXr1ePy1SivUvCBDY7NOqAs 4atY= X-Gm-Gg: AfdE7cm01NLIXRcAt5qZcN5yIIsPWE5j72EAiCaxxYArdVH3myQ70XPmyrJh/Ogcr2C LfBuiYgo8UbGnRE5q6Zd7T4FM5+xqdIhuFrEtAKNECFdLbjLdTuHHACe3lphcsJSSJAyWSUbyAH AcM3DPr9lezBLA5MynF8RtJMnVDTg+g1thccTTibKSEKVm0XMpqAA98GaWJVHwcskq0eby9N7z1 9ROiytTbcxwgt3lXo8PBnzXvUKufHu7RYAPk8IwaAeD7aFH5ende4exrCSuG63psHJVcf2u2k5u KREbQXM77T7MF6fwbiBFLNUgEu7SLsCDOLcqyHxBDwk5uXh1PC1kdiAPbSzWAgJiKY6UPH40gJ+ HDKYnzIVSOegwdqZ7op30KJNdr8yHqxu4wC1xmM2/P9zQdS+WSVgzdL6EfiRHmjAujXOwWj94AY Vf0uouVZL5mFLcMk5f9PHN4nFSL0pvunP0 X-Received: by 2002:a05:6808:398c:b0:484:afc2:eee3 with SMTP id 5614622812f47-4896a9ff383mr264925b6e.5.1781801269025; Thu, 18 Jun 2026 09:47:49 -0700 (PDT) Received: from bapiya (75-166-225-82.hlrn.qwest.net. [75.166.225.82]) by smtp.gmail.com with ESMTPSA id 5614622812f47-4875dfb2d32sm8340619b6e.15.2026.06.18.09.47.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2026 09:47:48 -0700 (PDT) From: Tom Tromey To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Handle nested Ada functions with gnat-llvm In-Reply-To: <20260423191041.2665677-1-tromey@adacore.com> (Tom Tromey's message of "Thu, 23 Apr 2026 13:10:41 -0600") References: <20260423191041.2665677-1-tromey@adacore.com> X-Attribution: Tom Date: Thu, 18 Jun 2026 10:47:47 -0600 Message-ID: <87ik7f4wy4.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain 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 >>>>> "Tom" == Tom Tromey writes: Tom> In Ada, a nested function can refer to variables in lexically Tom> enclosing outer scopes. Ordinarily this is implemented in DWARF using Tom> DW_AT_static_link, so that the correct outer function invocation can Tom> be found from the nested function. Tom> However, LLVM does not implement the DWARF DW_AT_static_link feature, Tom> so this approach isn't possible. Tom> gnat-llvm, though, implements "unnesting" manually, passing an Tom> activation record parameter to nested functions. This activation Tom> record can be used to find the correct outer frame. Tom> This patch adds a new language method to enable this. A new test case Tom> is included; this test will fail if the static link or some similar Tom> feature is not implemented (i.e., a naive unwind looking for the next Tom> instance of the outer function will fail). Ping. Tom