Connects the debugger host environment to a target machine.
The target command does not repeat if you press Enter again after executing the command.
Displays the names of all targets available. To display targets currently selected, use either info target or info files (see Section 18.1).
Describe a particular target, including any parameters necessary to select it.
The debugger uses its own library BFD to read your files. The debugger 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.
Note: To specify a file format with set gnutarget, you must know the actual BFD name.
See Section 18.1.
Use the show gnutarget command to display what file format gnutarget is set to read. If you have not set gnutarget, the debugger 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 debugger configuration):
An executable file. target exec program is the same as exec-file program.
Remote serial target in the debugger-specific protocol. The argument dev specifies what serial device to use for the connection (e.g. /dev/ttya). See Section 19.3. 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.
CPU simulator. See Chapter 5, Simulator.
A target computer connected to the host computer by a serial interface.