Debugging with GDB (February 2008)

Table Of Contents
316 Debugging with GDB
Synopsis
-target-download
Loads the executable onto the remote target. It prints out an update message every half
second, which includes the fields:
section The name of the section.
section-sent
The size of what has been sent so far for that section.
section-size
The size of the section.
total-sent
The total size of what was sent so far (the current and the previous sections).
total-size
The size of the overall executable to download.
Each message is sent as status record (see Section 21.1.2 [gdb/mi Output Syntax], page 270).
In addition, it prints the name and size of the sections, as they are downloaded. These
messages include the following fields:
section The name of the section.
section-size
The size of the section.
total-size
The size of the overall executable to download.
At the end, a summary is printed.
GDB command
The corresponding GDB command is load’.
Example
Note: each status message appears on a single line. Here the messages have been broken
down so that they can fit onto a page.
(gdb)
-target-download
+download,{section=".text",section-size="6668",total-size="9880"}
+download,{section=".text",section-sent="512",section-size="6668",
total-sent="512",total-size="9880"}
+download,{section=".text",section-sent="1024",section-size="6668",
total-sent="1024",total-size="9880"}
+download,{section=".text",section-sent="1536",section-size="6668",
total-sent="1536",total-size="9880"}
+download,{section=".text",section-sent="2048",section-size="6668",
total-sent="2048",total-size="9880"}
+download,{section=".text",section-sent="2560",section-size="6668",