How to debug a C/C++ application remotely using ECLIPSE, different operating systems?

Asked

Viewed 112 times

0

I am developing a C++ application that runs a Nanopi M3 board with Linux specially compiled for my purpose, and there have been certain errors and unexpected behaviors, I would like to be able to debug the application remotely since Nanopi M3 is a Cortex-A53 with 8 colors do not want to burden you with tools and build time that is greater than my desktop (of course).

I use Eclipse on a Windows 10 station with Msys2 to encode and upload the code via GIT to Nanopi M3 where I compile directly into it sometimes since my destkop environment is having trouble cross compiling to Cortex-A.

But I would like to be able to debug the code through the Eclipse remotely.

How can I do it, using the Eclipse?

The machines are in different networks but have visibility of each other without problems. If need I can use SSH including with Tunneling for X11 (which I want to avoid)

I can even connect via GDB but there are problems already GDB windows uses i386 and Linux ARM uses ISA Armv8-A, I have already succeeded in using GDB loading the binary.

I tried to use GDB on two equal linux, but still I’m having problems.

1 answer

-1

Consult this documentation, I believe it will give you a north. Remote debugging serves exactly this purpose.

The first paragraph already explains.

If you are trying to debug a program running on a machine that cannot run gdb in the usual way, it is often Useful to use remote debugging. For example, you Might use remote debugging on an Operating system kernel, or on a small system which does not have a general purpose Operating system Powerful enough to run a full-featured Debugger.

Which operating system uses Nanopi M3? Embedded Linux? If so, you can install a VM on your Windows and run Linux to serve as a GDB server.

  • While this link may answer the question, it is best to include the essential parts of the answer here and provide the link for reference. Replies per link only can be invalidated if the page with the link is changed. - From Review

  • This is the official gdb page, I find it very unlikely that it will be changed.

  • Hello @gfleck, maybe I haven’t expressed myself clearly in the question, maybe I even seem a little lazy in reading the manual. But really my intention was to get a more direct response to this situation. I will dedicate a longer time and more specific the rereading of the manual and seek to improve the question if the doubt continues.

  • Tranquil @Delfino, here has the most specific documentation of how to do this, could even put here in the answer but would be a Ctrl+c and Ctrl+v, because the documentation is already very succinct.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.