Date: Mon, 16 Jun 2003 02:21:44 +0100 From: Ian Dowse <iedowse@maths.tcd.ie> To: "M. Warner Losh" <imp@bsdimp.com> Cc: freebsd-arch@freebsd.org Subject: Re: Message buffer and printf reentrancy patch Message-ID: <200306160221.aa52952@salmon.maths.tcd.ie> In-Reply-To: Your message of "Sun, 15 Jun 2003 12:28:52 MDT." <20030615.122852.26275397.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <20030615.122852.26275397.imp@bsdimp.com>, "M. Warner Losh" writes: >In message: <200306151406.aa36218@salmon.maths.tcd.ie> > Ian Dowse <iedowse@maths.tcd.ie> writes: >: occur via tputchar() when using xconsole, and generally make the >: use of printf() in the kernel a bit safer. Many of the ideas here >: were suggested by Bruce Evans. > >Safe enough to be used for ddb? That is, can we get the ddb output in >out dmesg buffers? That's what I use it for anyway - I use a laptop that has no serial ports but does retain its memory contents across a reboot, so having panic messages and stack traces left in the message buffer helps a lot. There are probably a few ways of doing it, but I just replaced db_putchar()'s contents with the following: printf("%c", c); if (c == '\r' || c == '\n') db_check_interrupt(); This probably needs to have a sysctl to control the behaviour, as many people won't want the message buffer to be filled up with interactive DDB output normally. Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200306160221.aa52952>