From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: return raw frame_info pointer from create_sentinel_frame
Date: Thu, 18 Jun 2026 11:27:42 -0600 [thread overview]
Message-ID: <871pe34v3l.fsf@tromey.com> (raw)
In-Reply-To: <f250af3c43a034f843afcb96488afa5df5cc75ad.1781802041.git.aburgess@redhat.com> (Andrew Burgess's message of "Thu, 18 Jun 2026 18:00:55 +0100")
>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
Andrew> The create_sentinel_frame function is static within frame.c and
Andrew> currently returns a frame_info_ptr. The frame_info_ptr is created at
Andrew> the last moment, as part of the 'return' statement.
FWIW the frame_info_ptr transition was mostly scripted, and so this spot
probably wasn't considered at all at the time.
Andrew> This patch changes create_sentinel_frame to return a raw frame_info
Andrew> pointer, which is what the callers actually want, and avoids the
Andrew> unnecessary creation and destruction of a frame_info_ptr object.
This seems totally fine to me. Really frame_info_ptr exists to avoid
the frame_info invalidation problem. But that isn't an issue here.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
next prev parent reply other threads:[~2026-06-18 17:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-18 17:00 Andrew Burgess
2026-06-18 17:25 ` Simon Marchi
2026-06-18 17:27 ` Tom Tromey [this message]
2026-06-22 21:33 ` [PATCHv2 0/2] Some sentinel frame related cleanup in frame.c Andrew Burgess
2026-06-22 21:33 ` [PATCHv2 1/2] gdb: remove sentinel frame check in frame_find_by_id Andrew Burgess
2026-06-23 2:18 ` Simon Marchi
2026-06-23 10:52 ` Andrew Burgess
2026-06-22 21:33 ` [PATCHv2 2/2] gdb: convert sentinel_frame to a frame_info_ptr Andrew Burgess
2026-06-23 2:23 ` Simon Marchi
2026-06-23 10:55 ` Andrew Burgess
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=871pe34v3l.fsf@tromey.com \
--to=tom@tromey.com \
--cc=aburgess@redhat.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