newprint newprint - 1 year ago 106
C Question

Setting up the Eclipse for Remote C Debugging

I am pretty new to Eclipse. Trying to set up to do remote debugging.

Here is situation, I am connecting to remote machine running Linux, I am running Windows.

1) I have installed all the necessary tool for Eclipse, and was able to connect to Linux machine.

2) Remote machine has


linux1[1]% gdbserver
Usage: gdbserver [OPTIONS] COMM PROG [ARGS ...]
gdbserver [OPTIONS] --attach COMM PID
gdbserver [OPTIONS] --multi COMM

COMM may either be a tty device (for serial debugging), or
HOST:PORT to listen for a TCP connection.

--debug Enable debugging output.

Do I need to configure anything in

3) What else should I configure in Eclipse ? for remote debugging ?

4) Does it matter that my GDB version is different from remote Machine GDB ?

Thanks !

Answer Source

gdbserver needs more arguments. For example, say gdbserver localhost:1337 yourprogram yourprogramarguments and keep it running.

Then, in Eclipse, create a new debug configuration for a "C/C++ Application". On the main tab, on the bottom, choose GDB (GSF) Remote System Process Launcher as launcher. On the debugger tab, choose gdbserver Debugger as the debugger. Under connection, say TCP as connection type and give localhost:1337 as address. When you launch the configuration, you may control the remote gdb by entering commands into the console.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download