[PATCH v3 0/7] Support for recording some AVX instructions

Guinevere Larsen blarsen@redhat.com
Mon Jul 29 19:08:46 GMT 2024


This patch is the third version of adding support to record and replay
AVX instructions on x86 and x86_64 CPUs. This version has one more
preparatory patch, as the record subsystem could read pseudo registers
(like ymm). With the extra development time, I also added a few more
instructions, and now we are able to fully record
__memset_avx2_unaligned_erms from glibc!

For rationale, supporting AVX isntructions is important since glibc
has been shipping functions that use them for a long time, meaning
most standard library functions would not be supported by record,
which is a big inconvenience for end users.

The first patch of the series makes GDB awware that it can read pseudo
registers freom executing and replaying threads, no user-visible
changes. The second adds the capability for the main i386 record
function to identify and read VEX prefixes, but doesn't add support for
any instruction yet, so minimal user visible changes (only a slight
tweak to an error message). The remaining patches add support to related
instruction, and tests those instructions.

Since this series only supports a very small subset of avx instructions,
I am not sure if I should add a NEWS entry (and what to put in it if I
should).

Guinevere Larsen (7):
  gdb: Allow replayed threads to read and write pseudo registers
  gdb: Start supporting AVX instruction
  gdb/record: add support to vmovd and vmovq instructions
  gdb/record: add support to AVX unpack instructions
  gdb/record: Add recording support to vpbroadcast instructions
  gdb/record: support AVX instructions VMOVDQ(U|A) when recording
  gdb/record: add support to vzeroupper instruction

 gdb/amd64-tdep.c                              |   3 +-
 gdb/i386-tdep.c                               | 268 +++++++++++++-
 gdb/i386-tdep.h                               |   2 +
 gdb/record-full.c                             |  10 +-
 gdb/record-full.h                             |   3 +
 gdb/testsuite/gdb.reverse/i386-avx-reverse.c  | 234 ++++++++++++
 .../gdb.reverse/i386-avx-reverse.exp          | 333 ++++++++++++++++++
 gdb/testsuite/gdb.reverse/step-precsave.exp   |   4 +-
 gdb/thread.c                                  |   9 +-
 9 files changed, 859 insertions(+), 7 deletions(-)
 create mode 100644 gdb/testsuite/gdb.reverse/i386-avx-reverse.c
 create mode 100644 gdb/testsuite/gdb.reverse/i386-avx-reverse.exp

-- 
2.45.2



More information about the Gdb-patches mailing list