diff options
Diffstat (limited to 'gdb/procfs.c')
-rw-r--r-- | gdb/procfs.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gdb/procfs.c b/gdb/procfs.c index a10574a..45b69bd 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -159,7 +159,7 @@ public: int region_ok_for_hw_watchpoint (CORE_ADDR, int) override; int can_use_hw_breakpoint (enum bptype, int, int) override; - bool stopped_data_address (CORE_ADDR *) override; + std::vector<CORE_ADDR> stopped_data_addresses () override; void procfs_init_inferior (int pid); }; @@ -3045,19 +3045,19 @@ procfs_target::stopped_by_watchpoint () return false; } -/* Returns 1 if the OS knows the position of the triggered watchpoint, - and sets *ADDR to that address. Returns 0 if OS cannot report that - address. This function is only called if - procfs_stopped_by_watchpoint returned 1, thus no further checks are - done. The function also assumes that ADDR is not NULL. */ +/* Returns a vector containing the position of the triggered watchpoint. + Returns the empty vector if OS cannot report that address. This + function is only called if procfs_stopped_by_watchpoint returned 1, thus + no further checks are done. */ -bool -procfs_target::stopped_data_address (CORE_ADDR *addr) +std::vector<CORE_ADDR> +procfs_target::stopped_data_addresses () { - procinfo *pi; - - pi = find_procinfo_or_die (inferior_ptid.pid (), 0); - return proc_watchpoint_address (pi, addr); + procinfo *pi = find_procinfo_or_die (inferior_ptid.pid (), 0); + CORE_ADDR addr; + if (proc_watchpoint_address (pi, &addr)) + return { addr }; + return {}; } int |