Peter Jeremy writes:
> I'd like to patch a running kernel to disable an annoying 
non-rate-limited
> message but gdb won't let me.  (For various reasons, I don't want to have
> to build a new kernel and reboot).
> 
> aalp03# chflags noschg /kernel
> aalp03# gdb -k /kernel /dev/mem
> GNU gdb 4.18
> ...
> IdlePTD 3457024
> initial pcb at 4d40000
> panic messages:
> ---
> ---
> #0  0xc0159bf0 in mi_switch ()
> (kgdb) set write on 
> (kgdb) print {int}0xc01fffa4 = 0x00004eb8
> kvm_write:write failed
> (kgdb) show write
> Writing into executable and core files is on.
> (kgdb)
> 
> 0xc01fffa4 is in the kernel text area.
> 
> This is 4.4-STABLE from mid-December running at securelevel -1.
> 
> Is there any way around this?
> 

RTFM :) You have to use the wcore option to turn on writing in kgdb mode.
The ``show write'' command is totally unrelated to this and only shows
what's set for _normal_ debugging. There's no way to tell from within
gdb whether wcore was used or not.

Unfortunately, the -w option is overloaded. Normally it means ``use
a windowing system''. In FreeBSD it's an alias for wcore.

---
Gary Jennejohn / [EMAIL PROTECTED] [EMAIL PROTECTED]



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to