Debugging with GDB Manual The GNU Source-Level Debugger (769148-001, March 2014)

GDB/MI Target Manipulation Commands
The -target-attach command
Synopsis
-target-attach pid | file
Attach to a process pid or a file file outside of GDB.
GDB command
The corresponding GDB command is 'attach'.
Example
N.A.
The -target-compare-sections command
Synopsis
-target-compare-sections [ section ]
Compare data of section section on target to the exec file. Without the argument, all sections
are compared.
GDB command
The GDB equivalent is 'compare-sections'.
Example
N.A.
The -target-detach command
Synopsis
-target-detach
Disconnect from the remote target. There is no output.
GDB command
The corresponding GDB command is 'detach'.
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' The name of the section.
'section-sent' The size of what has been sent so far for that section.
GDB/MI Target Manipulation Commands 267