From owner-freebsd-emulation Tue Sep 9 20:27:02 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id UAA00824 for emulation-outgoing; Tue, 9 Sep 1997 20:27:02 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id UAA00819 for ; Tue, 9 Sep 1997 20:26:59 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id NAA07491; Wed, 10 Sep 1997 13:21:30 +1000 Date: Wed, 10 Sep 1997 13:21:30 +1000 From: Bruce Evans Message-Id: <199709100321.NAA07491@godzilla.zeta.org.au> To: hfwirth@ping.at, jlemon@americantv.com Subject: Re: Doscmd, debugging with gdb Cc: bde@zeta.org.au, emulation@FreeBSD.ORG Sender: owner-freebsd-emulation@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >The problem appears to be that gdb is unable to write to any >region that is of type OBJT_DEFAULT (default) in the above >map, even though it is marked writable. gdb doesn't have any >problems reading from the address, though. > >A simple test case: > > > echo 'main() {}' > test.c > > cc -g test.c > > gdb a.out > (gdb) b main > (gdb) r > > cat /proc//map > [.. snip ..] > 0x8012000 0x8014000 0 2 rwx COW vnode > 0x8014000 0x801c000 0 8 rwx default > [.. snip ..] > (gdb) set *0x8012000 = 0 > (gdb) set *0x8014000 = 0 > Error accessing memory address 0x8014000: Bad address. `w' apparently means write-protected here :-). All the r-x COW vnodes are writable and all the rwx COW vnodes are non-writable. Bruce