From 15558193be02a1f723e3e66af2065df27cf69893 Mon Sep 17 00:00:00 2001 From: jfieber Date: Mon, 31 Jul 1995 01:18:46 +0000 Subject: [PATCH] Minor corrections. Submitted by: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) --- share/doc/handbook/kerneldebug.sgml | 56 +++++++++++++++-------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/share/doc/handbook/kerneldebug.sgml b/share/doc/handbook/kerneldebug.sgml index 35dd9763088f..6afbd419bbb8 100644 --- a/share/doc/handbook/kerneldebug.sgml +++ b/share/doc/handbook/kerneldebug.sgml @@ -1,13 +1,6 @@ - + - - Kernel Debugging

Contributed by &a.paul; and &a.joerg; @@ -16,23 +9,28 @@

Here are some instructions for getting kernel debugging working on a crash dump, it assumes that you have enough swap - space for a crash dump. If you happen to have multiple swap - partitions with the first one being too small to keep the dump, + space for a crash dump. If you have multiple swap + partitions and the first one is too small to hold the dump, you can configure your kernel to use an alternate dump device - (in the kernel line). Dumps to non-swap devices, + (in the config kernel line), or + you can specify an alternate using the dumpon(8) command. + Dumps to non-swap devices, tapes for example, are currently not supported. Config your - kernel using config -g. - + kernel using config -g. See for details on configuring the FreeBSD kernel. + Use the dumpon(8) command to tell the kernel where to dump + to (note that this will have to be done after configuring the + partition in question as swap space via swapon(8)). This is + normally arranged via /etc/sysconfig and /etc/rc. + Alternatively, you can + hard-code the dump device via the `dump' clause in the `config' line + of your kernel config file. This is deprecated, but might be the + only chance to get a crash dump from a kernel that's not booting at + all, so that you didn't had the ability to run any command before it + used to crash. + Note: In the following, the term `kgdb' refers to gdb run in `kernel debug mode'. This can be accomplished by either starting the gdb with the option -k, or by linking @@ -43,7 +41,10 @@ options DODUMP kernel.debug, and then run strip -x on the original. Install the original as normal. You may also install the unstripped kernel, but symbol table lookup time for some - programs might drastically increase. + programs will drastically increase, and since + the whole kernel is loaded entirely at boot time and cannot be + swapped out later, several megabytes of + physical RAM willl be wasted. If you are testing a new kernel, for example by typing the new kernel's name at the boot prompt, but need to boot a different @@ -200,14 +201,12 @@ options DODUMP it, and it's therefore not compiled using config -g? Not everything is lost here. Don't panic! - Go to your kernel compile directory, and edit the line containing COPTFLAGS?=-O. Add the -g option @@ -269,8 +268,11 @@ options DODUMP The second scenario is a hot-key on the keyboard, usually Ctrl-Alt-ESC. For syscons, this can be remapped, and some of - the distributed maps do this, so watch out. Patches for a - COMCONSOLE kernel, are available from &a.joerg;. + the distributed maps do this, so watch out. + There's an option + available for a COMCONSOLE kernel (``options BREAK_TO_DEBUGGER'') + that allows the use of a serial line BREAK on the console line to + enter DDB. The third way is that any panic condition will branch to DDB if the kernel is configured to use it. It is not wise to