manpagez: man pages & more
info gdb
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

24.17 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 No value for GDBN.

No value for GDBN Command

The corresponding No value for GDBN 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.

No value for GDBN Command

The No value for GDBN equivalent is ‘compare-sections’.

Example

N.A.

The -target-detach Command

Synopsis

 
 -target-detach

Detach from the remote target which normally resumes its execution. There's no output.

No value for GDBN Command

The corresponding No value for GDBN command is ‘detach’.

Example

 
(gdb)
-target-detach
^done
(gdb)

The -target-disconnect Command

Synopsis

 
 -target-disconnect

Disconnect from the remote target. There's no output and the target is generally not resumed.

No value for GDBN Command

The corresponding No value for GDBN command is ‘disconnect’.

Example

 
(gdb)
-target-disconnect
^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.

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 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:

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.

No value for GDBN Command

The corresponding No value for GDBN 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",
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)

The -target-exec-status Command

Synopsis

 
 -target-exec-status

Provide information on the state of the target (whether it is running or not, for instance).

No value for GDBN Command

There's no equivalent No value for GDBN command.

Example

N.A.

The -target-list-available-targets Command

Synopsis

 
 -target-list-available-targets

List the possible targets to connect to.

No value for GDBN Command

The corresponding No value for GDBN command is ‘help target’.

Example

N.A.

The -target-list-current-targets Command

Synopsis

 
 -target-list-current-targets

Describe the current target.

No value for GDBN Command

The corresponding information is printed by ‘info file’ (among other things).

Example

N.A.

The -target-list-parameters Command

Synopsis

 
 -target-list-parameters

No value for GDBN Command

No equivalent.

Example

N.A.

The -target-select Command

Synopsis

 
 -target-select type parameters …

Connect No value for GDBN to the remote target. This command takes two args:

type

The type of target, for instance ‘async’, ‘remote’, etc.

parameters

Device names, host names and the like. See section 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]

No value for GDBN Command

The corresponding No value for GDBN command is ‘target’.

Example

 
(gdb)
-target-select async /dev/ttya
^connected,addr="0xfe00a300",func="??",args=[]
(gdb)

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.