Date: Thu, 07 Feb 2002 12:32:46 +0100 From: Gary Jennejohn <garyj@jennejohn.org> To: Peter Jeremy <peter.jeremy@alcatel.com.au> Cc: freebsd-hackers@freebsd.org Subject: Re: Patching a kernel Message-ID: <200202071132.g17BWkL52065@peedub.jennejohn.org> In-Reply-To: Your message of "Wed, 06 Feb 2002 07:37:13 %2B1100." <20020206073713.Z7444@gsmx07.alcatel.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
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 / garyj@jennejohn.org gj@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202071132.g17BWkL52065>