Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Apr 1997 19:10:03 -0700 (PDT)
From:      Tor Egge <Tor.Egge@idi.ntnu.no>
To:        freebsd-bugs
Subject:   Re: kern/3327: using gdb may cause hanging processes.
Message-ID:  <199704190210.TAA20562@freefall.freebsd.org>

index | next in thread | raw e-mail

The following reply was made to PR kern/3327; it has been noted by GNATS.

From: Tor Egge <Tor.Egge@idi.ntnu.no>
To: Tor.Egge@idi.ntnu.no
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/3327: using gdb may cause hanging processes.
Date: Sat, 19 Apr 1997 04:05:00 +0200

 > 	When debugging a process, gdb sometimes gives a message of
 > 	the form
 > 	
 > 		Cannot insert breakpoint 2:
 > 		Error accessing memory address 0x25240: Bad address.
 > 
 > 	After this, the process is stuck.
 
 A more complete fix:
  	
 	Allow fallback to backing objects when reading.
  	Unlock the vm map if vm_page_lookup fails.
  
 
 Index: procfs_mem.c
 ===================================================================
 RCS file: /home/ncvs/src/sys/miscfs/procfs/procfs_mem.c,v
 retrieving revision 1.24
 diff -c -r1.24 procfs_mem.c
 *** procfs_mem.c	1997/04/06 02:29:31	1.24
 --- procfs_mem.c	1997/04/19 01:49:07
 ***************
 *** 197,202 ****
 --- 197,213 ----
   		}
   
   		m = vm_page_lookup(object, pindex);
 + 
 + 		/* Allow fallback to backing objects if we are reading */
 + 
 + 		while (m == NULL && !writing && object->backing_object) {
 + 
 + 		  pindex += OFF_TO_IDX(object->backing_object_offset);
 + 		  object = object->backing_object;
 + 
 + 		  m = vm_page_lookup(object, pindex);
 + 		}
 + 
   		if (m == NULL) {
   			error = EFAULT;
   
 ***************
 *** 205,210 ****
 --- 216,223 ----
   			 * an error return on vm_map_lookup.
   			 */
   			object = NULL;
 + 
 + 			vm_map_lookup_done(tmap, out_entry);
   
   			break;
   		}


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704190210.TAA20562>