0

Im trying to attach DDD to gdb on a remote machine. I have configured rsh to not require a pass for my machine & username.

ddd opens with "rtx5:1234: not found" and a pop-up with "GDB could not be started". From calling ddd --host rtx5:2159 --trace --no-exec-window /home/murray/beer-process

#  Running GDB (pid 2826, tty /dev/pts/1)...
#  Current language: C/C++
#  Searching "vsllib/ddd.vsl"...
#  Trying "/home/murray/.ddd/vsllib/ddd.vsl"
#  Trying "/usr/share/ddd-3.3.12/vsllib/ddd.vsl"
#  Searching "vsllib/ddd.vsl"..."/usr/share/ddd-3.3.12/vsllib/ddd.vsl".
<- "sh: line 0: exec: rtx5:2159: not found\n"
#  Running GDB (pid 2826, tty /dev/pts/1)...Exit 127.

The PID of GDB started by ddd from the trace logs are 4-digits. However, all the PIDs that I can see from the rtx(target) are 8-digit. I can not see gdb as a process yet the trace log indicates otherwise. Is the documentation out of date and I am invoking it incorrectly? How could I test if ddd is correctly rsh-ing?

I have addressed the caveats of the docs 2.4.1:

  • Beer-process binary is in the home dir of my username on the target.
  • Checked the path of gdb in /usr/bin/gdb
  • rtx5 does not have xterm therefore include --no-exec-window flag

Thanks in advance

  • If you did some research on your own, please share it too. If you try to do something first and ask more specific questions, your post will be more welcomed. – George Sovetov Dec 14 '16 at 21:13

1 Answers1

0

TLDR: Had a firewall on the host interfering only with ddd's rsh connection. I also had to substitute "rtx5" for "'rsh rtx5'". It wont find the program I pass it, even though its in the home directory of the remote target. I can however use ddd-gui to find, load, and debug it.

I could rsh to rtx5 without a password, then call gdb. I could not do "rsh rtx5 gdb" and have gdb start. This is due to rsh. When rsh is called without a command it operates out of 514. If rsh in called with a command it communicates and attempts to move to a different port number. This is where my firewall was blocking it.
Wireshark showed me from local to target after rsh connection:

destination unreachable (host administratively protected) 

ddd still has issues primarily that I can not load a binary which is in my remote home directory. This extends problem extends to attaching to running processes on the remote host. In both cases I can load/connect via the gui once the connection is established.
Furthermore I have to call ddd with 'rsh ' prepended to the remote-host name. This seems wrong. I'll update when I have more.