From owner-freebsd-doc Sat May 22 18: 0:19 1999 Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 6FD211520D for ; Sat, 22 May 1999 18:00:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id SAA69271; Sat, 22 May 1999 18:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from leap.innerx.net (leap.innerx.net [38.179.176.25]) by hub.freebsd.org (Postfix) with ESMTP id B420E15101 for ; Sat, 22 May 1999 17:54:28 -0700 (PDT) (envelope-from chris@holly.dyndns.org) Received: from holly.dyndns.org (ip216.houston13.tx.pub-ip.psi.net [38.27.213.216]) by leap.innerx.net (Postfix) with ESMTP id 96F82370BF for ; Sat, 22 May 1999 20:54:26 -0400 (EDT) Received: (from chris@localhost) by holly.dyndns.org (8.9.3/8.9.3) id TAA09872; Sat, 22 May 1999 19:56:13 -0500 (CDT) (envelope-from chris) Message-Id: <199905230056.TAA09872@holly.dyndns.org> Date: Sat, 22 May 1999 19:56:13 -0500 (CDT) From: chris@calldei.com Reply-To: chris@calldei.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: docs/11849: [Patch] doc/en/handbook/kerneldebug/chapter.sgml is out of date Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 11849 >Category: docs >Synopsis: [Patch] doc/en/handbook/kerneldebug/chapter.sgml is out of date >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Sat May 22 18:00:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Chris Costello >Release: FreeBSD 4.0-CURRENT i386 >Organization: None. >Environment: doc tree, CVSupped a couple days ago. >Description: kerneldebug/chapter.sgml refers to out of date information, such as how to build a debug kernel. Also, it has a typo and a contraction that could be avoided. These synopsis lines are a bit redundant, eh? >How-To-Repeat: See http://www.freebsd.org/handbook/x19251.html >Fix: Index: chapter.sgml =================================================================== RCS file: /home/ncvs/doc/en/handbook/kerneldebug/chapter.sgml,v retrieving revision 1.13 diff -u -r1.13 chapter.sgml --- chapter.sgml 1999/04/12 04:41:20 1.13 +++ chapter.sgml 1999/05/23 00:50:55 @@ -242,7 +242,7 @@ &prompt.root; ddd -k /var/crash/kernel.0 /var/crash/vmcore.0 You should then be able to go about looking at the crash dump using - ddd'd graphical interface. + ddd's graphical interface. @@ -254,15 +254,17 @@ Of course, you still need to enable crash dumps. See above on the options you have to specify in order to do this. - - Go to your kernel compile directory, and edit the line containing - COPTFLAGS?=-O. Add the option - there (but do not 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 pcvt - 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 + + Go to your kernel config directory + (/usr/src/sys/arch/conf) + and edit your configuration file. Uncomment (or add, if it does not + exist) the following line + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols + + + Rebuild the kernel. Due to the time stamp change on the Makefile, + there will be some other object files rebuild, for example trap.o. With a bit of luck, the added option will not change anything for the generated code, so you will finally get a new kernel with similar code to the @@ -481,7 +483,7 @@ On-line Kernel Debugging Using Remote GDB - This feature has been supported since FreeBSD 2.2, and it's actually + This feature has been supported since FreeBSD 2.2, and it is actually a very neat one. GDB has already supported remote debugging for >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message