I have a Linux machine which is set up to cross-compile programs for an AVR target. It's easy to run and debug programs locally:
- Run the program with simavr (acts as GDB server)
- Run GDB (
avr-gdb) and connect it to simavr
I'd like to to recreate this flow remotely from Eclipse on a Windows machine. The Windows machine isn't really set up for development — it has Eclipse installed and the source code for my project, but it doesn't have any local C/C++ dev tools like GDB. I'd ideally like to visually debug using the local copy of the source, but by interacting with the remote GDB over SSH.
This Eclipse plugin seems to be the recommended tool for the job. Unfortunately I can't get this working. Here's what I've done:
- Created a new "C/C++ Remote Application" debug configuration.
- Set the "Preferred Launcher" to "Direct Remote Debugging Launcher".
- Pointed "Remote C/C++ exe file path" to the location of the binary on the remote machine
- Pointed "Remote workspace directory" to the location of the project source on the remote machine
This does not seem to work. When I attempt to debug with this configuration, I get this error:
Error with command: gdb --version
Cannot run program "gdb": Launching failed
This error makes sense. If I look in the "Debugger" tab of my debug configuration, the "GDB debugger" is set to gdb. If I open the file browser for the debugger, it only shows files on my local Windows machine. It looks like the configuration is set up to execute gdb on my machine.
I thought the point of the plugin was the launch GDB on a remote machine, but I can't find a way to make a debug configuration that actually does that. Any help would be appreciated.