From nobody@FreeBSD.org Tue Sep 9 16:27:19 2008 Return-Path: Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C616B106564A for ; Tue, 9 Sep 2008 16:27:19 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id B43F08FC0A for ; Tue, 9 Sep 2008 16:27:19 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m89GRJNp070709 for ; Tue, 9 Sep 2008 16:27:19 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m89GRJYG070708; Tue, 9 Sep 2008 16:27:19 GMT (envelope-from nobody) Message-Id: <200809091627.m89GRJYG070708@www.freebsd.org> Date: Tue, 9 Sep 2008 16:27:19 GMT From: Fritz Katz To: freebsd-gnats-submit@FreeBSD.org Subject: Error in Handbook: http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-ddd.html X-Send-Pr-Version: www-3.1 X-GNATS-Notify: >Number: 127253 >Category: docs >Synopsis: Error in Handbook: http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-ddd.html >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-doc >State: closed >Quarter: >Keywords: devhandbook >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 09 16:30:02 UTC 2008 >Closed-Date: Thu Dec 02 14:54:14 UTC 2010 >Last-Modified: Thu Dec 2 15:00:20 UTC 2010 >Originator: Fritz Katz >Release: 7.0-RELEASE i386 >Organization: AAArt >Environment: # uname -rm 7.0-RELEASE i386 >Description: This page in the handbook appears to give bad advice: http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-ddd.html # ddd -k /var/crash/kernel.0 /var/crash/vmcore.0 Is the handbook out-of-date? Has the '-k' option been removed from 'ddd'? I think the correct invocation for 'ddd' should be: # ddd --debugger kgdb kernel.debug /var/crash/vmcore.0 Following instructions in the handbook results in this message: "GDB could not be started.", and the ddd console window prints: GNU DDD 3.3.11 (i386-portbld-freebsd7.0), by Dorothea Lutkehaus and Andreas Zeller. ... gdb: unrecognized option '-k' Use 'gdb --help' for a complete list of options. Which appears to be correct since, # ddd --help and # gdb --help shows there is no option '-k' _________________ also, the second option, '/var/crash/kernel.0', also appears to be incorrect. That file or executable does not exist. Is that the executable? If so, my 'kernel' is located in: # cd /usr/obj/usr/src/sys/AAART/ # ls kernel* kernel kernel.debug kernel.symbols _________________ Attempting: # ddd --core=/var/crash/vmcore.0 gives this message: "/var/crash/vmcore.0" is not a core dump: File format not recognized (gdb) However, the instructions for the command line debugger, 'kgdb', on this page are OK: http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-gdb.html and the /var/crash/vmcore.0 is recognized. # cd /usr/obj/usr/src/sys/AAART/ # kgdb kernel.debug /var/crash/vmcore.0 >How-To-Repeat: Read the handbook and attempt to follow it's instructions. >Fix: Replace the offending line in the Handbook with: # ddd --debugger kgdb kernel.debug /var/crash/vmcore.0 >Release-Note: >Audit-Trail: From: John Baldwin To: freebsd-doc@freebsd.org Cc: Fritz Katz , freebsd-gnats-submit@freebsd.org Subject: Re: docs/127253: Error in Handbook: http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-ddd.html Date: Tue, 9 Sep 2008 13:22:00 -0400 I think your updates are correct. The old usage is from FreeBSD 4.x when one used 'gdb -k' rather than 'kgdb'. Crash dumps on 4.x also left a kernel image in /var/crash which explains the /var/crash/kernel.0 reference. -- John Baldwin Responsible-Changed-From-To: freebsd-doc->gavin Responsible-Changed-By: gavin Responsible-Changed-When: Thu Sep 11 18:44:21 UTC 2008 Responsible-Changed-Why: I'm already working on this section http://www.freebsd.org/cgi/query-pr.cgi?pr=127253 Responsible-Changed-From-To: gavin->freebsd-docs Responsible-Changed-By: gavin Responsible-Changed-When: Sun Jan 31 10:02:18 UTC 2010 Responsible-Changed-Why: Throw this back into the pook, I'm not sure when I'm going to get a chance to finish the overhaul of this documentation http://www.freebsd.org/cgi/query-pr.cgi?pr=127253 Responsible-Changed-From-To: freebsd-docs->freebsd-doc Responsible-Changed-By: gavin Responsible-Changed-When: Mon Mar 22 22:18:06 UTC 2010 Responsible-Changed-Why: Fix assignment http://www.freebsd.org/cgi/query-pr.cgi?pr=127253 State-Changed-From-To: open->closed State-Changed-By: ale State-Changed-When: Thu Dec 2 14:53:56 UTC 2010 State-Changed-Why: Fixed, thanks! http://www.freebsd.org/cgi/query-pr.cgi?pr=127253 From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: docs/127253: commit references a PR Date: Thu, 2 Dec 2010 14:53:49 +0000 (UTC) ale 2010-12-02 14:53:45 UTC FreeBSD doc repository Modified files: en_US.ISO8859-1/books/developers-handbook/kerneldebug chapter.sgml Log: Fix 'ddd' command-line parameters for kernel debug. PR: docs/127253 Submitted by: Fritz Katz Revision Changes Path 1.80 +1 -1 doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.sgml _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" >Unformatted: