summaryrefslogtreecommitdiff
path: root/gdb/ia64-linux-nat.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-05-12 00:17:05 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-05-12 00:17:05 +0000
commit7b86a1b8dd4e65d07afa350255c42c7aed7d2a3a (patch)
tree98656ca82c83912b2a78acbf750b25684a8da563 /gdb/ia64-linux-nat.c
parent45ecac4b41626c5f43dd90d0174f56c3d1350cc9 (diff)
* i386-linux-nat.c (i386_linux_resume): Use regcache functions
instead of read_register and read_register_pid. * ia64-linux-nat.c (enable_watchpoints_in_psr): Use REGCACHE argument instead of PTID. Use regcache functions instead of read_register_pid. (ia64_linux_insert_watchpoint): Update call. (ia64_linux_stopped_data_address): Use regcache functions instead of read_register_pid and write_register_pid.
Diffstat (limited to 'gdb/ia64-linux-nat.c')
-rw-r--r--gdb/ia64-linux-nat.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c
index dbe6e53c64..ff2d61cc23 100644
--- a/gdb/ia64-linux-nat.c
+++ b/gdb/ia64-linux-nat.c
@@ -477,16 +477,16 @@ fill_fpregset (const struct regcache *regcache,
#define IA64_PSR_DD (1UL << 39)
static void
-enable_watchpoints_in_psr (ptid_t ptid)
+enable_watchpoints_in_psr (struct regcache *regcache)
{
- CORE_ADDR psr;
+ ULONGEST psr;
- psr = read_register_pid (IA64_PSR_REGNUM, ptid);
+ regcache_cooked_read_unsigned (regcache, IA64_PSR_REGNUM, &psr);
if (!(psr & IA64_PSR_DB))
{
psr |= IA64_PSR_DB; /* Set the db bit - this enables hardware
watchpoints and breakpoints. */
- write_register_pid (IA64_PSR_REGNUM, psr, ptid);
+ regcache_cooked_write_unsigned (regcache, IA64_PSR_REGNUM, psr);
}
}
@@ -591,7 +591,7 @@ ia64_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw)
}
store_debug_register_pair (ptid, idx, &dbr_addr, &dbr_mask);
- enable_watchpoints_in_psr (ptid);
+ enable_watchpoints_in_psr (current_regcache);
return 0;
}
@@ -628,6 +628,7 @@ ia64_linux_stopped_data_address (struct target_ops *ops, CORE_ADDR *addr_p)
int tid;
struct siginfo siginfo;
ptid_t ptid = inferior_ptid;
+ struct regcache *regcache = current_regcache;
tid = TIDGET(ptid);
if (tid == 0)
@@ -640,10 +641,10 @@ ia64_linux_stopped_data_address (struct target_ops *ops, CORE_ADDR *addr_p)
(siginfo.si_code & 0xffff) != 0x0004 /* TRAP_HWBKPT */)
return 0;
- psr = read_register_pid (IA64_PSR_REGNUM, ptid);
+ regcache_cooked_read_unsigned (regcache, IA64_PSR_REGNUM, &psr);
psr |= IA64_PSR_DD; /* Set the dd bit - this will disable the watchpoint
for the next instruction */
- write_register_pid (IA64_PSR_REGNUM, psr, ptid);
+ regcache_cooked_write_unsigned (regcache, IA64_PSR_REGNUM, psr);
*addr_p = (CORE_ADDR)siginfo.si_addr;
return 1;