gdb/riscv: Loop over all registers for 'info all-registers'
authorAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 16 Jun 2020 16:00:33 +0000 (17:00 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 25 Jun 2020 17:07:33 +0000 (18:07 +0100)
commit6d74da72dacdbbe2b87a6b931e0f7edc3d3463e3
tree5d43d213221a997b1ed1c8f30efd25373d9b3315
parent2e52d038246520ee8f8d8344da18303154a421a6
gdb/riscv: Loop over all registers for 'info all-registers'

Currently the 'info all-registers' command only loops over those
registers that are known to GDB.  Any registers that are unknown, that
is, are mentioned in the target description, but are not something GDB
otherwise knows, will not be displayed.

This feels wrong, so this commit fixes this mistake.  The output of
'info all-registers' now matches 'info registers all'.

gdb/ChangeLog:

* riscv-tdep.c (riscv_print_registers_info): Loop over all
registers, not just the known core set of registers.

gdb/testsuite/ChangeLog:

* gdb.arch/riscv-tdesc-regs.exp: New test cases.
gdb/ChangeLog
gdb/riscv-tdep.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.arch/riscv-tdesc-regs.exp