Debugging with GDB: GDB/MI File Transfer Commands

Next: GDB/MI Ada Exceptions Commands, Previous: GDB/MI Target Manipulation, Up: GDB/MI [Contents][Index]

### 27.21 GDB/MI File Transfer Commands

#### The `-target-file-put` Command

#### Synopsis

     -target-file-put hostfile targetfile

Copy file hostfile from the host system (the machine running GDB) to targetfile on the target system.

#### GDB Command

The corresponding GDB command is ‘`remote put`’.

#### Example

    (gdb)
    -target-file-put localfile remotefile
    ^done
    (gdb)

#### The `-target-file-get` Command

#### Synopsis

     -target-file-get targetfile hostfile

Copy file targetfile from the target system to hostfile on the host system.

#### GDB Command

The corresponding GDB command is ‘`remote get`’.

#### Example

    (gdb)
    -target-file-get remotefile localfile
    ^done
    (gdb)

#### The `-target-file-delete` Command

#### Synopsis

     -target-file-delete targetfile

Delete targetfile from the target system.

#### GDB Command

The corresponding GDB command is ‘`remote delete`’.

#### Example

    (gdb)
    -target-file-delete remotefile
    ^done
    (gdb)