From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] [gdb] Simplify frame_follow_static_link
Date: Thu, 23 Apr 2026 10:23:09 -0600 [thread overview]
Message-ID: <87o6j9prwy.fsf@tromey.com> (raw)
In-Reply-To: <20260421122139.243506-1-tdevries@suse.de> (Tom de Vries's message of "Tue, 21 Apr 2026 14:21:39 +0200")
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
Tom> diff --git a/gdb/frame.c b/gdb/frame.c
Tom> index 7a83f5e61c0..61d37316c6a 100644
Tom> --- a/gdb/frame.c
Tom> +++ b/gdb/frame.c
Tom> @@ -3241,8 +3241,6 @@ frame_follow_static_link (const frame_info_ptr &initial_frame)
Tom> if (frame_block == nullptr)
Tom> return {};
Tom> - frame_block = frame_block->function_block ();
Tom> -
Tom> const struct dynamic_prop *static_link = frame_block->static_link ();
Tom> if (static_link == nullptr)
Tom> return {};
There's nothing wrong with this patch, but I have a patch in development
that extends frame_follow_static_link and that will need the function
block at this point.
Lowering this call into the block method will end up making things
slightly less efficient. So I'd prefer this not go in, as I'll end up
at least having to essentially undo this hunk.
Maybe a different approach would be to change block::static_link to
document that this is only valid for function-having blocks and add an
assert to that effect in the implementation.
thanks,
Tom
next prev parent reply other threads:[~2026-04-23 16:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-21 12:21 Tom de Vries
2026-04-23 16:23 ` Tom Tromey [this message]
2026-04-23 16:35 ` Tom Tromey
2026-04-24 7:22 ` Tom de Vries
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=87o6j9prwy.fsf@tromey.com \
--to=tom@tromey.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