Re: [RFC] gdb/riscv: Improved register alias name creation

Jim Wilson
2020-06-10T20:34:28Z

On Tue, Jun 9, 2020 at 1:54 PM Tom Tromey <tom@tromey.com> wrote:
> (gdb) call debug.trace (me, "You")
> Could not fetch register "mucounteren"; remote failure reply 'E14'

mucounteren is one of those inconvenient registers that got dropped,
and then its address got reused for a different unrelated register in
a later priv spec version. The easy solution is on the qemu side to
stop using this register, but that doesn't help anyone using a qemu
release. On the gdb side we would need to make gdb priv spec version
aware, or else lie to gdb and pretend that two unrelated registers in
different priv spec versions are the same register and hope that
doesn't cause trouble.

This priv spec version problem goes away once we drop all 1.9 and
1.9.1 support, because the compatibility problems only exist between
versions before 1.10 and versions 1.10 and later. I've been told that
there won't be any more compatibility breaks from 1.10 and later.
qemu never had 1.9 support, and has already proposed dropping 1.9.1
support on mainline, but of course older qemu releases have the 1.9.1
support. binutils still has 1.9 and 1.9.1 support, but I've suggested
to Nelson that he should drop the 1.9 support because I'm not aware of
anyone using it.

Jim