Remote debugging and timeouts


I'm trying to do some remote debugging and working from one machine to another in the same city works fine. However, I have a case where I want to remotely debug something on another continent and then I get a message like this:

Command timed out

I think that often happened in the past for many reasons but not much lately. This time I think it actually is a timeout. I have this in my .gdbinit file:

set tcp connect-timeout 300

Running with command line gdb verifies that it then tries to connect for 5 minutes, but CLion is too impatient for that. 5 minutes is of course overkill, but I was using that to test.

Is the Command timed out that I see a message from CLion or is it a gdb message and for some reason gdb inside CLion runs differently? 

Is there a way to fix this?

Comment actions Permalink



Comment actions Permalink

Yes, the timeout you observe could actually arise from how CLion interacts with GDB backend. Currently it is set to 30 sec. If the "Command timed out" message you observe shows up after about half a minute, then it likely comes from CLion.

Comment actions Permalink

I'm not currently doing anything that reproduces this issue, but I've turned on that setting to capture what happens if I do.

I have one more thing to add though that might be helpful. When we use gdb on the command line to connect to a remote gdbserver the turnaround time is very quick. Maybe a second or two. Nowhere near 30 seconds.


Please sign in to leave a comment.