[v3,0/7] refactor the internals of record-full

Message ID 20260515163706.3355686-1-guinevere@redhat.com
Headers
Series refactor the internals of record-full |

Message

Guinevere Larsen May 15, 2026, 4:36 p.m. UTC
  This series introduces a refactor and modernization to the record-full
history, moving it form a manually managed doubly-linked list into an
std::deque, which can make better use of caching and might make
execution faster.

The main driving force behind this change is the plan to implement
support for multithreaded inferiors, since each instruction will need to
know the thread that executed it, and it'll be much easier if there is a
more consistent spot to find all this information.

Changes for v3: Made the former "cleanup" functions into actual
destructors. To do that and avoid double-frees, I made it so
record_full_entry (and the 2 classes under it) can't be copied, only
moved. Also implemented almost all the feedback from Christina on the
changes.

Guinevere Larsen (7):
  gdb/record: Refactor record history
  gdb/record: remove record_full_insn_num
  gdb/record: c++ify internal structures of record-full.c
  gdb/record: make record_full_history more c++-like
  gdb/record: extract the PC to record_full_instruction
  gdb/record: Define new version of the record-save section
  gdb/record: rename record_full_list to record_full_log

 gdb/NEWS               |    4 +
 gdb/aarch64-tdep.c     |    2 -
 gdb/amd64-linux-tdep.c |    3 -
 gdb/arm-tdep.c         |    2 -
 gdb/i386-linux-tdep.c  |    3 -
 gdb/i386-tdep.c        |    4 -
 gdb/loongarch-tdep.c   |    2 -
 gdb/moxie-tdep.c       |    2 -
 gdb/ppc-linux-tdep.c   |    3 -
 gdb/record-full.c      | 1724 +++++++++++++++++++---------------------
 gdb/record-full.h      |    1 -
 gdb/riscv-tdep.c       |    3 -
 gdb/rs6000-tdep.c      |    4 -
 gdb/s390-linux-tdep.c  |    3 -
 gdb/s390-tdep.c        |    2 -
 15 files changed, 827 insertions(+), 935 deletions(-)


base-commit: 62cc7210c87a08a9e10955d9a240cfe0c0b5ee13
  

Comments

Guinevere Larsen May 15, 2026, 5:45 p.m. UTC | #1
Oops, sorry about the noise, apparently some mis-labelled patch files 
were kept from one iteration to the next and I sent some emails twice. 
Please ignore all files that act like there are 6 patches in the series
On 5/15/26 1:36 PM, Guinevere Larsen wrote:
> This series introduces a refactor and modernization to the record-full
> history, moving it form a manually managed doubly-linked list into an
> std::deque, which can make better use of caching and might make
> execution faster.
>
> The main driving force behind this change is the plan to implement
> support for multithreaded inferiors, since each instruction will need to
> know the thread that executed it, and it'll be much easier if there is a
> more consistent spot to find all this information.
>
> Changes for v3: Made the former "cleanup" functions into actual
> destructors. To do that and avoid double-frees, I made it so
> record_full_entry (and the 2 classes under it) can't be copied, only
> moved. Also implemented almost all the feedback from Christina on the
> changes.
>
> Guinevere Larsen (7):
>    gdb/record: Refactor record history
>    gdb/record: remove record_full_insn_num
>    gdb/record: c++ify internal structures of record-full.c
>    gdb/record: make record_full_history more c++-like
>    gdb/record: extract the PC to record_full_instruction
>    gdb/record: Define new version of the record-save section
>    gdb/record: rename record_full_list to record_full_log
>
>   gdb/NEWS               |    4 +
>   gdb/aarch64-tdep.c     |    2 -
>   gdb/amd64-linux-tdep.c |    3 -
>   gdb/arm-tdep.c         |    2 -
>   gdb/i386-linux-tdep.c  |    3 -
>   gdb/i386-tdep.c        |    4 -
>   gdb/loongarch-tdep.c   |    2 -
>   gdb/moxie-tdep.c       |    2 -
>   gdb/ppc-linux-tdep.c   |    3 -
>   gdb/record-full.c      | 1724 +++++++++++++++++++---------------------
>   gdb/record-full.h      |    1 -
>   gdb/riscv-tdep.c       |    3 -
>   gdb/rs6000-tdep.c      |    4 -
>   gdb/s390-linux-tdep.c  |    3 -
>   gdb/s390-tdep.c        |    2 -
>   15 files changed, 827 insertions(+), 935 deletions(-)
>
>
> base-commit: 62cc7210c87a08a9e10955d9a240cfe0c0b5ee13