Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remote debugging C++ application with Eclipse GUI

I followed the steps in this link and I manage to debug a binary which resides in linux host from my windows machine from command prompt.

I have gdbserver in linux and I installed gdb with the help of mingw in windows. As I told I can prompt "target remote x.x.x.x:10000 test" to command in windows and debug my test application.

My problem is I can't do the same with eclipse gui, it seems to me it has tones of buttons, options but they make no sense to me.

I am choosing debug_configurations-->C/C++ Remote Application(the only one which allows me to input linux machine ip/port), in "Main" tab to connection I am inputting my linux ip. In same menu under Debugger tab I am inputting my window's gdb path and gdbserver port.

After doing all those I believe I gave enough info to eclipse for connect gdb server but it never enough for eclipse. I am checking gdbserver logs by starting gdbserver with --debug, gdbserver never gets triggered, it does not writes a single line of log. Eclipse even does not starts a connection. But instead it gives me a error like "Error during file upload." which makes no sense to me.

I am using "Eclipse Version: Juno Service Release 2" . Any help will be appreciated .

like image 708
Kadir Erdem Demir Avatar asked Jun 04 '14 14:06

Kadir Erdem Demir


1 Answers

I believe that the "C/C++ Remote Application" option uses Eclipse's RDT (Remote Development Tools) and RSE (Remote System Explorer) to connect, upload, execute, and debug the application itself. It

If all you want to do is connect to a gdbserver, then create a "C/C++ Attach to Application" debug configuration, and under the Debugger tab, set Debugger to gdbserver.

like image 92
Josh Kelley Avatar answered Oct 20 '22 01:10

Josh Kelley