Example

(gdb)

-target-detach ^done

(gdb)

The -target-download command

Synopsis

-target-download

Loads the executable onto the remote target. It prints out an update message every half second, which includes the fields:

'section'

'section-sent''section-size''total-sent'

The name of the section.

The size of what has been sent so far for that section.

The size of the section.

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 GDB/MI Output syntax” (page 308).

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"}

350 The GDB/MI Interface

Page 350
Image 350
HP gnu source-level debugger 5992-4701 target-download command, Name of the section, At the end, a summary is printed