Remote debugging using gnu DDD

Aaron picture Aaron · Feb 21, 2010 · Viewed 9.5k times · Source

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)

Answer

filofel picture filofel · Feb 22, 2010

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.