]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
dev-manual: Edits to the Using GDB section
authorScott Rifenbark <scott.m.rifenbark@intel.com>
Mon, 25 Mar 2013 16:32:49 +0000 (09:32 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 4 Apr 2013 13:12:49 +0000 (14:12 +0100)
Fixes YOCTO #3540

First pass at altering this section based on changed methods
and Jessica Zhang's instructions.  Rather than fully removing a
couple of sections that have quite a bit of information, I
decided to comment them out for now.  Once the material is
reviewed I can remove the sections for good.

(From yocto-docs rev: bde7771166a178dd283fc9baacbee5239c679251)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
documentation/dev-manual/dev-manual-common-tasks.xml

index aa52d170254e43adc149c2cf13376aa67d0285e1..344b06b0aafe366d87bca3ba68ffa2ad9e1dcbe8 100644 (file)
         </section>
 
         <section id="platdev-gdb-remotedebug-launch-gdb">
-            <title>Launching GDB on the Host Computer</title>
+            <title>Launch GDB on the Host Computer</title>
 
             <para>
                 Running GDB on the host computer takes a number of stages.
             </para>
 
             <section id="platdev-gdb-remotedebug-launch-gdb-buildcross">
-                <title>Building the Cross-GDB Package</title>
+                <title>Build the Cross-GDB Package</title>
                 <para>
                     A suitable GDB cross-binary is required that runs on your host computer but
                     also knows about the the ABI of the remote target.
                     You can get this binary from the meta-toolchain.
                     Here is an example where the toolchain has been installed
-                    in the default directory <filename>/opt/poky/1.4</filename>:
+                    in the default directory <filename>/opt/poky/&DISTRO;</filename>:
                     <literallayout class='monospaced'>
      /opt/poky/1.4/sysroots/i686-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb
                     </literallayout>
                 </para>
             </section>
 
+            <section id='create-the-gdb-initialization-file'>
+                <title>Create the GDB Initialization File</title>
+
+                <para>
+                    Aside from the GDB cross-binary, you also need a GDB
+                    initialization file in the same top directory in which 
+                    your binary resides.
+                    When you start GDB on your host development system, GDB
+                    finds this initialization file and executes all the 
+                    commands within.
+                    For information on the <filename>.gdbinit</filename>, see
+                    "<ulink url='http://sourceware.org/gdb/onlinedocs/gdb/'>Debugging with GDB</ulink>"
+                    by maintained by
+                    <ulink url='http://www.sourceware.org'>sourceware.org</ulink>.
+                </para>
+            </section>
+
+            <section id='point-to-your-root-filesystem'>
+                <title>Point to Your Root Filesystem</title>
+
+                <para>
+                    Before starting your debugging session, you need to enter
+                    the following to set your sysroot filesystem location
+                    by using a command with this form:
+                    <literallayout class='monospaced'>
+     set sysroot &lt;your-sysroot-path&gt; 
+                    </literallayout>
+                </para>
+            </section>
+
+            <section id="platdev-gdb-remotedebug-launch-gdb-launchhost">
+                <title>Launch the Host GDB</title>
+
+                <para>
+                    To launch the host GDB, you need to source the 
+                    cross-debugging environment script, which if you installed
+                    the sysroot filesystem in the default location is at 
+                    <filename>/opt/poky/&DISTRO;</filename> and begins with the 
+                    string "environment-setup".
+                </para>
+
+                <para>
+                    Finally, run the <filename>cross-gdb</filename> binary 
+                    and provide the inferior binary as part of the command line.
+                    For example, the following command form continues with the 
+                    example used in the previous section.
+                    This command form loads the <filename>foo</filename> binary
+                    as well as the debugging information:
+                    <literallayout class='monospaced'>
+     $ &lt;target-abi&gt;-gdb rootfs/usr/bin/foo
+                    </literallayout>
+                    The commands in your <filename>.gdbinit</filename> execute
+                    and the GDB prompt appears.
+                </para>
+            </section>
+
+<!--
             <section id="platdev-gdb-remotedebug-launch-gdb-inferiorbins">
                 <title>Making the Inferior Binaries Available</title>
 
                     Port 2345 is the port on which the GDBSERVER is running.
                 </para>
             </section>
+-->
 
             <section id="platdev-gdb-remotedebug-launch-gdb-using">
-                <title>Using the Debugger</title>
+                <title>Use the Debugger</title>
 
                 <para>
                     You can now proceed with debugging as normal - as if you were debugging