This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH]: minor fix to procfs_stopped_by_watchpoint



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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]