C ++ Remote Debugging Application with Eclipse GUI

I followed the steps in this link  and I am able to debug the binary file that is in the linux host from my Windows machine from the command line.

I have gdbserver on linux and I installed gdb using mingw on windows. As I said, I can query "target remote xxxx: 10000 test" for a command on Windows and debugging my test application.

My problem is that I can not do the same with eclipse gui, it seems to me that it has button buttons, options, but they do not make any sense to me.

I select debug_configurations -> C / C ++ Remote Application (the only thing that allows me to enter ip / port linux machine), on the "Home" tab for connecting I enter my linux ip. In the same menu, under the "Debugger" tab, I entered my path to the gdb window and the gdbserver port.

After I did everything I believe in, I gave enough information for eclipse to connect a gdb server, but this was never enough for eclipse. I check gdbserver logs by running gdbserver with --debug, gdbserver never starts, it does not write one line of the log. Eclipse does not even start the connection. But instead, it gives me an error, for example, "Error loading file." which makes no sense to me.

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

+4
source share
1 answer

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

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

+6
source

Source: https://habr.com/ru/post/1543223/


All Articles