diff options
author | Nik Clayton <nik@FreeBSD.org> | 1999-05-29 12:55:39 +0000 |
---|---|---|
committer | Nik Clayton <nik@FreeBSD.org> | 1999-05-29 12:55:39 +0000 |
commit | 419cffe7ba8c979e76550f951bd574b04f0996ac (patch) | |
tree | 147b4e3cc89f5d5203c74607f62fff085739f8a3 /en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.sgml | |
parent | c1762b1b9befb0c33a4414a1f21685232800d41f (diff) | |
download | doc-419cffe7ba8c979e76550f951bd574b04f0996ac.tar.gz doc-419cffe7ba8c979e76550f951bd574b04f0996ac.zip |
Update information on how to build a debug kernel, fix a typo and
a contraction.
PR: docs/11849
Submitted by: chris@calldei.com
Notes
Notes:
svn path=/head/; revision=4966
Diffstat (limited to 'en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.sgml')
-rw-r--r-- | en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.sgml | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.sgml b/en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.sgml index ea04282a87..fa8b1aee67 100644 --- a/en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.sgml +++ b/en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.sgml @@ -1,7 +1,7 @@ <!-- The FreeBSD Documentation Project - $Id: chapter.sgml,v 1.14 1999-05-22 16:36:02 obrien Exp $ + $Id: chapter.sgml,v 1.15 1999-05-29 12:55:39 nik Exp $ --> <chapter id="kerneldebug"> @@ -242,7 +242,7 @@ <screen>&prompt.root; <userinput>ddd -k /var/crash/kernel.0 /var/crash/vmcore.0</userinput></screen> <para>You should then be able to go about looking at the crash dump using - <command>ddd</command>'d graphical interface.</para> + <command>ddd</command>'s graphical interface.</para> </sect1> <sect1> @@ -254,22 +254,23 @@ <para>Of course, you still need to enable crash dumps. See above on the options you have to specify in order to do this.</para> - - <para>Go to your kernel compile directory, and edit the line containing - <literal>COPTFLAGS?=-O</literal>. Add the <option>-g</option> option - there (but <emphasis>do not</emphasis> change anything on the level of - optimization). If you do already know roughly the probable location of - the failing piece of code (e.g., the <devicename>pcvt</devicename> - driver in the example above), remove all the object files for this code. - Rebuild the kernel. Due to the time stamp change on the Makefile, there - will be some other object files rebuild, for example + + <para>Go to your kernel config directory + (<filename>/usr/src/sys/<replaceable>arch</replaceable>/conf</filename>) + and edit your configuration file. Uncomment (or add, if it does not + exist) the following line</para> + + <programlisting> +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</programlisting> + + <para>Rebuild the kernel. Due to the time stamp change on the Makefile, + there will be some other object files rebuild, for example <filename>trap.o</filename>. With a bit of luck, the added <option>-g</option> option will not change anything for the generated code, so you will finally get a new kernel with similar code to the faulting one but some debugging symbols. You should at least verify the - old and new sizes with the - &man.size.1; command. If there is a mismatch, you probably need to - give up here.</para> + old and new sizes with the &man.size.1; command. If there is a + mismatch, you probably need to give up here.</para> <para>Go and examine the dump as described above. The debugging symbols might be incomplete for some places, as can be seen in the stack trace @@ -481,8 +482,8 @@ options DDB</programlisting> <sect1> <title>On-line Kernel Debugging Using Remote GDB</title> - <para>This feature has been supported since FreeBSD 2.2, and it's actually - a very neat one.</para> + <para>This feature has been supported since FreeBSD 2.2, and it is + actually a very neat one.</para> <para>GDB has already supported <emphasis>remote debugging</emphasis> for a long time. This is done using a very simple protocol along a serial |