Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Sep 2008 16:27:19 GMT
From:      Fritz Katz <frtzkatz@yahoo.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   docs/127253: Error in Handbook: http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-ddd.html
Message-ID:  <200809091627.m89GRJYG070708@www.freebsd.org>
Resent-Message-ID: <200809091630.m89GU2xv086928@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 09 16:30:02 UTC 2008
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809091627.m89GRJYG070708>