From: Andrew Burgess <aburgess@redhat.com>
To: Simon Marchi <simark@simark.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCHv2 2/2] gdb: convert sentinel_frame to a frame_info_ptr
Date: Tue, 23 Jun 2026 11:55:15 +0100 [thread overview]
Message-ID: <87qzlxo7ak.fsf@redhat.com> (raw)
In-Reply-To: <5da0dcef-b250-4c06-b97c-e288e1c28e11@simark.ca>
Simon Marchi <simark@simark.ca> writes:
> On 6/22/26 5:33 PM, Andrew Burgess wrote:
>> @@ -1726,12 +1763,12 @@ get_current_frame (void)
>> if (get_traceframe_number () < 0)
>> validate_registers_access ();
>>
>> - if (sentinel_frame == NULL)
>> - sentinel_frame =
>> - create_sentinel_frame (current_program_space,
>> - current_inferior ()->aspace.get (),
>> - get_thread_regcache (inferior_thread ()),
>> - 0, 0).get ();
>> + if (sentinel_frame == nullptr)
>
> While this works, in the previous patch you have used ".is_null ()".
> I'm pointing it out in case you want to change it, but otherwise it
> doesn't bother me too much.
I actually realised about an hour after posting these patches that my
choice to use is_null was weird. We mostly compare frame_info_ptr
objects to nullptr throughout GDB, treating them as if they actually
were pointers. I plan to update the previous patch to use comparison to
nullptr before pushing as I think that is far more common throughout
GDB.
Thanks,
Andrew
>
> Otherwise LGTM.
>
> Approved-By: Simon Marchi <simon.marchi@efficios.com>
>
> Simon
prev parent reply other threads:[~2026-06-23 10:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-18 17:00 [PATCH] gdb: return raw frame_info pointer from create_sentinel_frame Andrew Burgess
2026-06-18 17:25 ` Simon Marchi
2026-06-18 17:27 ` Tom Tromey
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 [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=87qzlxo7ak.fsf@redhat.com \
--to=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
/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