From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id GYX2KvClPmqebhkAWB0awg (envelope-from ) for ; Fri, 26 Jun 2026 12:16:48 -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=cqaQTCDk; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id ACD2F1E024; Fri, 26 Jun 2026 12:16:48 -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,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 7B0691E024 for ; Fri, 26 Jun 2026 12:16:47 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3C01D4BA2E21 for ; Fri, 26 Jun 2026 16:16:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C01D4BA2E21 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=cqaQTCDk Received: from mail-ot1-x32f.google.com (mail-ot1-x32f.google.com [IPv6:2607:f8b0:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id 458774BA2E23 for ; Fri, 26 Jun 2026 16:16:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 458774BA2E23 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 458774BA2E23 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::32f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1782490582; cv=none; b=IC1PPB1zJxT6XJR8+kZBHTPTWixkt3oLmaiog9UC1x7k67Zljs0CLzp7B3B3diYmHkZI6EzEA83qVxNTs38kaDA07wKgshH3O0Il9zTH6fSt1Cy6j7wvX2RLom/A3+k43zeOEESmu1QXINX4KTPINOifW4joYJBWrAnG4cZ7QKw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1782490582; c=relaxed/simple; bh=vrD7oQRvB5/801oEm0HC8NCMiBQOjGe6hJ8lZKezn5Q=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Kaapt0gTB/k2Qnrd41UAjOLn88zOi5jBsk2NUUfxZqJko+oDoVqIRYIqbK0uEGDUUbwZiR4fppn7W+7lKiGhbWatJZ12IUaRIreTc+WxxiOzzUhmG8ipraGi5SeJ1/1MlofTEO5y3xUgmZue4SI37Y0JWgRiopndYCVCxS5p0fQ= 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=cqaQTCDk DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 458774BA2E23 Received: by mail-ot1-x32f.google.com with SMTP id 46e09a7af769-7e6e2d54d3dso572580a34.2 for ; Fri, 26 Jun 2026 09:16:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1782490581; x=1783095381; 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=AJu1rndiK8LQiHgsKZxacmvS+V89wsG5upI21r02nL8=; b=cqaQTCDkGRGP9Oy5lN+k8rzaY7x3kKdQ2ZsICw1Jjj0Zq2oe7dPrrBxmNcZ5Ar90fl H1Clf6iL6PwMo5x21lqMU/+9xchJPgMZNIoXrEkKfHfGqpp2syvNwK/La5sS3wwinyNP OMDgPrNdO05P66eUFR6ep/ZOa2YkSxbEuy/P53f1wlb0tQCdoFI6VHxsQoxufw3io/M8 JTS+OQXB9kIIshdwv2Rm+0zdyLaO0PYD/jqQLSpVaS0E+p4h22SKOL9GhSYH6SEEdgEq ybIOJKMAHU67A7YSQc3gLxQ4WB+ZLPd8REUSwO7MCVFiU4rU3JMDNGgEpXlNh3PhMUWK pcCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782490581; x=1783095381; 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=AJu1rndiK8LQiHgsKZxacmvS+V89wsG5upI21r02nL8=; b=UbhgjwvQAOQdm43IOz4lSswHEpshA3CkzX3CbndFqBweh5m0159dchjzgLtlIYllFT 3LRhaOPNYY4Qp78ApHm93cGtiX8sSzRmLL8bAGT9IH/0J6Q6TIjsDP/30GUwFwD+Hbuf kRT0ckzrypliwEhIBarl4vFxRoFDo0/PLf2MJ+92f+p5topV1bXzd24GtYzjV8zCIodu hs4Rm3RUNZKu+G08vSiht4Pm5lP79lepfoA4khbz3YwQqrKw2abqz47+zHzYaugY7PWt IFubALf9QRxT5J2wkBcd2QJ4qM8ngenvFnY+Ld4169lr2IRE0dPLIOW/jHhihIrlZqiJ B9NQ== X-Forwarded-Encrypted: i=1; AFNElJ9dl1OiQUIoGQ59qIkvl+0h16QvSE7eoC0JYJMcdesCdh3HbT8OXfefEJyMvfcJxbQ3ymaTJP2EpRkooQ==@sourceware.org X-Gm-Message-State: AOJu0Yzc9ZGXlFqsYYStSEuG2ythMrU8PDuN2JyK80zjbajCpJ8+I90Z AuyeBJ5ZrsNr568wmBQTrvqb6zT9mQybmvDag9NCmrO2jc9EJT0IyCP3Tgx1+MZdpA== X-Gm-Gg: AfdE7clVjZQNK6rJIlcVuE2nHDyIoHLbwv/P5nMcg0hMOw09Vdv+G0XveplkyprulZi qGtD3RfiIpm5bbdCUsXJOzncX/s5bv5TCYa1ysSKXv3UzMOr0CkKh3CZRD/SNfT+xy5QELo+nvC 7XwuxSvqrb2TpePBsGFIZ02IknYKDTPOjrOAMFyv+dh/MEAzgjnMUkBDhJh9L8VCHajUWWgNmrW bZwnw16SugAwOhuIrqzcxWJYhwu20eVEQCUyumhqdamDfw6CJitF0RvAGwekgbs/i96/PrFn2/3 Hwm6UUi4j/4PkPYpUh9a7hVtbON1NrdLBqK6xzGwiHSnUr+S6t/voH0z5BgDi2oJPo283PLi1FX xxVFFU2ttJ/jAEO6ZM/9GA0TaZhq/jb/NN0LISDt8cpXLzSn+rGuSDzQRsVgnr4Wm9KulMd6eE1 BtutXW9ppJHqrOkmymllCmF5m+IQ6zSBbfnpX7XaTQOMI= X-Received: by 2002:a05:6830:440d:b0:7e6:d0ef:e5b3 with SMTP id 46e09a7af769-7e9b4f3a0efmr617418a34.14.1782490581545; Fri, 26 Jun 2026 09:16:21 -0700 (PDT) Received: from bapiya (75-166-225-82.hlrn.qwest.net. [75.166.225.82]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-4472ecd3de2sm16094817fac.8.2026.06.26.09.16.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2026 09:16:20 -0700 (PDT) From: Tom Tromey To: Tom de Vries Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH] Handle nested Ada functions with gnat-llvm In-Reply-To: <290cb329-f501-412b-8830-81b43de86c8d@suse.de> (Tom de Vries's message of "Fri, 19 Jun 2026 16:01:29 +0200") References: <20260423191041.2665677-1-tromey@adacore.com> <290cb329-f501-412b-8830-81b43de86c8d@suse.de> X-Attribution: Tom Date: Fri, 26 Jun 2026 10:16:18 -0600 Message-ID: <87se69uvjh.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 de Vries writes: Tom> On 4/23/26 9:10 PM, Tom Tromey wrote: >> In Ada, a nested function can refer to variables in lexically >> enclosing outer scopes. Ordinarily this is implemented in DWARF using >> DW_AT_static_link, so that the correct outer function invocation can >> be found from the nested function. >> However, LLVM does not implement the DWARF DW_AT_static_link >> feature, >> so this approach isn't possible. >> gnat-llvm, though, implements "unnesting" manually, passing an >> activation record parameter to nested functions. This activation >> record can be used to find the correct outer frame. >> This patch adds a new language method to enable this. A new test >> case >> is included; this test will fail if the static link or some similar >> feature is not implemented (i.e., a naive unwind looking for the next >> instance of the outer function will fail). Tom> This looks fine to me. Tom> Reviewed-By: Tom de Vries I'm checking this in. Tom