This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/5] RISC-V: Add native linux support.
- From: John Baldwin <jhb at FreeBSD dot org>
- To: Andrew Burgess <andrew dot burgess at embecosm dot com>, Andreas Schwab <schwab at suse dot de>
- Cc: Jim Wilson <jimw at sifive dot com>, gdb-patches at sourceware dot org
- Date: Thu, 25 Oct 2018 10:55:41 -0700
- Subject: Re: [PATCH 4/5] RISC-V: Add native linux support.
- References: <CAFyWVaZoF3a=-QjADoUdzq_hz5skHVaxmXtB1X5ZT-a_sns5PA@mail.gmail.com> <20180808233908.8149-1-jimw@sifive.com> <mvm8t2mpahm.fsf@suse.de> <20181025110946.GN2929@embecosm.com>
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