Date: Thu, 19 Jul 2012 17:22:38 -0700 From: Carl Delsey <carl.r.delsey@intel.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: docs/170013: Remote GDB config section of Developer's Handbook is a bit confusing Message-ID: <e0d58a$56e390@orsmga002.jf.intel.com> Resent-Message-ID: <201207200030.q6K0UCCi041755@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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).</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: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e0d58a$56e390>