From carl.r.delsey@intel.com  Fri Jul 20 00:22:40 2012
Return-Path: <carl.r.delsey@intel.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5D0D91065675
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 20 Jul 2012 00:22:40 +0000 (UTC)
	(envelope-from carl.r.delsey@intel.com)
Received: from mga09.intel.com (mga09.intel.com [134.134.136.24])
	by mx1.freebsd.org (Postfix) with ESMTP id 357058FC08
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 20 Jul 2012 00:22:39 +0000 (UTC)
Received: from orsmga002.jf.intel.com ([10.7.209.21])
  by orsmga102.jf.intel.com with ESMTP; 19 Jul 2012 17:22:39 -0700
Received: from crdelsey-dev.ch.intel.com (HELO crdelsey-dev.ch) ([143.182.51.116])
  by orsmga002.jf.intel.com with SMTP; 19 Jul 2012 17:22:38 -0700
Received: by crdelsey-dev.ch (sSMTP sendmail emulation); Thu, 19 Jul 2012 17:22:38 -0700
Message-Id: <e0d58a$56e390@orsmga002.jf.intel.com>
Date: Thu, 19 Jul 2012 17:22:38 -0700
From: Carl Delsey <carl.r.delsey@intel.com>
Reply-To: Carl Delsey <carl.r.delsey@intel.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Remote GDB config section of Developer's Handbook is a bit confusing
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         170013
>Category:       docs
>Synopsis:       Remote GDB config section of Developer's Handbook is a bit confusing
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    issyl0
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 20 00:30:11 UTC 2012
>Closed-Date:    Fri Jul 20 15:09:17 UTC 2012
>Last-Modified:  Fri Jul 20 15:09:17 UTC 2012
>Originator:     Carl Delsey
>Release:        FreeBSD 9.0-RELEASE i386
>Organization:
>Environment:
System: FreeBSD crdelsey-dev 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:15:25 UTC 2012 root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:
	The remote GDB setup section of the developer's handbook is a bit unclear. It talks
about building using config -g but doesn't explain how to build in the "New" way. It also
talks about setting flags 080 without explaining how to do that.
	
>How-To-Repeat:
	
>Fix:

--- kerneldebug-gdb-doc-update.patch begins here ---
Index: kerneldebug/chapter.sgml
===================================================================
--- kerneldebug/chapter.sgml	(revision 39236)
+++ kerneldebug/chapter.sgml	(working copy)
@@ -685,16 +685,22 @@
       simply runs a similar copy of the very same kernel (but stripped of the
       debugging information).</para>
 
-    <para>You should configure the kernel in question with <command>config
-	-g</command>, include <option>DDB</option> into the configuration, and
-      compile it as usual.  This gives a large binary, due to the
-      debugging information.  Copy this kernel to the target machine, strip
-      the debugging symbols off with <command>strip -x</command>, and boot it
-      using the <option>-d</option> boot option.  Connect the serial line
-      of the target machine that has "flags 080" set on its sio device
-      to any serial line of the debugging host.
-      Now, on the debugging machine, go to the compile directory of the target
-      kernel, and start <command>gdb</command>:</para>
+    <para>You should configure the kernel in question with <command>config -g
+      </command> if building the "Traditional" way. If building the "New" way,
+      make sure the line 
+      
+      <programlisting>makeoptions DEBUG=-g</programlisting>
+      
+      is in the configuration. In both cases include <option>DDB</option> and 
+      <option>GDB</option> into the configuration, and compile it as usual. This 
+      gives a large binary, due to the debugging information. Copy this kernel 
+      to the target machine, strip the debugging symbols off with <command>strip 
+      -x</command>, and boot it using the <option>-d</option> boot option. 
+      Connect the serial line of the target machine that has "flags 080" set on 
+      its sio device to any serial line of the debugging host. See the 
+      &man.sio.4; man page to see how to set the flags on an sio device. Now, on 
+      the debugging machine, go to the compile directory of the target kernel, 
+      and start <command>gdb</command>:</para>  
 
     <screen>&prompt.user; <userinput>kgdb kernel</userinput>
 GDB is free software and you are welcome to distribute copies of it
--- kerneldebug-gdb-doc-update.patch ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->issyl0 
Responsible-Changed-By: issyl0 
Responsible-Changed-When: Fri Jul 20 09:09:34 UTC 2012 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=170013 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/170013: commit references a PR
Date: Fri, 20 Jul 2012 14:46:17 +0000 (UTC)

 Author: issyl0
 Date: Fri Jul 20 14:46:08 2012
 New Revision: 39237
 URL: http://svn.freebsd.org/changeset/doc/39237
 
 Log:
   Describe remote GDB configuration in greater depth in the developer's handbook.
   
   PR:		docs/170013
   Submitted by:	Carl Delsey (carl.r.delsey (at) intel.com)
   Reviewed by:	gavin
   Approved by:	gjb (mentor)
 
 Modified:
   head/en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.sgml
 
 Modified: head/en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.sgml
 ==============================================================================
 --- head/en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.sgml	Thu Jul 19 12:17:56 2012	(r39236)
 +++ head/en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.sgml	Fri Jul 20 14:46:08 2012	(r39237)
 @@ -686,13 +686,17 @@
        debugging information).</para>
  
      <para>You should configure the kernel in question with <command>config
 -	-g</command>, include <option>DDB</option> into the configuration, and
 +	-g</command> if building the <quote>traditional</quote> way.  If
 +      building the <quote>new</quote> way, make sure that
 +      <literal>makeoptions DEBUG=-g</literal> is in the configuration.
 +      In both cases, include <option>DDB</option> in the configuration, and
        compile it as usual.  This gives a large binary, due to the
        debugging information.  Copy this kernel to the target machine, strip
        the debugging symbols off with <command>strip -x</command>, and boot it
        using the <option>-d</option> boot option.  Connect the serial line
        of the target machine that has "flags 080" set on its sio device
 -      to any serial line of the debugging host.
 +      to any serial line of the debugging host.  See &man.sio.4; for
 +      information on how to set the flags on an sio device.
        Now, on the debugging machine, go to the compile directory of the target
        kernel, and start <command>gdb</command>:</para>
  
 _______________________________________________
 svn-doc-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-doc-all
 To unsubscribe, send any mail to "svn-doc-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: issyl0 
State-Changed-When: Fri Jul 20 15:09:16 UTC 2012 
State-Changed-Why:  
Thanks very much for this.  The changes have been committed and should 
appear shortly in the developer's handbook. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=170013 
>Unformatted:
