I've been trying to debug a program that I leave running on over the weekend (takes a long time to segfault,) and the sleep for the debugging terminal is set to roughly a day. It's currently set to 80000 + PID. This should be set to something a little higher :) 80000 + PID + hour. The problem is if you debug a process for longer than a day the terminal's "sleep 80000+" will timeout and you can no longer get any output. I propose:
debuggergdb.cpp
cmd << wxString::Format(wxT("%d"),80000 + ::wxGetProcessId());
should be changed to
cmd << wxString::Format(wxT("%dh"),80000 + ::wxGetProcessId());
also, but not necessary:
uniqueSleepTimeStr << wxT("sleep ") << wxString::Format(wxT("%d"),80000 + ::wxGetProcessId());
to
uniqueSleepTimeStr << wxT("sleep ") << wxString::Format(wxT("%dh"),80000 + ::wxGetProcessId());
Here is the patch file is someone high up wants to implement it :D
tyia
iluia
Is there anyone in the dev group that can apply this? It's really a pain when you debug a process overnight and BAM the window closes .. hellllpppppp
The suffix seems like a GNU extension, so a better fix is adding 000 at the end of value :)
Quote from: oBFusCATed on February 17, 2011, 09:40:40 PM
The suffix seems like a GNU extension, so a better fix is adding 000 at the end of value :)
That would work but the adding "h" makes it multiplies the sleep by 3600 .. if I leave a debug session open for 80000 hours I probably have an acceptable bug lol :D
Fixed in the branch, sorry for the delay...
You have made me a happy coder .. :) thanks! I had a work around by sending SIGSTOP to the sleep process .. Although a few times I still forgot to do it and BOOM, there goes my debugging window .. haha ..
thanks again
p4