From: Tom Tromey <tromey@adacore.com>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Handle nested Ada functions with gnat-llvm
Date: Thu, 18 Jun 2026 10:47:47 -0600 [thread overview]
Message-ID: <87ik7f4wy4.fsf@tromey.com> (raw)
In-Reply-To: <20260423191041.2665677-1-tromey@adacore.com> (Tom Tromey's message of "Thu, 23 Apr 2026 13:10:41 -0600")
>>>>> "Tom" == Tom Tromey <tromey@adacore.com> 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
next prev parent reply other threads:[~2026-06-18 16:48 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 [this message]
2026-06-19 14:01 ` Tom de Vries
2026-06-26 16:16 ` Tom Tromey
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=87ik7f4wy4.fsf@tromey.com \
--to=tromey@adacore.com \
--cc=gdb-patches@sourceware.org \
/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