On 28 February 2018 at 11:01, Abdallah Bouassida
<[email protected]> wrote:
> Generate an XML description for the cp-regs.
> Register these regs with the gdb_register_coprocessor().
> Add arm_gdb_get_sysreg() to use it as a callback to read those regs.
>
> Signed-off-by: Abdallah Bouassida <[email protected]>
> ---
> +void arm_register_gdb_regs_for_features(CPUState *cs)
> +{
> + int n;
> +
> + n = arm_gen_dynamic_xml(cs);
> + gdb_register_coprocessor(cs, arm_gdb_get_sysreg, NULL,
> + n, "system-registers.xml", 0);
> +
> +}
Have you tried writing to a sysreg from the debugger without
your patch 4 applied? I suspect you'll find it crashes because
of the NULL pointer you're passing here, and you'll need a
dummy write function.
thanks
-- PMM