Go to the first, previous, next, last section, table of contents.


Commands for managing targets

target type parameters
Connects the GDB host environment to a target machine or process. A target is typically a protocol for talking to debugging facilities. You use the argument type to specify the type or protocol of the target machine. Further parameters are interpreted by the target protocol, but typically include things like device names or host names to connect with, process numbers, and baud rates. The target command does not repeat if you press RET again after executing the command.
help target
Displays the names of all targets available. To display targets currently selected, use either info target or info files (see section Commands to specify files).
help target name
Describe a particular target, including any parameters necessary to select it.
set gnutarget args
GDB uses its own library BFD to read your files. GDB knows whether it is reading an executable, a core, or a .o file; however, you can specify the file format with the set gnutarget command. Unlike most target commands, with gnutarget the target refers to a program, not a machine. Warning: To specify a file format with set gnutarget, you must know the actual BFD name. See section Commands to specify files.
show gnutarget
Use the show gnutarget command to display what file format gnutarget is set to read. If you have not set gnutarget, GDB will determine the file format for each file automatically, and show gnutarget displays `The current BDF target is "auto"'.

Here are some common targets (available, or not, depending on the GDB configuration):

target exec program
An executable file. `target exec program' is the same as `exec-file program'.
target core filename
A core dump file. `target core filename' is the same as `core-file filename'.
target remote dev
Remote serial target in GDB-specific protocol. The argument dev specifies what serial device to use for the connection (e.g. `/dev/ttya'). See section Remote debugging. target remote now supports the load command. This is only useful if you have some other way of getting the stub to the target system, and you can put it somewhere in memory where it won't get clobbered by the download.
target sim
CPU simulator. See section Simulated CPU target.

The following targets are all CPU-specific, and only available for specific configurations.

target abug dev
ABug ROM monitor for M68K.
target adapt dev
Adapt monitor for A29K.
target amd-eb dev speed PROG
Remote PC-resident AMD EB29K board, attached over serial lines. dev is the serial device, as for target remote; speed allows you to specify the linespeed; and PROG is the name of the program to be debugged, as it appears to DOS on the PC. See section The EBMON protocol for AMD29K.
target array dev
Array Tech LSI33K RAID controller board.
target bug dev
BUG monitor, running on a MVME187 (m88k) board.
target cpu32bug dev
CPU32BUG monitor, running on a CPU32 (M68K) board.
target dbug dev
dBUG ROM monitor for Motorola ColdFire.
target ddb dev
NEC's DDB monitor for Mips Vr4300.
target dink32 dev
DINK32 ROM monitor for PowerPC.
target e7000 dev
E7000 emulator for Hitachi H8 and SH.
target es1800 dev
ES-1800 emulator for M68K.
target est dev
EST-300 ICE monitor, running on a CPU32 (M68K) board.
target hms dev
A Hitachi SH, H8/300, or H8/500 board, attached via serial line to your host. Use special commands device and speed to control the serial line and the communications speed used. See section GDB and Hitachi microprocessors.
target lsi dev
LSI ROM monitor for Mips.
target m32r dev
Mitsubishi M32R/D ROM monitor.
target mips dev
IDT/SIM ROM monitor for Mips.
target mon960 dev
MON960 monitor for Intel i960.
target nindy devicename
An Intel 960 board controlled by a Nindy Monitor. devicename is the name of the serial device to use for the connection, e.g. `/dev/ttya'. See section GDB with a remote i960 (Nindy).
target nrom dev
NetROM ROM emulator. This target only supports downloading.
target op50n dev
OP50N monitor, running on an OKI HPPA board.
target pmon dev
PMON ROM monitor for Mips.
target ppcbug dev
target ppcbug1 dev
PPCBUG ROM monitor for PowerPC.
target r3900 dev
Densan DVE-R3900 ROM monitor for Toshiba R3900 Mips.
target rdi dev
ARM Angel monitor, via RDI library interface.
target rdp dev
ARM Demon monitor.
target rom68k dev
ROM 68K monitor, running on an M68K IDP board.
target rombug dev
ROMBUG ROM monitor for OS/9000.
target sds dev
SDS monitor, running on a PowerPC board (such as Motorola's ADS).
target sparclite dev
Fujitsu sparclite boards, used only for the purpose of loading. You must use an additional command to debug the program. For example: target remote dev using GDB standard remote protocol.
target sh3 dev
target sh3e dev
Hitachi SH-3 and SH-3E target systems.
target st2000 dev speed
A Tandem ST2000 phone switch, running Tandem's STDBUG protocol. dev is the name of the device attached to the ST2000 serial line; speed is the communication line speed. The arguments are not used if GDB is configured to connect to the ST2000 using TCP or Telnet. See section GDB with a Tandem ST2000.
target udi keyword
Remote AMD29K target, using the AMD UDI protocol. The keyword argument specifies which 29K board or simulator to use. See section The UDI protocol for AMD29K.
target vxworks machinename
A VxWorks system, attached via TCP/IP. The argument machinename is the target system's machine name or IP address. See section GDB and VxWorks.
target w89k dev
W89K monitor, running on a Winbond HPPA board.

Different targets are available on different configurations of GDB; your configuration may have more or fewer targets.

Many remote targets require you to download the executable's code once you've successfully established a connection.

load filename
Depending on what remote debugging facilities are configured into GDB, the load command may be available. Where it exists, it is meant to make filename (an executable) available for debugging on the remote system--by downloading, or dynamic linking, for example. load also records the filename symbol table in GDB, like the add-symbol-file command. If your GDB does not have a load command, attempting to execute it gets the error message "You can't do that when your target is ..." The file is loaded at whatever address is specified in the executable. For some object file formats, you can specify the load address when you link the program; for other formats, like a.out, the object file format specifies a fixed address. On VxWorks, load links filename dynamically on the current target system as well as adding its symbols in GDB. With the Nindy interface to an Intel 960 board, load downloads filename to the 960 as well as adding its symbols in GDB. When you select remote debugging to a Hitachi SH, H8/300, or H8/500 board (see section GDB and Hitachi microprocessors), the load command downloads your program to the Hitachi board and also opens it as the current executable target for GDB on your host (like the file command). load does not repeat if you press RET again after using it.


Go to the first, previous, next, last section, table of contents.