# The Target Selection Dialog

### Overview

The Target Selection Dialog allows users to specify the debug target, the interface used to connect to the target, and some useful run options.

Target Selection topics:

- Selecting a Target
  - Specifying a Target
  - Choosing a Connection Interface
- Run Options
  - Run until 'main'
  - Set breakpoint at 'exit'
  - Display Download Dialog
  - Compare to remote executable

### Selecting a Target

Selecting a target involves choosing a target for debugging and setting connection interface options for the target.

Common targets include: "exec" for native debuggers, "remote" for establishing a connection to a target board via a serial line, "remotetcp" for TCP connections, and "sim" for connections to the simulator. There may be more depending on the configuration of the debugger being used.

In general, "remote" targets are always serial connections which require the user to specify the serial port and baud rate to be used for the connection and "remotetcp" targets are always TCP connections which require specifying the hostname and port number of the machine to which to connect. Depending upon configuration, there may be numerous serial- and TCP-based connections. These always follow the naming convention target and targettcp.

To select a target, choose one of the available targets from the dropdown menu in the Connection Frame. Then specify the interface options for this target: selecting the baudrate and serial port from the dropdown menus (serial targets only) or entering the hostname and port number (TCP targets only).

### Run Options

Three run options which may be selected include:

Run until 'main'
  Sets a breakpoint at main(). This has no effect when using GDB in tracing mode.
Set breakpoint at 'exit'
  Sets a breakpoint at exit(). This has no effect when using GDB in tracing mode.
Display Download Dialog
  Displays a dialog showing the progress of the download to the target section by section. This has no effect when using GDB in tracing mode.
Compare to remote executable
  When attaching to a tracing target, compare the host's and target's executable by computing the checksum of each loadable section.