[Qemu-devel] [PATCH 5/5 v3] RISC-V: Add hooks to use the gdb xml files.

2019-01-29 Thread Jim Wilson
The gdb CSR xml file has registers in documentation order, not numerical order, so we need a table to map the register numbers. This also adds fairly standard gdb hooks to access xml specified registers. Signed-off-by: Jim Wilson --- target/riscv/cpu.c | 9 +- target/riscv/cpu.h | 2

Re: [Qemu-devel] [PATCH 5/5 v3] RISC-V: Add hooks to use the gdb xml files.

2019-02-06 Thread Alistair Francis
On Tue, Jan 29, 2019 at 6:58 PM Jim Wilson wrote: > > The gdb CSR xml file has registers in documentation order, not numerical > order, so we need a table to map the register numbers. This also adds > fairly standard gdb hooks to access xml specified registers. > > Signed-off-by: Jim Wilson > --

Re: [Qemu-devel] [PATCH 5/5 v3] RISC-V: Add hooks to use the gdb xml files.

2019-02-06 Thread Jim Wilson
On Wed, Feb 6, 2019 at 4:04 PM Alistair Francis wrote: > Would it not be easier to add an extra argument to the functions > intstead of setting and unsetting this? > > That's what you had in the earlier version of this set. The csr support was rewritten, and is now a table of functions. If I cha

Re: [Qemu-devel] [PATCH 5/5 v3] RISC-V: Add hooks to use the gdb xml files.

2019-02-07 Thread Richard Henderson
On 2/7/19 2:05 AM, Jim Wilson wrote: > Maybe qemu doesn't care about unused arguments/parameters? We do not. r~

Re: [Qemu-devel] [PATCH 5/5 v3] RISC-V: Add hooks to use the gdb xml files.

2019-02-08 Thread Jim Wilson
On Fri, Feb 8, 2019 at 10:17 AM Alistair Francis wrote: > Can we just write a wrapper function then that sets and unsets the variable? > Something like this: > > riscv_csrrw_debug(...) { > #if !defined(CONFIG_USER_ONLY) > env->debugger = true; > #endif > result = ri

Re: [Qemu-devel] [PATCH 5/5 v3] RISC-V: Add hooks to use the gdb xml files.

2019-02-08 Thread Alistair Francis
On Wed, Feb 6, 2019 at 6:05 PM Jim Wilson wrote: > > On Wed, Feb 6, 2019 at 4:04 PM Alistair Francis wrote: > > Would it not be easier to add an extra argument to the functions > > intstead of setting and unsetting this? > > > > That's what you had in the earlier version of this set. > > The csr

Re: [Qemu-devel] [PATCH 5/5 v3] RISC-V: Add hooks to use the gdb xml files.

2019-02-08 Thread Alistair Francis
On Fri, Feb 8, 2019 at 11:09 AM Jim Wilson wrote: > > On Fri, Feb 8, 2019 at 10:17 AM Alistair Francis wrote: > > Can we just write a wrapper function then that sets and unsets the variable? > > Something like this: > > > > riscv_csrrw_debug(...) { > > #if !defined(CONFIG_USER_ONLY) > >

Re: [Qemu-devel] [PATCH 5/5 v3] RISC-V: Add hooks to use the gdb xml files.

2019-02-11 Thread Palmer Dabbelt
On Fri, 08 Feb 2019 11:28:48 PST (-0800), alistai...@gmail.com wrote: On Fri, Feb 8, 2019 at 11:09 AM Jim Wilson wrote: On Fri, Feb 8, 2019 at 10:17 AM Alistair Francis wrote: > Can we just write a wrapper function then that sets and unsets the variable? > Something like this: > > riscv_csrrw