From bcecc11da243fe5c333f9d2d914663d09f4b868d Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 6 Nov 2018 09:47:21 -0800 Subject: Note that PT_GETREGS supplies SSTATUS for FreeBSD/riscv. This permits reading the value of the SSTATUS CSR returned by ptrace() for live FreeBSD/riscv processes. * riscv-fbsd-nat.c (getregs_supplies): Return true for RISCV_CSR_SSTATUS_REGNUM. --- gdb/riscv-fbsd-nat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gdb/riscv-fbsd-nat.c') diff --git a/gdb/riscv-fbsd-nat.c b/gdb/riscv-fbsd-nat.c index ad4ea1e0ad1..e66f491284c 100644 --- a/gdb/riscv-fbsd-nat.c +++ b/gdb/riscv-fbsd-nat.c @@ -42,7 +42,8 @@ static riscv_fbsd_nat_target the_riscv_fbsd_nat_target; static bool getregs_supplies (struct gdbarch *gdbarch, int regnum) { - return (regnum >= RISCV_RA_REGNUM && regnum <= RISCV_PC_REGNUM); + return ((regnum >= RISCV_RA_REGNUM && regnum <= RISCV_PC_REGNUM) + || regnum == RISCV_CSR_SSTATUS_REGNUM); } /* Determine if PT_GETFPREGS fetches REGNUM. */ -- cgit v1.2.1