Community
Participate
Working Groups
Build ID: M20070921-1145 Steps To Reproduce: 1. Start SSH tunnels for ssh port and gdbserver port 2. Run gdbserver via ssh port over ssh tunnel 3. Run local gdb connecting to gdbserver port over ssh tunnel 4. gdb reports "putpkt: write failed: Broken pipe" More information: Target Management Service 2.0.0.v20070613 The tunnel is needed due to firewall settings The problem is: gdb tries to connect to gdbserver before gdbserver started (due to login delays). So, gdb fails to connect and reports the above mentioned error. Instead, one should make sure gdbserver actually started before gdb tries to connect.
Do you have a suggestion how we could probe whether the gdbserver has been started or not? Or, what would you think about another field in the launch config where the user could manually specify a delay in seconds to wait for gdbserver to start?
Hi Martin, > Do you have a suggestion how we could probe whether the gdbserver has been > started or not? Since the ssh connection is kept open to catch the gdbserver output, scanning the output, e.g. with select(), would be a nice solution. As soon as "Listening on port 2345" (or whatever other specified port number) appears in the output, gdb can be started. > Or, what would you think about another field in the launch config where the > user could manually specify a delay in seconds to wait for gdbserver to start? This would work, it is sort of how I patched it at the moment: [ ~]# cat /usr/bin/gdb.delayed #!/bin/bash sleep 10 gdb $@ Thanks, Sander
Moving into CDT as per bug 267065.