aboutsummaryrefslogtreecommitdiff
path: root/gdb/procfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/procfs.c')
-rw-r--r--gdb/procfs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 10f2eb9..de863c0 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -4793,8 +4793,12 @@ procfs_stopped_by_watchpoint (int pid)
{
procinfo *pi;
- pi = find_procinfo_or_die (pid == -1 ?
- PIDGET (inferior_pid) : PIDGET (pid), 0);
+ pi = find_procinfo (pid == -1 ?
+ PIDGET (inferior_pid) : PIDGET (pid), 0);
+
+ if (!pi) /* If no process, then not stopped by watchpoint! */
+ return 0;
+
if (proc_flags (pi) & (PR_STOPPED | PR_ISTOP))
{
if (proc_why (pi) == PR_FAULTED)