Connecting to the Remote Process

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

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.

GDB Mode

 

target_remote_command

         : target remote connection-info [local-copy-of-remote-file]

 

IDB connects to the remote agent.

To load the debugging information from the file, use the symbol-file command:

 

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.