Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Guinevere Larsen <guinevere@redhat.com>
To: "Schimpe, Christina" <christina.schimpe@intel.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH v3 5/7] gdb/record: extract the PC to record_full_instruction
Date: Mon, 1 Jun 2026 17:24:51 -0300	[thread overview]
Message-ID: <a6e05588-2f17-42ca-9a46-58cb362f7ad3@redhat.com> (raw)
In-Reply-To: <SN7PR11MB763892FB73F69292CCA6459BF9162@SN7PR11MB7638.namprd11.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 2499 bytes --]

On 5/29/26 9:40 AM, Schimpe, Christina wrote:
>> -----Original Message-----
>> From: Guinevere Larsen<guinevere@redhat.com>
>> Sent: Freitag, 15. Mai 2026 18:37
>> To:gdb-patches@sourceware.org
>> Cc: Guinevere Larsen<guinevere@redhat.com>
>> Subject: [PATCH v3 5/7] gdb/record: extract the PC to record_full_instruction
>>
>> This commit makes it so the PC is not saved as part of the
>> record_full_instruction effects, but rather gets a special location.
>> That is because a couple of commands would really benefit from it being easy
>> to find the PC (especially ones from record-btrace that's haven't been
>> implemented to record-full yet, such as the ones in PR record/18059), while
>> also possibly allowing for one fewer resizing of the effect vector (and saving
>> an entire byte in the process).
>>
>> This commit also refactored record_full_read_entry_from_bfd and
>> record_full_write_entry_to_bfd, to make them methods of
>> record_full_reg_entry and record_full_mem_entry, and also creates similar
>> methods for record_full_entry and record_full_instruction.
>> These could be turned into constructors in a future step of
>> c++ification, but it felt like too much change for a single commit.
>> ---
>>   gdb/record-full.c | 386 ++++++++++++++++++++++++++++------------------
>>   1 file changed, 239 insertions(+), 147 deletions(-)
>>
>> diff --git a/gdb/record-full.c b/gdb/record-full.c index
>> 8cabd6e9438..17696e07c0d 100644
>> --- a/gdb/record-full.c
>> +++ b/gdb/record-full.c
>> @@ -143,6 +143,14 @@ struct record_full_mem_entry
>>
>>     DISABLE_COPY_AND_ASSIGN (record_full_mem_entry);
>>
>> +  /* Create a mem_entry from a bfd file, when restoring a recording.
>> +*/
>> +  static record_full_mem_entry from_bfd (bfd*cbfd, asection* osec,
>> +					 int *bfd_offset);
>> +
>> +  /* Save this mem entry to a bfd file.  */
>> +  void to_bfd (gdb_bfd_ref_ptr obfd, asection *osec, int *bfd_offset,
>> +	       gdbarch *gdbarch);
>> +
> I believe only in one of those to_bfd functions the gdbarch parameter is used.
> Did you intentionally keep it the function which don't have use the parameter in to_bfd ?
Fixed. I didn't keep it intentionally.
>
> And it might be a good idea to describe the parameters a bit, too. 😊

I would love to describe the parameters, but to be fair, I only know 
what the self-explanatory ones do lol. No idea what the section is used 
for, and the bfd_ref_ptr is the ref-counted pointer to the BFD file...

-- 
Cheers,
Guinevere Larsen
It/she

[-- Attachment #2: Type: text/html, Size: 3660 bytes --]

  reply	other threads:[~2026-06-01 20:25 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-15 16:36 [PATCH v3 0/7] refactor the internals of record-full Guinevere Larsen
2026-05-15 16:36 ` [PATCH v3 1/7] gdb/record: Refactor record history Guinevere Larsen
2026-05-26  8:33   ` Schimpe, Christina
2026-05-28 13:20     ` Guinevere Larsen
2026-05-29 13:47       ` Schimpe, Christina
2026-05-15 16:36 ` [PATCH v3 2/7] gdb/record: remove record_full_insn_num Guinevere Larsen
2026-05-26  8:35   ` Schimpe, Christina
2026-05-15 16:37 ` [PATCH v3 3/7] gdb/record: c++ify internal structures of record-full.c Guinevere Larsen
2026-05-26  9:00   ` Schimpe, Christina
2026-05-27 20:13     ` Guinevere Larsen
2026-05-29 12:09       ` Schimpe, Christina
2026-05-29 16:38         ` Guinevere Larsen
2026-05-15 16:37 ` [PATCH v3 4/7] gdb/record: make record_full_history more c++-like Guinevere Larsen
2026-05-16  1:03   ` Thiago Jung Bauermann
2026-05-26  9:04   ` Schimpe, Christina
2026-05-26 20:07     ` Guinevere Larsen
2026-05-15 16:37 ` [PATCH v3 5/6] gdb/record: Define new version of the record-save section Guinevere Larsen
2026-05-15 16:37 ` [PATCH v3 5/7] gdb/record: extract the PC to record_full_instruction Guinevere Larsen
2026-05-16  1:04   ` Thiago Jung Bauermann
2026-05-29 12:40   ` Schimpe, Christina
2026-06-01 20:24     ` Guinevere Larsen [this message]
2026-05-15 16:37 ` [PATCH v3 6/7] gdb/record: Define new version of the record-save section Guinevere Larsen
2026-05-15 16:37 ` [PATCH v3 6/6] gdb/record: rename record_full_list to record_full_log Guinevere Larsen
2026-05-29 12:05   ` Schimpe, Christina
2026-05-15 16:37 ` [PATCH v3 7/7] " Guinevere Larsen
2026-05-16  1:07   ` Thiago Jung Bauermann
2026-05-15 17:45 ` [PATCH v3 0/7] refactor the internals of record-full Guinevere Larsen

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=a6e05588-2f17-42ca-9a46-58cb362f7ad3@redhat.com \
    --to=guinevere@redhat.com \
    --cc=christina.schimpe@intel.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