This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH]: minor fix to procfs_stopped_by_watchpoint
- To: gdb-patches at sources dot redhat dot com
- Subject: [PATCH]: minor fix to procfs_stopped_by_watchpoint
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Tue, 16 Jan 2001 09:41:36 -0800 (PST)
2001-01-16 Michael Snyder <msnyder@cleaver.cygnus.com>
* procfs.c (procfs_stopped_by_watchpoint): Don't die if process
goes away -- just return false (ie. not stopped by watchpoint).
Index: procfs.c
===================================================================
RCS file: /cvs/src/src/gdb/procfs.c,v
retrieving revision 1.21
diff -c -3 -p -r1.21 procfs.c
*** procfs.c 2000/12/15 01:01:48 1.21
--- procfs.c 2001/01/16 17:39:47
*************** procfs_stopped_by_watchpoint (int pid)
*** 4793,4800 ****
{
procinfo *pi;
! pi = find_procinfo_or_die (pid == -1 ?
! PIDGET (inferior_pid) : PIDGET (pid), 0);
if (proc_flags (pi) & (PR_STOPPED | PR_ISTOP))
{
if (proc_why (pi) == PR_FAULTED)
--- 4793,4804 ----
{
procinfo *pi;
! 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)