aboutsummaryrefslogtreecommitdiff
path: root/gdb/ia64-linux-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ia64-linux-nat.c')
-rw-r--r--gdb/ia64-linux-nat.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c
index e833f9d..891cbad 100644
--- a/gdb/ia64-linux-nat.c
+++ b/gdb/ia64-linux-nat.c
@@ -72,7 +72,7 @@ public:
int can_use_hw_breakpoint (enum bptype, int, int) override;
bool stopped_by_watchpoint () override;
- bool stopped_data_address (CORE_ADDR *) override;
+ std::vector<CORE_ADDR> stopped_data_addresses () override;
int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
struct expression *) override;
int remove_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
@@ -686,34 +686,32 @@ ia64_linux_nat_target::low_new_thread (struct lwp_info *lp)
enable_watchpoints_in_psr (lp->ptid);
}
-bool
-ia64_linux_nat_target::stopped_data_address (CORE_ADDR *addr_p)
+std::vector<CORE_ADDR>
+ia64_linux_nat_target::stopped_data_addresses ()
{
CORE_ADDR psr;
siginfo_t siginfo;
regcache *regcache = get_thread_regcache (inferior_thread ());
if (!linux_nat_get_siginfo (inferior_ptid, &siginfo))
- return false;
+ return {};
if (siginfo.si_signo != SIGTRAP
|| (siginfo.si_code & 0xffff) != 0x0004 /* TRAP_HWBKPT */)
- return false;
+ return {};
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. */
regcache_cooked_write_unsigned (regcache, IA64_PSR_REGNUM, psr);
- *addr_p = (CORE_ADDR) siginfo.si_addr;
- return true;
+ return { (CORE_ADDR) siginfo.si_addr };
}
bool
ia64_linux_nat_target::stopped_by_watchpoint ()
{
- CORE_ADDR addr;
- return stopped_data_address (&addr);
+ return !stopped_data_addresses ().empty ();
}
int