public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tom@tromey.com>
Cc: Simon Marchi <simon.marchi@efficios.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 7/9] gdb: remove VALUE_NEXT_FRAME_ID, add value::next_frame_id
Date: Sun, 24 Dec 2023 10:35:53 -0500	[thread overview]
Message-ID: <656d2c7c-a694-447d-95b0-5bc96beaafb8@simark.ca> (raw)
In-Reply-To: <8d9712c7-a722-4b57-b9e5-10beb57f4653@simark.ca>



On 2023-12-22 12:06, Simon Marchi wrote:
> 
> 
> On 2023-12-22 12:02, Tom Tromey wrote:
>>>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
>>
>> Simon> I'm not sure I understand, which function do you think should return a
>> Simon> frame_info_ptr?
>>
>> value::next_frame_id (though also with a new name).
>>
>> value::fetch_lazy_register can just access the frame_id directly if it
>> really needs to.
>>
>> I don't feel super strongly about this.
> 
> Ah ok I see.  Well, even value::fetch_lazy_register does call
> frame_find_by_id, so I guess it would make sense, it wouldn't be a
> pessimization.

So, there's one call in fetch_lazy_register that just wants the frame
id, the call on `new_val`.  So I will leave it as is for now.

I had the idea of making it so that value::m_location stores a
frame_info_ptr to the next frame, instead of a frame id.  Now that frame
infos are reinflatable, it should be safe to do so.  And then we could
return a frame_info_ptr at no additional cost.  But a first step
would probably be to convert the m_location union to a variant, because
we need the frame_info_ptr ctor and dtor to be called.

Simon

  reply	other threads:[~2023-12-24 15:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-21 19:16 [PATCH 0/9] Some register value cleanups Simon Marchi
2023-12-21 19:16 ` [PATCH 1/9] gdb: don't set frame id after calling cooked_read_value Simon Marchi
2023-12-21 19:16 ` [PATCH 2/9] gdb: pass frame_info_ptr to gdbarch_value_from_register Simon Marchi
2023-12-22 16:40   ` Tom Tromey
2023-12-22 16:53     ` Simon Marchi
2023-12-22 16:56       ` Tom Tromey
2023-12-21 19:16 ` [PATCH 3/9] gdb: pass non-nullptr frame to gdbarch_value_from_register in address_from_register Simon Marchi
2023-12-21 19:16 ` [PATCH 4/9] gdb: add type parameter to value::allocate_register and add value::allocate_register_lazy Simon Marchi
2023-12-21 19:16 ` [PATCH 5/9] gdb: remove read_frame_register_value's frame parameter Simon Marchi
2023-12-21 19:16 ` [PATCH 6/9] gdb: implement address_from_register using value_from_register Simon Marchi
2023-12-21 19:16 ` [PATCH 7/9] gdb: remove VALUE_NEXT_FRAME_ID, add value::next_frame_id Simon Marchi
2023-12-22 16:51   ` Tom Tromey
2023-12-22 16:56     ` Simon Marchi
2023-12-22 17:02       ` Tom Tromey
2023-12-22 17:06         ` Simon Marchi
2023-12-24 15:35           ` Simon Marchi [this message]
2023-12-21 19:16 ` [PATCH 8/9] gdb: remove VALUE_REGNUM, add value::regnum Simon Marchi
2023-12-22 16:52   ` Tom Tromey
2023-12-22 16:57     ` Simon Marchi
2023-12-21 19:16 ` [PATCH 9/9] gdb: make value::allocate_register_lazy store id of next non-inline frame Simon Marchi
2023-12-22 16:53 ` [PATCH 0/9] Some register value cleanups Tom Tromey
2023-12-22 16:58   ` Simon Marchi
2023-12-22 17:02     ` Tom Tromey
2023-12-24 18:28       ` Simon Marchi

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=656d2c7c-a694-447d-95b0-5bc96beaafb8@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.com \
    --cc=tom@tromey.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).