diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2018-03-06 16:19:52 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2018-03-06 19:12:19 +0000 |
commit | d74aff3d95928db6647a11865c396204c50bc157 (patch) | |
tree | faf8778010977e7ef139a75c1f15e0f1ae7de4af | |
parent | 7ea78b5973525193eda8e379cc351c7804653216 (diff) | |
download | gdb-d74aff3d95928db6647a11865c396204c50bc157.zip gdb-d74aff3d95928db6647a11865c396204c50bc157.tar.gz gdb-d74aff3d95928db6647a11865c396204c50bc157.tar.bz2 |
gdb/riscv: Remove use of pseudo registers
The code making use of pseudo registers was initially intended to
support running 32-bit ABI files on 64-bit riscv targets. However, the
implementation was incomplete, and broken.
For now I've removed all reference to pseudo registers from the riscv
target, we've not lost any functionality, and this cleans up failures in
the selftests.
Once the riscv target has matured a little we'll probably end up
bringing back some of the use of pseudo registers in order to better
support running 32-bit executables on a 64-bit target.
gdb/ChangeLog:
* riscv-tdep.c (riscv_pseudo_register_read): Delete.
(riscv_pseudo_register_write): Delete.
(riscv_gdbarch_init): Remove all use of pseudo registers.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/riscv-tdep.c | 25 |
2 files changed, 6 insertions, 25 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8e78518..909178f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com> + + * riscv-tdep.c (riscv_pseudo_register_read): Delete. + (riscv_pseudo_register_write): Delete. + (riscv_gdbarch_init): Remove all use of pseudo registers. + 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca> * record-btrace.c (btrace_print_lines): Replace cleanup diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c index 3e1ad99..ce14806 100644 --- a/gdb/riscv-tdep.c +++ b/gdb/riscv-tdep.c @@ -499,28 +499,6 @@ riscv_register_name (struct gdbarch *gdbarch, int regnum) return NULL; } -/* Implement the pseudo_register_read gdbarch method. */ - -static enum register_status -riscv_pseudo_register_read (struct gdbarch *gdbarch, - readable_regcache *regcache, - int regnum, - gdb_byte *buf) -{ - return regcache->raw_read (regnum, buf); -} - -/* Implement the pseudo_register_write gdbarch method. */ - -static void -riscv_pseudo_register_write (struct gdbarch *gdbarch, - struct regcache *regcache, - int cookednum, - const gdb_byte *buf) -{ - regcache_raw_write (regcache, cookednum, buf); -} - /* Implement the register_type gdbarch method. */ static struct type * @@ -2559,10 +2537,7 @@ riscv_gdbarch_init (struct gdbarch_info info, set_gdbarch_sw_breakpoint_from_kind (gdbarch, riscv_sw_breakpoint_from_kind); /* Register architecture. */ - set_gdbarch_pseudo_register_read (gdbarch, riscv_pseudo_register_read); - set_gdbarch_pseudo_register_write (gdbarch, riscv_pseudo_register_write); set_gdbarch_num_regs (gdbarch, RISCV_LAST_REGNUM + 1); - set_gdbarch_num_pseudo_regs (gdbarch, RISCV_LAST_REGNUM + 1); set_gdbarch_sp_regnum (gdbarch, RISCV_SP_REGNUM); set_gdbarch_pc_regnum (gdbarch, RISCV_PC_REGNUM); set_gdbarch_ps_regnum (gdbarch, RISCV_FP_REGNUM); |