From owner-freebsd-emulation Wed Sep 10 07:31:12 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id HAA04906 for emulation-outgoing; Wed, 10 Sep 1997 07:31:12 -0700 (PDT) Received: from sumatra.americantv.com (sumatra.americantv.com [207.170.17.37]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id HAA04901 for ; Wed, 10 Sep 1997 07:31:10 -0700 (PDT) Received: from right.PCS (right.PCS [148.105.10.31]) by sumatra.americantv.com (8.8.5/8.8.5) with ESMTP id JAA09423; Wed, 10 Sep 1997 09:31:02 -0500 (CDT) Received: (from jlemon@localhost) by right.PCS (8.6.13/8.6.4) id JAA12002; Wed, 10 Sep 1997 09:30:30 -0500 Message-ID: <19970910093030.28970@right.PCS> Date: Wed, 10 Sep 1997 09:30:30 -0500 From: Jonathan Lemon To: Bruce Evans Cc: emulation@FreeBSD.ORG, hfwirth@ping.at Subject: Re: Doscmd, debugging with gdb References: <199709100440.OAA10269@godzilla.zeta.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.61.1 In-Reply-To: <199709100440.OAA10269@godzilla.zeta.org.au>; from Bruce Evans on Sep 09, 1997 at 02:40:45PM +1000 Sender: owner-freebsd-emulation@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Sep 09, 1997 at 02:40:45PM +1000, Bruce Evans wrote: > 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); > } > Yup, this appears to fix the problem. With this patch, I can successfully run doscmd under gdb: > gdb obj/doscmd (gdb) handle SIGBUS nostop noprint (gdb) add-symbol-file obj/doscmd.kernel 0 (gdb) tbreak 96 (gdb) r -x Breakpoint 1 at 0x27bb: file /home/jlemon/doscmd/doscmd_loader.c, line 96. (gdb) tbreak doscmd.c:main (gdb) c Breakpoint 2 at 0x1171c1: file /home/jlemon/doscmd/doscmd.c, line 112. -- Jonathan