3 <title>Debugging with GDB
</title>
4 <meta http-equiv=
"Content-Type" content=
"text/html">
5 <meta name=
"description" content=
"Debugging with GDB">
6 <meta name=
"generator" content=
"makeinfo 4.3">
7 <link href=
"http://www.gnu.org/software/texinfo/" rel=
"generator-home">
12 Node:
<a name=
"Sparclet%20File">Sparclet File
</a>,
13 Next:
<a rel=
"next" accesskey=
"n" href=
"Sparclet-Connection.html#Sparclet%20Connection">Sparclet Connection
</a>,
14 Up:
<a rel=
"up" accesskey=
"u" href=
"Sparclet.html#Sparclet">Sparclet
</a>
18 <h5 class=
"subsubsection">Setting file to debug
</h5>
20 <p>The GDB command
<code>file
</code> lets you choose with program to debug.
22 <pre class=
"example"> (gdbslet) file prog
25 GDB then attempts to read the symbol table of
<code>prog
</code>.
27 the file by searching the directories listed in the command search
29 If the file was compiled with debug information (option
"-g"), source
30 files will be searched as well.
32 the source files by searching the directories listed in the directory search
33 path (see
<a href=
"Environment.html#Environment">Your program's environment
</a>).
35 to find a file, it displays a message such as:
37 <pre class=
"example"> prog: No such file or directory.
40 <p>When this happens, add the appropriate directories to the search paths with
41 the GDB commands
<code>path
</code> and
<code>dir
</code>, and execute the
42 <code>target
</code> command again.