gdb/riscv: Remove CSR feature file
authorAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 15 Jun 2020 18:22:22 +0000 (19:22 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 25 Jun 2020 17:07:30 +0000 (18:07 +0100)
commit865bad2602bd212875063968ae429fca8f9190d1
treed7d7903299bb834569ee4b19e98bd5c4cecbe5ae
parented69cbc8ef0a403caff2725072362252ac27bee3
gdb/riscv: Remove CSR feature file

There is currently a bug in the RISC-V CSR/FPU feature files.  The
CSRs containing the FPU status registers are mentioned in both the FPU
feature file and the CSR feature file.

My original thinking when adding the FPU feature file was that it made
more sense to group the FPU status registers with the other FPU
state.  This opened up the possibility of debugging very
simple (possibly simulator only) targets that had little more than CPU
and FPU available for GDB to access.

When I then added code to automatically generate the CSR XML file I
forgot to filter out the FPU status CSRs, so these registers were
mentioned twice.

Now for GDB's default RISC-V target descriptions this doesn't actually
matter.  I did consider adding the CSRs to the default target
description, but in the end I didn't bother.  The reasoning again was
simplicity; the default target description is only to be used when the
target doesn't supply its own description, and NOT supplying the CSRs
actually serves to encourage targets to supply an accurate
description.  Combine this with the fact that the CSRs change from
revision to revision, sometimes in non-backward compatible ways, then
having a "default" set of CSRs just feels like a path to confusion and
complaints.

However, having a broken CSR XML file in the GDB source tree has had
one negative effect, QEMU has copied this file into its source tree,
and is using this as its description that it passes to GDB.  That is
QEMU announces the FPU status registers twice, once in the FPU
feature, and once in the CSR feature.

This commit starts along the path back to sanity by deleting the
default CSR XML files from within GDB.  These files were not used in
any way by current GDB, so there is absolutely no loss of
functionality with this change.

gdb/ChangeLog:

* features/Makefile: Remove all references to the deleted files
below.
* features/riscv/32bit-csr.c: Deleted.
* features/riscv/32bit-csr.xml: Deleted.
* features/riscv/64bit-csr.c: Deleted.
* features/riscv/64bit-csr.xml: Deleted.
* features/riscv/rebuild-csr-xml.sh: Deleted.
gdb/ChangeLog
gdb/features/Makefile
gdb/features/riscv/32bit-csr.c [deleted file]
gdb/features/riscv/32bit-csr.xml [deleted file]
gdb/features/riscv/64bit-csr.c [deleted file]
gdb/features/riscv/64bit-csr.xml [deleted file]
gdb/features/riscv/rebuild-csr-xml.sh [deleted file]
This page took 0.024798 seconds and 4 git commands to generate.