Home | History | Annotate | Download | only in porting

Lines Matching full:code

17 <p>The current version of <code>envsetup.sh</code> has a <code>gdbclient</code> command that handles much of the setup.  For example, to attach the
18 already-running <code>globaltime</code> application, execute the following, making sure that: 1) you do this from the same window used to build the software on the device you are debugging and 2) verify that the symbols in the object files in the build tree match up with what is installed on the device or emulator.</p>
25 <p>Android runs <code>gdbserver</code> on the device and an ARM aware <code>gdb</code>, named <code>arm-eabi-gdb</code>, on the desktop machine.</p>
28 run <code>gdbserver</code> on the device:<BR>
33 The <code>:5039</code> tells gdbserver to listen on port 5039 on the localhost, which adb bridges from the host to the device. <code>executable</code> represents the command to debug, a common one being runtime -s which starts the entire system all running in a single process. <br>
36 <li>Launch <code>gdb</code> on the desktop.
44 <p>At this point <code>gdb</code> will connect with your device
46 able to enter <code>c</code> to have the device start executing inside of the
47 desktop <code>gdb</code> session.</p>
60 <li>Start a special version of <code>gdb</code> that lives in the "prebuilt" area of the source tree: <br>
61 <code>prebuilt/Linux/toolchain-eabi-4.2.1/bin/arm-eabi-gdb</code> (for Linux) <br>
62 <code>prebuilt/darwin-x86/toolchain-eabi-4.2.1/bin/arm-eabi-gdb</code> (for Darwin) </li>
63 <li>If you can't find either special version of <code>gdb</code>, run <code>find prebuilt -name arm-eabi-gdb</code> in your source tree to find and run the latest version:
68 Where <i>product-name</i> is the name of the device product that you're building (for example, <code>sooner</code>),
69 and <i>executable</i> is the program to debug (usually <code>app_process</code> for an application).<br>
74 <li>In <code>gdb</code>, Tell <code>gdb</code> where to find the shared libraries that will get loaded:
80 <i>absolute-source-path</i> is the path to your source tree; for example, <code>/work/device</code> or <code>/Users/hoser/android/device</code>.<BR>
81 <i>product-name</i> is the same as above; for example, <code>sooner</code>. <BR>
83 Make sure you specify the correct directories&#151;<code>gdb</code> may not tell you if you make a mistake.</li>
84 <li>Connect to the device by issuing the <code>gdb</code> command:<BR>
90 The <code>:5039</code> tells <code>gdb</code> to connect to the localhost port 5039, which is bridged to the device by <code>adb</code>.<BR>
98 the linker loads <code>libc</code> into your process before hitting <code>main()</code>. Also note that
99 the <code>gdb</code> remote protocol doesn't have a way for the device to
118 and all processes with a <code>uid &lt;= 10000</code> will be trapped in this
131 <p>When you see the entry above, make sure <code>adb</code> is forwarding port 5039 (you only need to do this once,
134 Execute the line shown in the debug output, substituting 5039 for the proper <code>port</code>:
139 applications), the default values for the <code>gdbclient</code> command, <code>app_process</code> binary and port <code>5039</code>, are correct, so you can execute:</p>
145 steps as mentioned above (for example, <code>gdbclient hoser :5039</code> if
146 the <code>hoser</code> command has failed).</p>