From: Tom Tromey <tromey@adacore.com>
To: Tom de Vries <tdevries@suse.de>
Cc: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Handle nested Ada functions with gnat-llvm
Date: Fri, 26 Jun 2026 10:16:18 -0600 [thread overview]
Message-ID: <87se69uvjh.fsf@tromey.com> (raw)
In-Reply-To: <290cb329-f501-412b-8830-81b43de86c8d@suse.de> (Tom de Vries's message of "Fri, 19 Jun 2026 16:01:29 +0200")
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> 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 <tdevries@suse.de>
I'm checking this in.
Tom
prev parent reply other threads:[~2026-06-26 16:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 19:10 Tom Tromey
2026-06-18 16:47 ` Tom Tromey
2026-06-19 14:01 ` Tom de Vries
2026-06-26 16:16 ` Tom Tromey [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87se69uvjh.fsf@tromey.com \
--to=tromey@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox