Date: Wed, 02 Apr 1997 22:36:08 +0000 From: Gary Jennejohn <garyj@munich.netsurf.de> To: "Peter M. Chen" <pmchen@eecs.umich.edu> Cc: freebsd-current@freebsd.org, freebsd-questions@freebsd.org Subject: Re: writing to kernel global variables with gdb Message-ID: <199704022236.WAA01626@peedub.gj.org> In-Reply-To: Your message of "Tue, 01 Apr 1997 15:55:44 EST." <199704012055.PAA27208@life.eecs.umich.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
"Peter M. Chen" writes: >Hi Gary, > Joerg referred me to you as the maintainer for kgdb. I am using >"gdb -w -k kernel.debug /dev/mem" to try to change a global variable on a >running kernel (which Joerg thought should work), but I get >"kvm_write:write failed". This is true even when I run as root. > > Any ideas? > it turns out that there's already a "w" option ("use windows") defined in main.c. There's no code which makes use of it. If you start gdb with -wcore, then you can write OK. The "w" window option isn't documented with the --help flag. But then again, the "w" make core writable option isn't either, although wcore does show up in the list. Perhaps it would be better to use "-wk" for "writable kernel" (that's sort of mnemonic) in place of "-w". Any opinions ? Guess this should really be documented somewhere. This affects both -current and 2.2.1R :( I'm forwarding this to both the current and questions mail lists, since it's (IMO) of general interest. --- Gary Jennejohn Home - Gary.Jennejohn@munich.netsurf.de Work - gjennejohn@frt.dec.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704022236.WAA01626>