gdb/riscv: Add gdb to dwarf register number mapping
authorAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 13 Dec 2018 17:57:14 +0000 (17:57 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Sat, 22 Dec 2018 10:02:20 +0000 (10:02 +0000)
commitfb44d95af64dd0609760c1400b9ce4da09296cd1
tree97e7d0a1637fc65aafdd0c7cbaca2798d2ec28a9
parente08b849efa7af6cb13d7d3d02dc366b9d7f4208c
gdb/riscv: Add gdb to dwarf register number mapping

Provide a mapping between GDB's register numbers and DWARF's register
numbers.  This resolves some failures that I was seeing on
gdb.base/store.exp when running on an rv64imfdc target.

gdb/ChangeLog:

* riscv-tdep.c (riscv_dwarf_reg_to_regnum): New function.
(riscv_gdbarch_init): Register new function with gdbarch.
* riscv-tdep.h: New enum to define RISC-V DWARF register numbers.
gdb/ChangeLog
gdb/riscv-tdep.c
gdb/riscv-tdep.h