From: Guinevere Larsen <guinevere@redhat.com>
To: "Schimpe, Christina" <christina.schimpe@intel.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Cc: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Subject: Re: [PATCH v4 4/8] gdb/record: c++ify internal structures of record-full.c
Date: Thu, 11 Jun 2026 14:16:53 -0300 [thread overview]
Message-ID: <c3c482dc-f746-43f2-aae3-1227bcb98607@redhat.com> (raw)
In-Reply-To: <SN7PR11MB76387CA216E47704020E8277F91B2@SN7PR11MB7638.namprd11.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 1614 bytes --]
On 6/11/26 4:21 AM, Schimpe, Christina wrote:
>>> It seems that you did not change the code as discussed here:
>>> https://sourceware.org/pipermail/gdb-patches/2026-May/227699.html
>>>
>>> Would you mind sharing the reason for that?
>>> In my opinion this is necessary.
>> I blame the weekend. Leave on friday thinking "I'll do it on monday", arrive
>> on monday thinking "I did it last friday".
>>
>> I made sure to make the change now. Added the asserts that the length is
>> 0 in the move operator, which means we won't need to worry about freeing
>> the memory.
> But isn't it possible that "len > sizeof (u.buf)" or at least "len > 0" at this point ?
Not really. Since we can't have copying of entries, if an actual entry
was stored in the variable that is receiving a move, we lose information
on an entry or we forgot to clear the incomplete instruction (which
means we never added it to the history). The code is built for this to
be the case, so I am asserting that the length is 0 to catch these
mistakes and not let execution information be lost.
--
Cheers,
Guinevere Larsen
it/its
she/her (deprecated)
>
> So before this code:
>
>>>>> + addr = other.addr;
>>>>> + len = other.len;
>>>>> + memcpy (u.buf, other.u.buf, sizeof (u.buf));
> Christina
> Intel Deutschland GmbH
>
> Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany
> Tel: +49 89 991 430,www.intel.de
> Managing Directors: Harry Demas, Jeffrey Schneiderman, Yin Chong Sorrell
> Chairperson of the Supervisory Board: Nicole Lau
> Registered Seat: Munich
> Commercial Register: Amtsgericht Muenchen HRB 186928
[-- Attachment #2: Type: text/html, Size: 3065 bytes --]
next prev parent reply other threads:[~2026-06-11 17:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 14:33 [PATCH v4 0/8] refactor the internals of record-full Guinevere Larsen
2026-06-02 14:33 ` [PATCH v4 1/8] gdb/record: Refactor record history Guinevere Larsen
2026-06-10 14:39 ` Schimpe, Christina
2026-06-12 18:07 ` Guinevere Larsen
2026-06-02 14:33 ` [PATCH v4 2/8] gdb/record: factor out reading and writing the execution log to corefile Guinevere Larsen
2026-06-10 14:40 ` Schimpe, Christina
2026-06-02 14:33 ` [PATCH v4 3/8] gdb/record: remove record_full_insn_num Guinevere Larsen
2026-06-02 14:33 ` [PATCH v4 4/8] gdb/record: c++ify internal structures of record-full.c Guinevere Larsen
2026-06-10 14:46 ` Schimpe, Christina
2026-06-10 19:07 ` Guinevere Larsen
2026-06-11 7:21 ` Schimpe, Christina
2026-06-11 17:16 ` Guinevere Larsen [this message]
2026-06-15 7:49 ` Schimpe, Christina
2026-06-25 20:41 ` Guinevere Larsen
2026-07-06 8:35 ` Schimpe, Christina
2026-06-02 14:33 ` [PATCH v4 5/8] gdb/record: make record_full_history more c++-like Guinevere Larsen
2026-06-02 14:33 ` [PATCH v4 6/8] gdb/record: extract the PC to record_full_instruction Guinevere Larsen
2026-06-02 14:33 ` [PATCH v4 7/8] gdb/record: Define new version of the record-save section Guinevere Larsen
2026-06-10 14:49 ` Schimpe, Christina
2026-06-02 14:33 ` [PATCH v4 8/8] gdb/record: rename record_full_list to record_full_log 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=c3c482dc-f746-43f2-aae3-1227bcb98607@redhat.com \
--to=guinevere@redhat.com \
--cc=christina.schimpe@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=thiago.bauermann@linaro.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