Question:
- Is it possible to debug, when the target is on a remote host?
Example:
# ddd --debugger /usr/bin/bashdb <sript-name> (on remote host)
Example:
# ddd --debugger /usr/bin/bashdb <sript-name> (on remote host)
What you can do is ssh into the remote host, and set the $DISPLAY
variable to point to your local host, so that ddd's GUI opens there:
First lookup your current $DISPLAY
:
mylocalhost:~> echo $DISPLAY
mylocalhost:1
Assuming that your current X-client is on port 1.
Now setup the remote $DISPLAY
to point to your local machine:
mylocalhost:~> ssh remotehost
remotehost:~> setenv DISPLAY mylocalhost:1
Now fire up ddd:
remotehost:~> ddd <whatever parameters you want>
Note that you may have to open up your local X-client to remote connections before you do this. This is how:
mylocalhost:~> xhost +
Use gdbserver on the target (remote) machine as explained there. Then follow the config steps for gdb remote debugging (look up the gdb doc), typing the commands in the ddd console window (it's a pass through to the gdb prompt).
This could be something like this (if your link to the target were an USB to serial link, for instance):
(gdb) set remotebaud 115200
(gdb) target remote /dev/ttyUSB0
or
(gdb) target remote the-target:2345
to debug the gdbserver on IP the-target,using TCP port 2345.