Debugging with GDB: GDB/MI Target Manipulation |
---|
Next: GDB/MI File Transfer Commands, Previous: GDB/MI File Commands, Up: GDB/MI [Contents][Index]
-target-attach
Command-target-attach pid | gid | file
Attach to a process pid or a file file outside of GDB, or a thread group gid. If attaching to a thread group, the id previously returned by ‘-list-thread-groups --available’ must be used.
The corresponding GDB command is ‘attach’.
(gdb) -target-attach 34 =thread-created,id="1" *stopped,thread-id="1",frame={addr="0xb7f7e410",func="bar",args=[]} ^done (gdb)
-target-detach
Command-target-detach [ pid | gid ]
Detach from the remote target which normally resumes its execution. If either pid or gid is specified, detaches from either the specified process, or specified thread group. There’s no output.
The corresponding GDB command is ‘detach’.
(gdb) -target-detach ^done (gdb)
-target-disconnect
Command-target-disconnect
Disconnect from the remote target. There’s no output and the target is generally not resumed.
The corresponding GDB command is ‘disconnect’.
(gdb) -target-disconnect ^done (gdb)
-target-download
Command-target-download
Loads the executable onto the remote target. It prints out an update message every half second, which includes the fields:
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).
The size of the overall executable to download.
Each message is sent as status record (see GDB/MI Output Syntax).
In addition, it prints the name and size of the sections, as they are downloaded. These messages include the following fields:
The name of the section.
The size of the section.
The size of the overall executable to download.
At the end, a summary is printed.
The corresponding GDB command is ‘load’.
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", total-sent="2560",total-size="9880"} +download,{section=".text",section-sent="3072",section-size="6668", total-sent="3072",total-size="9880"} +download,{section=".text",section-sent="3584",section-size="6668", total-sent="3584",total-size="9880"} +download,{section=".text",section-sent="4096",section-size="6668", total-sent="4096",total-size="9880"} +download,{section=".text",section-sent="4608",section-size="6668", total-sent="4608",total-size="9880"} +download,{section=".text",section-sent="5120",section-size="6668", total-sent="5120",total-size="9880"} +download,{section=".text",section-sent="5632",section-size="6668", total-sent="5632",total-size="9880"} +download,{section=".text",section-sent="6144",section-size="6668", total-sent="6144",total-size="9880"} +download,{section=".text",section-sent="6656",section-size="6668", total-sent="6656",total-size="9880"} +download,{section=".init",section-size="28",total-size="9880"} +download,{section=".fini",section-size="28",total-size="9880"} +download,{section=".data",section-size="3156",total-size="9880"} +download,{section=".data",section-sent="512",section-size="3156", total-sent="7236",total-size="9880"} +download,{section=".data",section-sent="1024",section-size="3156", total-sent="7748",total-size="9880"} +download,{section=".data",section-sent="1536",section-size="3156", total-sent="8260",total-size="9880"} +download,{section=".data",section-sent="2048",section-size="3156", total-sent="8772",total-size="9880"} +download,{section=".data",section-sent="2560",section-size="3156", total-sent="9284",total-size="9880"} +download,{section=".data",section-sent="3072",section-size="3156", total-sent="9796",total-size="9880"} ^done,address="0x10004",load-size="9880",transfer-rate="6586", write-rate="429" (gdb)
No equivalent.
N.A.
-target-flash-erase
Command-target-flash-erase
Erases all known flash memory regions on the target.
The corresponding GDB command is ‘flash-erase’.
The output is a list of flash regions that have been erased, with starting addresses and memory region sizes.
(gdb) -target-flash-erase ^done,erased-regions={address="0x0",size="0x40000"} (gdb)
-target-select
Command-target-select type parameters …
Connect GDB to the remote target. This command takes two args:
The type of target, for instance ‘remote’, etc.
Device names, host names and the like. See Commands for Managing Targets, for more details.
The output is a connection notification, followed by the address at which the target program is, in the following form:
^connected,addr="address",func="function name", args=[arg list]
The corresponding GDB command is ‘target’.
(gdb) -target-select remote /dev/ttya ^connected,addr="0xfe00a300",func="??",args=[] (gdb)
Next: GDB/MI File Transfer Commands, Previous: GDB/MI File Commands, Up: GDB/MI [Contents][Index]