Re: [PATCH 4/5] RISC-V: Add native linux support.

John Baldwin
2018-10-25T17:55:45Z

On 10/25/18 4:09 AM, Andrew Burgess wrote:
> diff --git a/gdb/riscv-linux-nat.c b/gdb/riscv-linux-nat.c
> index 7dbfe651f2c..c09121d052b 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. */

Oops, I just replied to Andrew directly on the commit, but probably better to reply
on the list:

Now that the MISA defaults to 0 if not present, would it better to just remove
this and not set it to 0 explicitly? The FreeBSD native target for RISC-V
doesn't set MISA to anything at all.

--
John Baldwin