From aaeb7efa68b76ce3d55ee00e7ffa2b85da18465f Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Tue, 16 Jan 2001 17:41:51 +0000 Subject: [PATCH] 2001-01-16 Michael Snyder * procfs.c (procfs_stopped_by_watchpoint): Don't die if process goes away -- just return false. --- gdb/ChangeLog | 2 ++ gdb/procfs.c | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bdd13203bcf..c570ed13661 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2001-01-16 Michael Snyder + * procfs.c (procfs_stopped_by_watchpoint): Don't die if process + goes away -- just return false (ie. not stopped by watchpoint). * source.c (openp): Fix typo in comment. 2001-01-12 Nicholas Duffek diff --git a/gdb/procfs.c b/gdb/procfs.c index 10f2eb94ae1..de863c01e1a 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) -- 2.30.2