Re: RISC-V: Is it reasonable to extend current target_description for KGDB?

Maciej W. Rozycki
2019-10-16T13:21:02Z

On Tue, 15 Oct 2019, Jim Wilson wrote:

> One possible solution is to add a RISC-V specific command to choose
> the register set used for the default p packet. That way, if there
> are problems with adding registers to it, people have the option to
> switch back to the old way. We already have the "set riscv
> use-compressed-breakpoints [auto|on|off]" command. So we could add a
> similar command to choose the number of registers in the default p
> packet, try changing the default to the full 36 register set, and wait
> to see who complains. People that complain can be told about the
> command to switch back to the old 32 (33?) register set.

There's such a generic command already available:

(gdb) set tdesc filename ...

NB, this has nothing to do with the use of `g'/`G' vs `p'/`P' packets,
both use the same register indices; for the overlapping part, that is of
course. Then no heuristics can cover registers outside the range of the
`g'/`G' packets of course, an XML description does have to be provided for
those registers to be recognised.

Maciej