User forums > Help

Linux Debug window timeout

(1/2) > >>

secks:
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

--- Code: --- cmd << wxString::Format(wxT("%d"),80000 + ::wxGetProcessId());
--- End code ---
should be changed to

--- Code: --- cmd << wxString::Format(wxT("%dh"),80000 + ::wxGetProcessId());
--- End code ---
also, but not necessary:

--- Code: ---uniqueSleepTimeStr << wxT("sleep ") << wxString::Format(wxT("%d"),80000 + ::wxGetProcessId());
--- End code ---
to

--- Code: ---uniqueSleepTimeStr << wxT("sleep ") << wxString::Format(wxT("%dh"),80000 + ::wxGetProcessId());
--- End code ---

secks:
Here is the patch file is someone high up wants to implement it :D
tyia
iluia

secks:
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

oBFusCATed:
The suffix seems like a GNU extension, so a better fix is adding 000 at the end of value :)

secks:

--- 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 :)

--- End quote ---
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

Navigation

[0] Message Index

[#] Next page

Go to full version