[PATCH 0/8] Bare-metal core dumps for RISC-V

Andrew Burgess
2020-12-02T17:39:41Z

This series touches both binutils and gdb. Patches #2, #4, and #6 are
binutils patches, all the rest are gdb patches.

The goal of this series is to add support to GDB for generating a core
file for a bare metal RISC-V target.

As part of this series patches #2 and #3 add a generic new feature to
GDB, the ability to include the current target description in a
generated core file.

All feedback is welcome.

Thanks,
Andrew

---

Andrew Burgess (8):
gdb/riscv: use a single regset supply function for riscv fbsd & linux
bfd/binutils: support for gdb target descriptions in the core file
gdb: write target description into core file
bfd/riscv: prepare to handle bare metal core dump creation
gdb/riscv: introduce bare metal core dump support
bfd/binutils: add support for RISC-V CSRs in core files
gdb/riscv: make riscv target description names global
gdb/riscv: write CSRs into baremetal core dumps

bfd/ChangeLog | 24 +++
bfd/elf-bfd.h | 4 +
bfd/elf.c | 46 +++++
bfd/elfnn-riscv.c | 73 ++++++++
binutils/ChangeLog | 10 +
binutils/readelf.c | 4 +
gdb/ChangeLog | 46 +++++
gdb/Makefile.in | 2 +
gdb/configure.tgt | 2 +-
gdb/corelow.c | 22 +++
gdb/gcore.c | 20 ++
gdb/riscv-fbsd-tdep.c | 20 +-
gdb/riscv-linux-tdep.c | 4 +-
gdb/riscv-none-tdep.c | 405 +++++++++++++++++++++++++++++++++++++++++
gdb/riscv-tdep.c | 64 ++++++-
gdb/riscv-tdep.h | 26 +++
include/ChangeLog | 10 +
include/elf/common.h | 4 +
18 files changed, 761 insertions(+), 25 deletions(-)
create mode 100644 gdb/riscv-none-tdep.c

--
2.25.4