diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ba3bf66db8..14de366cfc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-10-25 Andrew Burgess + + * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers): + Pass correct regnum to raw_supply_zeroed. + 2018-10-23 Hafiz Abid Qadeer * regcache.c (cooked_read_test): Add CSKY to the list of diff --git a/gdb/riscv-linux-nat.c b/gdb/riscv-linux-nat.c index 7dbfe651f2..c09121d052 100644 --- a/gdb/riscv-linux-nat.c +++ b/gdb/riscv-linux-nat.c @@ -201,10 +201,8 @@ riscv_linux_nat_target::fetch_registers (struct regcache *regcache, int regnum) if ((regnum == RISCV_CSR_MISA_REGNUM) || (regnum == -1)) - { - /* TODO: Need to add a ptrace call for this. */ - regcache->raw_supply_zeroed (regnum); - } + /* TODO: Need to add a ptrace call for this. */ + regcache->raw_supply_zeroed (RISCV_CSR_MISA_REGNUM); /* Access to other CSRs has potential security issues, don't support them for now. */