Connecting to the Remote Process

After gdbserver has loaded a program, use the target remote (gdb) or the attach remote (dbx)   command to connect to the remote process:

GDB Mode

target_remote_command

: target remote connection_info [local_copy_of_remote_file]

IDB connects to the remote agent.

DBX Mode

attach_remote_command

: attach remote connection_info [local_copy_of_remote_file]

The debugger connects to the remote agent and loads debug information from a local copy of the debuggee.

To load the debugging information from the file, use the symbol-file command. This command is only available in GDB mode:

symbol-file

: symbol-file [filename]

If the filename  matches the connection_info ([[protocol:]host]:port), use the protocol and the port. Otherwise use the filename  as a path to the serial device supporting the interface.

local_copy_of_remote_filename

: filename

This file provides the debugging information on the process running on the remote system. It does not need to be exactly the same file that is running on the remote system.