eclipse cdt cpp debugging

Just for people that want to remote debug an application.

(Plz mention:You have to compile your application in debug-mode!!!)

First you need to install gdb and gdbserver:

sudo apt-get install gdb gdbserver

Then you have to start the server. The server waits on a given port until gdb from the host connects:

gdbserver host:10000 your_app (e.g. gdbserver localhost:10000 AppOgreKit ) 

Now you have to switch to eclipse.

 

Click the RUN-Menu and navigate to the ‘Debug Configuration’. There you have to select ‘C/C++ Remote Application’ and click the small yellow plus icon on top of the dialog to create a new Remote Application.

Now you can check the default settings in the Debugger-Tab->Connection. Choose here the host where the server is running and the corresponding port.

Press Debug and the local gdb will call the gdb-server that starts the application on the server.