summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual/dev-manual-common-tasks.xml
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/dev-manual/dev-manual-common-tasks.xml')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml186
1 files changed, 5 insertions, 181 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 243f4aed1e..ac82dad0a3 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -1509,8 +1509,8 @@
1509 You can find a complete description of the 1509 You can find a complete description of the
1510 <filename>devtool add</filename> command in the 1510 <filename>devtool add</filename> command in the
1511 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-a-closer-look-at-devtool-add'>A Closer Look at <filename>devtool</filename> add</ulink>" 1511 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-a-closer-look-at-devtool-add'>A Closer Look at <filename>devtool</filename> add</ulink>"
1512 section in the Yocto Project Software Development Kit 1512 section in the Yocto Project Application Development
1513 (SDK) Developer's Guide. 1513 and the Extensible Software Development Kit (eSDK) manual.
1514 </para> 1514 </para>
1515 </section> 1515 </section>
1516 1516
@@ -3775,9 +3775,9 @@
3775 clean a recipe or have <filename>rm_work</filename> enabled, 3775 clean a recipe or have <filename>rm_work</filename> enabled,
3776 the 3776 the
3777 <ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'><filename>devtool</filename> workflow</ulink> 3777 <ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'><filename>devtool</filename> workflow</ulink>
3778 as described in the Yocto Project Software Development Kit 3778 as described in the Yocto Project Application Development
3779 (SDK) Developer's Guide is a safer development flow than the 3779 and the Extensible Software Development Kit (eSDK) manual
3780 flow that uses Quilt. 3780 is a safer development flow than the flow that uses Quilt.
3781 </note> 3781 </note>
3782 </para> 3782 </para>
3783 3783
@@ -9993,182 +9993,6 @@ Some notes from Cal:
9993 </para> 9993 </para>
9994 </section> 9994 </section>
9995 9995
9996<!--
9997 <section id='platdev-gdb-remotedebug-setup'>
9998 <title>Set Up the Cross-Development Debugging Environment</title>
9999
10000 <para>
10001 Before you can initiate a remote debugging session, you need
10002 to be sure you have set up the cross-development environment,
10003 toolchain, and sysroot.
10004 The <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-intro'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>
10005 describes this process.
10006 </para>
10007 </section>
10008
10009 <section id="platdev-gdb-remotedebug-launch-gdbserver">
10010 <title>Launch gdbserver on the Target</title>
10011
10012 <para>
10013 Make sure gdbserver is installed on the target.
10014 If it is not, install the package
10015 <filename>gdbserver</filename>, which needs the
10016 <filename>libthread-db1</filename> package.
10017 </para>
10018
10019 <para>
10020 Here is an example, that when entered from the host,
10021 connects to the target and launches gdbserver in order to
10022 "debug" a binary named <filename>helloworld</filename>:
10023 <literallayout class='monospaced'>
10024 $ gdbserver localhost:2345 /usr/bin/helloworld
10025 </literallayout>
10026 gdbserver should now be listening on port 2345 for debugging
10027 commands coming from a remote GDB process that is running on
10028 the host computer.
10029 Communication between gdbserver and the host GDB are done
10030 using TCP.
10031 To use other communication protocols, please refer to the
10032 <ulink url='http://www.gnu.org/software/gdb/'>Gdbserver documentation</ulink>.
10033 </para>
10034 </section>
10035
10036 <section id="platdev-gdb-remotedebug-launch-gdb">
10037 <title>Launch GDB on the Host Computer</title>
10038
10039 <para>
10040 Running GDB on the host computer takes a number of stages, which
10041 this section describes.
10042 </para>
10043
10044 <section id="platdev-gdb-remotedebug-launch-gdb-buildcross">
10045 <title>Build the Cross-GDB Package</title>
10046 <para>
10047 A suitable GDB cross-binary is required that runs on your
10048 host computer but also knows about the the ABI of the
10049 remote target.
10050 You can get this binary from the
10051 <link linkend='cross-development-toolchain'>Cross-Development Toolchain</link>.
10052 Here is an example where the toolchain has been installed
10053 in the default directory
10054 <filename>/opt/poky/&DISTRO;</filename>:
10055 <literallayout class='monospaced'>
10056 /opt/poky/&DISTRO;/sysroots/i686-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb
10057 </literallayout>
10058 where <filename>arm</filename> is the target architecture
10059 and <filename>linux-gnueabi</filename> is the target ABI.
10060 </para>
10061
10062 <para>
10063 Alternatively, you can use BitBake to build the
10064 <filename>gdb-cross</filename> binary.
10065 Here is an example:
10066 <literallayout class='monospaced'>
10067 $ bitbake gdb-cross
10068 </literallayout>
10069 Once the binary is built, you can find it here:
10070 <literallayout class='monospaced'>
10071 tmp/sysroots/<replaceable>host-arch</replaceable>/usr/bin/<replaceable>target-platform</replaceable>/<replaceable>target-abi</replaceable>-gdb
10072 </literallayout>
10073 </para>
10074 </section>
10075
10076 <section id='create-the-gdb-initialization-file'>
10077 <title>Create the GDB Initialization File and Point to Your Root Filesystem</title>
10078
10079 <para>
10080 Aside from the GDB cross-binary, you also need a GDB
10081 initialization file in the same top directory in which
10082 your binary resides.
10083 When you start GDB on your host development system, GDB
10084 finds this initialization file and executes all the
10085 commands within.
10086 For information on the <filename>.gdbinit</filename>, see
10087 "<ulink url='http://sourceware.org/gdb/onlinedocs/gdb/'>Debugging with GDB</ulink>",
10088 which is maintained by
10089 <ulink url='http://www.sourceware.org'>sourceware.org</ulink>.
10090 </para>
10091
10092 <para>
10093 You need to add a statement in the
10094 <filename>~/.gdbinit</filename> file that points to your
10095 root filesystem.
10096 Here is an example that points to the root filesystem for
10097 an ARM-based target device:
10098 <literallayout class='monospaced'>
10099 set sysroot ~/sysroot_arm
10100 </literallayout>
10101 </para>
10102 </section>
10103
10104 <section id="platdev-gdb-remotedebug-launch-gdb-launchhost">
10105 <title>Launch the Host GDB</title>
10106
10107 <para>
10108 Before launching the host GDB, you need to be sure
10109 you have sourced the cross-debugging environment script,
10110 which if you installed the root filesystem in the default
10111 location is at <filename>/opt/poky/&DISTRO;</filename>
10112 and begins with the string "environment-setup".
10113 For more information, see the
10114 <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-manual'>Yocto Project Software Development Kit (SDK) Developer's
10115 Guide</ulink>.
10116 </para>
10117
10118 <para>
10119 Finally, switch to the directory where the binary resides
10120 and run the <filename>cross-gdb</filename> binary.
10121 Provide the binary file you are going to debug.
10122 For example, the following command continues with the
10123 example used in the previous section by loading
10124 the <filename>helloworld</filename> binary as well as the
10125 debugging information:
10126 <literallayout class='monospaced'>
10127 $ arm-poky-linux-gnuabi-gdb helloworld
10128 </literallayout>
10129 The commands in your <filename>.gdbinit</filename> execute
10130 and the GDB prompt appears.
10131 </para>
10132 </section>
10133 </section>
10134
10135 <section id='platdev-gdb-connect-to-the-remote-gdb-server'>
10136 <title>Connect to the Remote GDB Server</title>
10137
10138 <para>
10139 From the target, you need to connect to the remote GDB
10140 server that is running on the host.
10141 You need to specify the remote host and port.
10142 Here is the command continuing with the example:
10143 <literallayout class='monospaced'>
10144 target remote 192.168.7.2:2345
10145 </literallayout>
10146 </para>
10147 </section>
10148
10149 <section id="platdev-gdb-remotedebug-launch-gdb-using">
10150 <title>Use the Debugger</title>
10151
10152 <para>
10153 You can now proceed with debugging as normal - as if you were debugging
10154 on the local machine.
10155 For example, to instruct GDB to break in the "main" function and then
10156 continue with execution of the inferior binary use the following commands
10157 from within GDB:
10158 <literallayout class='monospaced'>
10159 (gdb) break main
10160 (gdb) continue
10161 </literallayout>
10162 </para>
10163
10164 <para>
10165 For more information about using GDB, see the project's online documentation at
10166 <ulink url="http://sourceware.org/gdb/download/onlinedocs/"/>.
10167 </para>
10168 </section>
10169 </section>
10170-->
10171
10172 <section id='debugging-with-the-gnu-project-debugger-gdb-on-the-target'> 9996 <section id='debugging-with-the-gnu-project-debugger-gdb-on-the-target'>
10173 <title>Debugging with the GNU Project Debugger (GDB) on the Target</title> 9997 <title>Debugging with the GNU Project Debugger (GDB) on the Target</title>
10174 9998