From owner-freebsd-doc Thu Jun 18 07:21:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA10313 for freebsd-doc-outgoing; Thu, 18 Jun 1998 07:21:15 -0700 (PDT) (envelope-from owner-freebsd-doc@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA10291 for ; Thu, 18 Jun 1998 07:21:10 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id HAA09819; Thu, 18 Jun 1998 07:20:01 -0700 (PDT) Received: from tim.xenologics.com (tim.xenologics.com [194.77.5.24]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA10256 for ; Thu, 18 Jun 1998 07:20:59 -0700 (PDT) (envelope-from seggers@semyam.dinoco.de) Received: (from uucp@localhost) by tim.xenologics.com (8.8.5/8.8.8) with UUCP id QAA15011 for FreeBSD-gnats-submit@freebsd.org; Thu, 18 Jun 1998 16:18:41 +0200 (MET DST) Received: (from seggers@localhost) by semyam.dinoco.de (8.8.8/8.8.8) id NAA05554; Thu, 18 Jun 1998 13:21:01 +0200 (CEST) (envelope-from seggers) Message-Id: <199806181121.NAA05554@semyam.dinoco.de> Date: Thu, 18 Jun 1998 13:21:01 +0200 (CEST) From: Stefan Eggers Reply-To: seggers@semyam.dinoco.de To: FreeBSD-gnats-submit@FreeBSD.ORG Cc: seggers@semyam.dinoco.de X-Send-Pr-Version: 3.2 Subject: docs/6980: Handbook addition in kernel debugging section Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 6980 >Category: docs >Synopsis: Handbook addition in kernel debugging section >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Jun 18 07:20:00 PDT 1998 >Last-Modified: >Originator: Stefan Eggers >Organization: none >Release: FreeBSD 2.2.6-STABLE i386 >Environment: N/A >Description: I wanted to do some analysis on a crash dump I had and thus had to use a debugger. As I found gdb not good enough for displaying code and data (I have X11 running after all and with that it can be much nice) investigated the possibility of using ddd to do it. This worked and I think adding a small paragraph to the handbook might help others in the same situation. >How-To-Repeat: N/A >Fix: Adding the word ddd to the section heading would probably be a good idea, too. That is not included in this patch. *** kerneldebug.sgml 1998/05/29 22:00:49 1.18 --- kerneldebug.sgml 1998/06/18 11:12:17 *************** *** 76,81 **** --- 76,88 ---- and voila, you can debug the crash dump using the kernel sources just like you can for any other program. + Even debugging with ddd is possible. Just add option -k to + the command line you'd use normally and that's it. For example: + + ddd -k /var/crash/kernel.0 /var/crash/vmcore.0 + + Then you can go about looking at code and data with visual tools. + Here is a script log of a kgdb session illustrating the procedure. Long lines have been folded to improve readability, and the lines are >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message