From owner-freebsd-bugs Fri Sep 12 07:20:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id HAA06245 for bugs-outgoing; Fri, 12 Sep 1997 07:20:04 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.7/8.8.7) id HAA06215; Fri, 12 Sep 1997 07:20:01 -0700 (PDT) Date: Fri, 12 Sep 1997 07:20:01 -0700 (PDT) Message-Id: <199709121420.HAA06215@hub.freebsd.org> To: freebsd-bugs Cc: From: Jonathan Lemon Subject: Re: gnu/4517: Cannot debug with gdb with message 'Error accessing memory address' Reply-To: Jonathan Lemon Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR gnu/4517; it has been noted by GNATS. From: Jonathan Lemon To: yasu@mrit.mei.co.jp Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: gnu/4517: Cannot debug with gdb with message 'Error accessing memory address' Date: Fri, 12 Sep 1997 09:16:14 -0500 On Sep 09, 1997 at 03:17:20AM -0700, yasu@mrit.mei.co.jp wrote: > Breakpoint 1, main () at test.c:3 > 3 x = 1; > (gdb) n > 4 } > (gdb) set x = 100; > Error accessing memory address 0xefbfd48c: Bad address. Try this patch (courtesy of Bruce Evans): -- Jonathan ------------------------------ cut here ------------------------------ diff -c2 vm_map.c~ vm_map.c *** vm_map.c~ Mon Sep 1 18:00:38 1997 --- vm_map.c Wed Sep 10 14:02:48 1997 *************** *** 2288,2292 **** (entry->eflags & MAP_ENTRY_COW) == 0 || (entry->wired_count != 0)) { ! if ((fault_type & (prot)) != fault_type) RETURN(KERN_PROTECTION_FAILURE); } --- 2288,2293 ---- (entry->eflags & MAP_ENTRY_COW) == 0 || (entry->wired_count != 0)) { ! if ((fault_type & prot) != ! (fault_type & ~VM_PROT_OVERRIDE_WRITE)) RETURN(KERN_PROTECTION_FAILURE); }