| <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>1.4. Running and Debugging Your Program</title><link rel="stylesheet" href="cs.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="Sourcery G++ Lite"><link rel="up" href="chap-quickstart.html" title="Chapter 1. Quick Start"><link rel="prev" href="ch01s03.html" title="1.3. Building Your Program"><link rel="next" href="chap-installation.html" title="Chapter 2. Installation and Configuration"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">1.4. Running and Debugging Your Program</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s03.html">Prev</a> </td><th width="60%" align="center">Chapter 1. Quick Start</th><td width="20%" align="right"> <a accesskey="n" href="chap-installation.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id275509"></a>1.4. Running and Debugging Your Program</h2></div></div></div><p> | |
| The steps to run or debug your program depend on your target system and how | |
| it is configured. Choose the appropriate method for your target. | |
| </p><p><b>Run your program on the ARM GNU/Linux target. </b> | |
| To run a program using the included Sourcery G++ libraries, you | |
| must install the sysroot on the target, as previously discussed. | |
| Copy the executable for your program to the target system. | |
| The method you use for launching your program depends on how you | |
| have installed the libraries and built your program. | |
| <span> | |
| In some cases, you may need to invoke the Sourcery G++ dynamic | |
| linker explicitly. | |
| </span> | |
| Refer to <a class="xref" href="included-libraries.html" title="3.6. Using Sourcery G++ Lite on GNU/Linux Targets">Section 3.6, “Using Sourcery G++ Lite on GNU/Linux Targets”</a> for details. | |
| </p><p><b>Debug your program on the target using GDB server. </b> | |
| You can use GDB server on a remote target to debug your program. | |
| When debugging a program that uses the included Sourcery G++ libraries, | |
| you must use the <code class="command">gdbserver</code> executable included | |
| in the sysroot, and similar issues with respect to the dynamic linker | |
| as discussed previously apply. | |
| See <a class="xref" href="linux-gdbserver.html" title="3.7. Using GDB Server for Debugging">Section 3.7, “Using GDB Server for Debugging”</a> for detailed instructions. | |
| Once you have started GDB server on the target, you can connect to | |
| it from the debugger | |
| on your host system. | |
| Refer to <a class="xref" href="sec-remote-debugging.html" title="4.3. Running Applications from GDB">Section 4.3, “Running Applications from GDB”</a> for instructions on | |
| remote debugging from command-line GDB. | |
| </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="chap-quickstart.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="chap-installation.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">1.3. Building Your Program </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 2. Installation and Configuration</td></tr></table></div></body></html> |