Initial bulk commit for "Git on MSys"
[msysgit/historical-msysgit.git] / mingw / info / gdb / Sparclet-Download.html
bloba1497ae4e3e0baa9170b3ecb377a52e32c86f0d6
1 <html lang="en">
2 <head>
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">
8 </head>
9 <body>
10 <div class="node">
11 <p>
12 Node:<a name="Sparclet%20Download">Sparclet Download</a>,
13 Next:<a rel="next" accesskey="n" href="Sparclet-Execution.html#Sparclet%20Execution">Sparclet Execution</a>,
14 Previous:<a rel="previous" accesskey="p" href="Sparclet-Connection.html#Sparclet%20Connection">Sparclet Connection</a>,
15 Up:<a rel="up" accesskey="u" href="Sparclet.html#Sparclet">Sparclet</a>
16 <hr><br>
17 </div>
19 <h5 class="subsubsection">Sparclet download</h5>
21 <p>Once connected to the Sparclet target,
22 you can use the GDB
23 <code>load</code> command to download the file from the host to the target.
24 The file name and load offset should be given as arguments to the <code>load</code>
25 command.
26 Since the file format is aout, the program must be loaded to the starting
27 address. You can use <code>objdump</code> to find out what this value is. The load
28 offset is an offset which is added to the VMA (virtual memory address)
29 of each of the file's sections.
30 For instance, if the program
31 <code>prog</code> was linked to text address 0x1201000, with data at 0x12010160
32 and bss at 0x12010170, in GDB, type:
34 <pre class="example"> (gdbslet) load prog 0x12010000
35 Loading section .text, size 0xdb0 vma 0x12010000
36 </pre>
38 <p>If the code is loaded at a different address then what the program was linked
39 to, you may need to use the <code>section</code> and <code>add-symbol-file</code> commands
40 to tell GDB where to map the symbol table.
42 </body></html>