Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Sep 1997 13:21:30 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        hfwirth@ping.at, jlemon@americantv.com
Cc:        bde@zeta.org.au, emulation@FreeBSD.ORG
Subject:   Re: Doscmd, debugging with gdb
Message-ID:  <199709100321.NAA07491@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>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/<pid>/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



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