aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-block.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2020-11-24 18:08:25 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-12-02 17:47:39 +0000
commite45020422076c1014579ae8763fd253990ddf58e (patch)
treec1738488ba31f78c02c69ca5b5603e32efb82f9f /gdb/python/py-block.c
parent7ddfb1a891ce2fee8708e6d5f14a6935d307875e (diff)
downloadbinutils-e45020422076c1014579ae8763fd253990ddf58e.zip
binutils-e45020422076c1014579ae8763fd253990ddf58e.tar.gz
binutils-e45020422076c1014579ae8763fd253990ddf58e.tar.bz2
gdb/riscv: place unknown csrs into the correct register groups
Unknown riscv CSRs should not be in the 'general' group, but should be in the system and csr register groups. To see this in action connect to QEMU, this target advertises two registers dscratch and mucounteren which are unknown to GDB (these are legacy CSRs). Before this commit these registers would show up in the output of: (gdb) info registers .... dscratch Could not fetch register "dscratch"; remote failure reply 'E14' mucounteren Could not fetch register "mucounteren"; remote failure reply 'E14' Ignore the errors, this is just a QEMU annoyance, it advertises these CSRs, but doesn't actually let GDB read them. These registers don't show up in the output of either: (gdb) info registers csr (gdb) info registers system After this commit this situation is reveresed, which makes more sense to me. gdb/ChangeLog: * riscv-tdep.c (riscv_is_unknown_csr): New function, implementation moved from riscv_register_reggroup_p. (riscv_register_reggroup_p): Update group handling for unknown CSRs. gdb/testsuite/ChangeLog: * gdb.arch/riscv-tdesc-regs.exp (get_expected_result): New proc, update test to use this.
Diffstat (limited to 'gdb/python/py-block.c')
0 files changed, 0 insertions, 0 deletions