Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kirill Radkin <hokeygo@gmail.com>
To: gdb-patches@sourceware.org
Cc: Peter Bergner <bergner@oss.tenstorrent.com>,
	Sergey Matyukevich <geomatsi@gmail.com>,
	Jerry Zhang Jian <jerry.zhangjian@sifive.com>,
	Heinrich Schuchardt <heinrich.schuchardt@canonical.com>,
	Andrew Burgess <aburgess@redhat.com>,
	Palmer Dabbelt <palmer@dabbelt.com>
Subject: [PATCH v2 0/3] RISC-V Vector Extension support
Date: Fri, 25 Sep 2026 20:29:44 +0300	[thread overview]
Message-ID: <20260925172947.403655-1-hokeygo@gmail.com> (raw)

Hi all,

This series adds RISC-V Vector Extension support to native Linux GDB and
gdbserver. It provides access to v0-v31 and the vector CSRs, target
descriptions sized according to VLENB, and support for the vector calling
convention in inferior calls.

It also contains a separate RVV instruction-recording patch for reverse
execution and tests covering register access, CSR printing, and vector and
tuple arguments and return values. The RVV support has been tested at VLEN
values of 64, 128, and 1024, using both system QEMU on Linux and an
OpenOCD + Spike setup.

Jerry Zhang Jian pointed out in an earlier message that the Tcl procedures
needed by the tests were missing. They are now included.

I am continuing to work on this series and plan to send further improvements.

I've CCed Andrew and Palmer since they are listed as RISC-V maintainers in
gdb/MAINTAINERS, and Peter Bergner, Sergey Matyukevich, Jerry Zhang Jian,
and Heinrich Schuchardt because of earlier discussion of this work.

Best regards,
Kirill

Kirill Radkin (3):
  RISC-V Vector Extension Support
  Reverse execution support for RISC-V Vector Extension
  RISC-V Vector Extension Support Testing

 gdb/arch/riscv.c                              |    9 +-
 gdb/arch/riscv.h                              |   18 +-
 gdb/features/riscv/rvv.c                      |  113 ++
 gdb/gdbtypes.c                                |   41 +
 gdb/nat/riscv-linux-ptrace.h                  |   31 +
 gdb/nat/riscv-linux-tdesc.c                   |   35 +
 gdb/riscv-linux-nat.c                         |  164 ++
 gdb/riscv-regs.h                              |   79 +
 gdb/riscv-tdep.c                              | 1369 ++++++++++++++++-
 gdb/riscv-tdep.h                              |   63 +-
 ...iscv-vector-abi-full-generate-template.txt |  176 +++
 .../riscv-vector-abi-full-generate.py         |  384 +++++
 .../gdb.arch/riscv-vector-abi-full.c          |   23 +
 .../gdb.arch/riscv-vector-abi-full.exp        |   72 +
 gdb/testsuite/gdb.arch/riscv-vector-abi.c     |  157 ++
 gdb/testsuite/gdb.arch/riscv-vector-abi.exp   |  247 +++
 .../gdb.arch/riscv-vu-availability.c          |   67 +
 .../gdb.arch/riscv-vu-availability.exp        |   72 +
 .../gdb.arch/riscv-vu-consitency-checks.c     |   79 +
 .../gdb.arch/riscv-vu-consitency-checks.exp   |  156 ++
 gdb/testsuite/gdb.arch/riscv-vu-ctx-print.c   |  106 ++
 gdb/testsuite/gdb.arch/riscv-vu-ctx-print.exp |  107 ++
 gdb/testsuite/gdb.arch/riscv-vu-printout.c    |   69 +
 gdb/testsuite/gdb.arch/riscv-vu-printout.exp  |   92 ++
 .../gdb.arch/riscv-vu-rvv-unsupported.c       |   23 +
 .../gdb.arch/riscv-vu-rvv-unsupported.exp     |   46 +
 gdb/testsuite/gdb.arch/riscv-vu-rwr.c         |   62 +
 gdb/testsuite/gdb.arch/riscv-vu-rwr.exp       |  173 +++
 .../gdb.arch/riscv-vu-side-effects.c          |   86 ++
 .../gdb.arch/riscv-vu-side-effects.exp        |  162 ++
 gdb/testsuite/lib/gdb.exp                     |  124 ++
 gdb/testsuite/lib/riscv64-rvv-lib.exp         |  347 +++++
 gdbserver/linux-riscv-low.cc                  |  129 +-
 gdbsupport/common-utils.h                     |   22 +
 include/opcode/riscv-opc.h                    |   79 +
 include/opcode/riscv.h                        |   10 +
 36 files changed, 4832 insertions(+), 160 deletions(-)
 create mode 100644 gdb/features/riscv/rvv.c
 create mode 100644 gdb/nat/riscv-linux-ptrace.h
 create mode 100644 gdb/riscv-regs.h
 create mode 100644 gdb/testsuite/gdb.arch/riscv-vector-abi-full-generate-template.txt
 create mode 100644 gdb/testsuite/gdb.arch/riscv-vector-abi-full-generate.py
 create mode 100644 gdb/testsuite/gdb.arch/riscv-vector-abi-full.c
 create mode 100644 gdb/testsuite/gdb.arch/riscv-vector-abi-full.exp
 create mode 100644 gdb/testsuite/gdb.arch/riscv-vector-abi.c
 create mode 100644 gdb/testsuite/gdb.arch/riscv-vector-abi.exp
 create mode 100644 gdb/testsuite/gdb.arch/riscv-vu-availability.c
 create mode 100644 gdb/testsuite/gdb.arch/riscv-vu-availability.exp
 create mode 100644 gdb/testsuite/gdb.arch/riscv-vu-consitency-checks.c
 create mode 100644 gdb/testsuite/gdb.arch/riscv-vu-consitency-checks.exp
 create mode 100644 gdb/testsuite/gdb.arch/riscv-vu-ctx-print.c
 create mode 100644 gdb/testsuite/gdb.arch/riscv-vu-ctx-print.exp
 create mode 100644 gdb/testsuite/gdb.arch/riscv-vu-printout.c
 create mode 100644 gdb/testsuite/gdb.arch/riscv-vu-printout.exp
 create mode 100644 gdb/testsuite/gdb.arch/riscv-vu-rvv-unsupported.c
 create mode 100644 gdb/testsuite/gdb.arch/riscv-vu-rvv-unsupported.exp
 create mode 100644 gdb/testsuite/gdb.arch/riscv-vu-rwr.c
 create mode 100644 gdb/testsuite/gdb.arch/riscv-vu-rwr.exp
 create mode 100644 gdb/testsuite/gdb.arch/riscv-vu-side-effects.c
 create mode 100644 gdb/testsuite/gdb.arch/riscv-vu-side-effects.exp
 create mode 100644 gdb/testsuite/lib/riscv64-rvv-lib.exp


base-commit: ba3e439f17aabdb5b1a9ca61646f9c22604ab259
-- 
2.43.0


             reply	other threads:[~2026-09-25 17:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-25 17:29 Kirill Radkin [this message]
2026-09-25 17:29 ` [PATCH v2 1/3] RISC-V Vector Extension Support Kirill Radkin
2026-09-25 17:29 ` [PATCH v2 2/3] Reverse execution support for RISC-V Vector Extension Kirill Radkin
2026-09-25 17:29 ` [PATCH v2 3/3] RISC-V Vector Extension Support Testing Kirill Radkin

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=20260925172947.403655-1-hokeygo@gmail.com \
    --to=hokeygo@gmail.com \
    --cc=aburgess@redhat.com \
    --cc=bergner@oss.tenstorrent.com \
    --cc=gdb-patches@sourceware.org \
    --cc=geomatsi@gmail.com \
    --cc=heinrich.schuchardt@canonical.com \
    --cc=jerry.zhangjian@sifive.com \
    --cc=palmer@dabbelt.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