From owner-freebsd-doc@FreeBSD.ORG Fri Jul 20 00:30:12 2012 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6652F106566B for ; Fri, 20 Jul 2012 00:30:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 30E048FC16 for ; Fri, 20 Jul 2012 00:30:12 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q6K0UCS5041756 for ; Fri, 20 Jul 2012 00:30:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q6K0UCCi041755; Fri, 20 Jul 2012 00:30:12 GMT (envelope-from gnats) Resent-Date: Fri, 20 Jul 2012 00:30:12 GMT Resent-Message-Id: <201207200030.q6K0UCCi041755@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Carl Delsey Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D0D91065675 for ; 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 ; 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: Date: Thu, 19 Jul 2012 17:22:38 -0700 From: Carl Delsey To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: docs/170013: Remote GDB config section of Developer's Handbook is a bit confusing X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Carl Delsey List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2012 00:30:12 -0000 >Number: 170013 >Category: docs >Synopsis: Remote GDB config section of Developer's Handbook is a bit confusing >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Fri Jul 20 00:30:11 UTC 2012 >Closed-Date: >Last-Modified: >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). - You should configure the kernel in question with config - -g, include 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 strip -x, and boot it - using the 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 gdb: + You should configure the kernel in question with config -g + if building the "Traditional" way. If building the "New" way, + make sure the line + + makeoptions DEBUG=-g + + is in the configuration. In both cases include and + 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 strip + -x, and boot it using the 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 gdb: &prompt.user; kgdb kernel GDB is free software and you are welcome to distribute copies of it --- kerneldebug-gdb-doc-update.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: