gdb/riscv: remove extra caching of misa register
authorAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 9 Apr 2018 21:38:07 +0000 (22:38 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 30 Aug 2018 15:35:54 +0000 (16:35 +0100)
commit0b3f9efc044d2971aa0d9bb39a4c76678bc4ea6d
tree52e811702feeb9e8ed986d1bfc60d4554e820e96
parentc67f2e1518a829c4ae4f346c316701ef5d56a30f
gdb/riscv: remove extra caching of misa register

The RISC-V had a mechanism in place to cache the contents of the misa
register per-inferior, the original intention behind this was to
reduce the number of times the misa register had to be read (as the
contents should be constant), but it was pointed out on the mailing
list[1] that the register cache will mean the register is only
accessed once each time GDB stops, and any additional caching is
probably just unneeded extra complexity.

As such, until it can be shown that there's a real need for additional
caching, this commit removes all of the additional caching of the misa
register, and just accesses the misa register like a normal register.

[1] https://sourceware.org/ml/gdb-patches/2018-03/msg00136.html

gdb/ChangeLog:

* riscv-tdep.c (struct riscv_inferior_data): Delete.
(riscv_read_misa_reg): Don't cache value read into inferior data.
(riscv_new_inferior_data): Delete.
(riscv_inferior_data_cleanup): Delete.
(riscv_inferior_data): Delete.
(riscv_invalidate_inferior_data): Delete.
(_initialize_riscv_tdep): Remove initialisation of inferior data.
gdb/ChangeLog
gdb/riscv-tdep.c