diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-06-15 22:44:56 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-06-15 22:44:56 +0000 |
commit | aa18f2e879b0fca177b6f872c2abb0cc79f607cb (patch) | |
tree | b525c84ae64d9194ff863fd6b96bd42560ef05fc /gdb/hppa-hpux-tdep.c | |
parent | f0423c39d51224e4becfaed021a1ac0536242415 (diff) | |
download | gdb-aa18f2e879b0fca177b6f872c2abb0cc79f607cb.tar.gz |
* gdbarch.sh (read_pc): Add REGCACHE argument. Remove PTID argument.
(write_pc): Likewise. Remove default implementation, add predicate.
* gdbarch.c, gdbarch.h: Regenerate.
* regcache.c (read_pc_pid): Use current regcache instead of calling
read_register_pid.
(write_pc_pid): Check gdbarch_write_pc predicate, implement default
case inline.
(generic_target_write_pc): Remove.
* inferior.h (generic_target_write_pc): Remove.
* frv-tdep.c (frv_gdbarch_init): Do not install it.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
* rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
* sh64-tdep.c (sh64_gdbarch_init): Likewise.
* sh-tdep.c (sh_gdbarch_init): Likewise.
* xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
* avr-tdep.c (avr_read_pc): Add REGCACHE argument. Remove PTID
argument. Use REGCACHE instead of calling read_register_pid.
* hppa-hpux-tdep.c (hppa_hpux_read_pc): Likewise.
* hppa-tdep.c (hppa_read_pc): Likewise.
* hppa-tdep.h (hppa_read_pc): Likewise.
* ia64-tdep.c (ia64_read_pc): Likewise.
* m32r-tdep.c (m32r_read_pc): Likewise.
* mep-tdep.c (mep_read_pc): Likewise.
* mn10300-tdep.c (mn10300_read_pc): Likewise.
* spu-tdep.c (spu_read_pc): Likewise.
* arm-tdep.c (arm_write_pc): Add REGCACHE argument. Remove PTID
argument. Use REGCACHE instead of calling write_register_pid.
* avr-tdep.c (avr_write_pc): Likewise.
* hppa-hpux-tdep.c (hppa_hpux_write_pc): Likewise.
* hppa-tdep.c (hppa_write_pc): Likewise.
* hppa-tdep.h (hppa_write_pc): Likewise.
* i386-linux-tdep.c (i386_linux_write_pc): Likewise.
* amd64-linux-tdep.c (amd64_linux_write_pc): Likewise.
* ia64-linux-tdep.c (ia64_linux_write_pc): Likewise.
* ia64-tdep.c (ia64_write_pc): Likewise.
* ia64-tdep.h (ia64_write_pc): Likewise.
* m32r-tdep.c (m32r_write_pc): Likewise.
* m88k-tdep.c (m88k_write_pc): Likewise.
* mep-tdep.c (mep_write_pc): Likewise.
* mips-tdep.c (mips_write_pc): Likewise.
* mips-linux-tdep.c (mips_linux_write_pc): Likewise.
* mn10300-tdep.c (mn10300_write_pc): Likewise.
* sparc-tdep.c (sparc_write_pc): Likewise.
* spu-tdep.c (spu_write_pc): Likewise.
* mips-tdep.c (read_signed_register): Remove.
(read_signed_register_pid): Likewise.
(mips_read_pc): Add REGCACHE argument. Remove PTID argument.
Use REGCACHE instead of calling read_signed_register_pid.
Diffstat (limited to 'gdb/hppa-hpux-tdep.c')
-rw-r--r-- | gdb/hppa-hpux-tdep.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c index 09c779c63da..62b62f52278 100644 --- a/gdb/hppa-hpux-tdep.c +++ b/gdb/hppa-hpux-tdep.c @@ -1372,29 +1372,33 @@ hppa_hpux_regset_from_core_section (struct gdbarch *gdbarch, #define HPPA_HPUX_SS_INSYSCALL 0x02 static CORE_ADDR -hppa_hpux_read_pc (ptid_t ptid) +hppa_hpux_read_pc (struct regcache *regcache) { ULONGEST flags; /* If we're currently in a system call return the contents of %r31. */ - flags = read_register_pid (HPPA_FLAGS_REGNUM, ptid); + regcache_cooked_read_unsigned (regcache, HPPA_FLAGS_REGNUM, &flags); if (flags & HPPA_HPUX_SS_INSYSCALL) - return read_register_pid (HPPA_R31_REGNUM, ptid) & ~0x3; + { + ULONGEST pc; + regcache_cooked_read_unsigned (regcache, HPPA_R31_REGNUM, &pc); + return pc & ~0x3; + } - return hppa_read_pc (ptid); + return hppa_read_pc (regcache); } static void -hppa_hpux_write_pc (CORE_ADDR pc, ptid_t ptid) +hppa_hpux_write_pc (struct regcache *regcache, CORE_ADDR pc) { ULONGEST flags; /* If we're currently in a system call also write PC into %r31. */ - flags = read_register_pid (HPPA_FLAGS_REGNUM, ptid); + regcache_cooked_read_unsigned (regcache, HPPA_FLAGS_REGNUM, &flags); if (flags & HPPA_HPUX_SS_INSYSCALL) - write_register_pid (HPPA_R31_REGNUM, pc | 0x3, ptid); + regcache_cooked_write_unsigned (regcache, HPPA_R31_REGNUM, pc | 0x3); - return hppa_write_pc (pc, ptid); + return hppa_write_pc (regcache, pc); } static CORE_ADDR |