This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb/riscv: Add target description support
On Tue, Feb 26, 2019 at 10:40 AM Jim Wilson <jimw@sifive.com> wrote:
> > (3) Renumbered fflags, frm, and fcsr as 66, 67, and 68. This is
> > where the issues will appear for QEMU, Jim's QEMU patch had adopted
> > the "new" default numbering which placed these registers after the
> > floating point registers (so they had become 65, 66, and 67).
qemu just assigns numbers to xml regs if they don't have them,
incrementing by one for each reg. If we change the qemu xml files at
the same time as we change the qemu gdbstub hooks, then qemu will
always be internally consistent. These xml register numbers aren't
user visible anywhere inside qemu, they are only used for
communication with gdb.
> > If we want backward compatibility then we should merge this GDB patch,
> > and fix QEMU asap to avoid having two incompatible versions in the
> > wild.
I have no control over qemu. I can only suggest a patch, and ping it,
and maybe in a few months it will get merged in.
> > What I don't understand about all this is why QEMU appears to be
> > discarding one of the big benefits of xml register descriptions; the
> > ability to disconnect their register numbering from GDB's register
> > numbering.
I don't understand the comment. We still must have numbers for the
registers, otherwise we can't communicate with gdb about them. But
these xml register numbers don't affect the user or hardware register
numbers, the qemu gdbstub converts between hardware register numbers
and xml register numbers.
> > Jim: I think your comments above indicate you want my fix merged, but
> > if you could just confirm then I'll get it merged.
Yes, I think this is OK. We can worry about qemu later.
Jim