I guess this can be of general interest...
In project options (For C and C++ projects, should be there for others too -
but... reported as bug) there is a tab named Debugger.
There you have a group named Remote Debugging - it can be used for other
purposes too...
"Config gdb script" is not needed in this case.
The goal of "Run shell script" is to start gdbserver (or an application with
embedded gdbstub on the target). Key command here is:
ssh ${ruser} gdbserver jeloin:2345 "${remote##/*/}"
where jeloin:2345 is the host and a port. "${remote##/*/}" is magic for
remote filename without (the host local) path.
The goal of "Run gdb script" (gdb commands) is to connect with that target.
Key command in this file is:
target remote dox:2345
where dox:2345 is the target with a port.
(Note that the gdb script is run from the execution directory - often ./src
not the projects base - see "Run options")
So the remaining question is - when is the application downloaded to the
target?
It can be done as a part of the build process or with the "Run shell script"
but only if it is fast (NFS mounted partition on host readable from
target...?)
Add this to Makefile.am
all: hello.remote
hello.remote: hello
../target/transfer-target.sh hello
I built the remote debugging capability using scripts since I know that the
actual environment can vary a lot...
/RogerL
--
Roger Larsson
Skellefteå
Sweden