summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2013-03-25 09:32:49 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-04 14:12:49 +0100
commit33629797add47f16a5521813ae06d6196a83cc57 (patch)
treed6d0c3b636b1629b35475d3f3847933443894027 /documentation/dev-manual
parent30a806dcbd8470bb97b52b246aab3b39389bb763 (diff)
downloadpoky-33629797add47f16a5521813ae06d6196a83cc57.tar.gz
dev-manual: Edits to the Using GDB section
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>
Diffstat (limited to 'documentation/dev-manual')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml66
1 files changed, 62 insertions, 4 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index aa52d17025..344b06b0aa 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -3228,7 +3228,7 @@
3228 </section> 3228 </section>
3229 3229
3230 <section id="platdev-gdb-remotedebug-launch-gdb"> 3230 <section id="platdev-gdb-remotedebug-launch-gdb">
3231 <title>Launching GDB on the Host Computer</title> 3231 <title>Launch GDB on the Host Computer</title>
3232 3232
3233 <para> 3233 <para>
3234 Running GDB on the host computer takes a number of stages. 3234 Running GDB on the host computer takes a number of stages.
@@ -3236,13 +3236,13 @@
3236 </para> 3236 </para>
3237 3237
3238 <section id="platdev-gdb-remotedebug-launch-gdb-buildcross"> 3238 <section id="platdev-gdb-remotedebug-launch-gdb-buildcross">
3239 <title>Building the Cross-GDB Package</title> 3239 <title>Build the Cross-GDB Package</title>
3240 <para> 3240 <para>
3241 A suitable GDB cross-binary is required that runs on your host computer but 3241 A suitable GDB cross-binary is required that runs on your host computer but
3242 also knows about the the ABI of the remote target. 3242 also knows about the the ABI of the remote target.
3243 You can get this binary from the meta-toolchain. 3243 You can get this binary from the meta-toolchain.
3244 Here is an example where the toolchain has been installed 3244 Here is an example where the toolchain has been installed
3245 in the default directory <filename>/opt/poky/1.4</filename>: 3245 in the default directory <filename>/opt/poky/&DISTRO;</filename>:
3246 <literallayout class='monospaced'> 3246 <literallayout class='monospaced'>
3247 /opt/poky/1.4/sysroots/i686-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb 3247 /opt/poky/1.4/sysroots/i686-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb
3248 </literallayout> 3248 </literallayout>
@@ -3263,6 +3263,63 @@
3263 </para> 3263 </para>
3264 </section> 3264 </section>
3265 3265
3266 <section id='create-the-gdb-initialization-file'>
3267 <title>Create the GDB Initialization File</title>
3268
3269 <para>
3270 Aside from the GDB cross-binary, you also need a GDB
3271 initialization file in the same top directory in which
3272 your binary resides.
3273 When you start GDB on your host development system, GDB
3274 finds this initialization file and executes all the
3275 commands within.
3276 For information on the <filename>.gdbinit</filename>, see
3277 "<ulink url='http://sourceware.org/gdb/onlinedocs/gdb/'>Debugging with GDB</ulink>"
3278 by maintained by
3279 <ulink url='http://www.sourceware.org'>sourceware.org</ulink>.
3280 </para>
3281 </section>
3282
3283 <section id='point-to-your-root-filesystem'>
3284 <title>Point to Your Root Filesystem</title>
3285
3286 <para>
3287 Before starting your debugging session, you need to enter
3288 the following to set your sysroot filesystem location
3289 by using a command with this form:
3290 <literallayout class='monospaced'>
3291 set sysroot &lt;your-sysroot-path&gt;
3292 </literallayout>
3293 </para>
3294 </section>
3295
3296 <section id="platdev-gdb-remotedebug-launch-gdb-launchhost">
3297 <title>Launch the Host GDB</title>
3298
3299 <para>
3300 To launch the host GDB, you need to source the
3301 cross-debugging environment script, which if you installed
3302 the sysroot filesystem in the default location is at
3303 <filename>/opt/poky/&DISTRO;</filename> and begins with the
3304 string "environment-setup".
3305 </para>
3306
3307 <para>
3308 Finally, run the <filename>cross-gdb</filename> binary
3309 and provide the inferior binary as part of the command line.
3310 For example, the following command form continues with the
3311 example used in the previous section.
3312 This command form loads the <filename>foo</filename> binary
3313 as well as the debugging information:
3314 <literallayout class='monospaced'>
3315 $ &lt;target-abi&gt;-gdb rootfs/usr/bin/foo
3316 </literallayout>
3317 The commands in your <filename>.gdbinit</filename> execute
3318 and the GDB prompt appears.
3319 </para>
3320 </section>
3321
3322<!--
3266 <section id="platdev-gdb-remotedebug-launch-gdb-inferiorbins"> 3323 <section id="platdev-gdb-remotedebug-launch-gdb-inferiorbins">
3267 <title>Making the Inferior Binaries Available</title> 3324 <title>Making the Inferior Binaries Available</title>
3268 3325
@@ -3355,9 +3412,10 @@
3355 Port 2345 is the port on which the GDBSERVER is running. 3412 Port 2345 is the port on which the GDBSERVER is running.
3356 </para> 3413 </para>
3357 </section> 3414 </section>
3415-->
3358 3416
3359 <section id="platdev-gdb-remotedebug-launch-gdb-using"> 3417 <section id="platdev-gdb-remotedebug-launch-gdb-using">
3360 <title>Using the Debugger</title> 3418 <title>Use the Debugger</title>
3361 3419
3362 <para> 3420 <para>
3363 You can now proceed with debugging as normal - as if you were debugging 3421 You can now proceed with debugging as normal - as if you were debugging