Author Topic: Linux Debug window timeout  (Read 4512 times)

Offline secks

  • Multiple posting newcomer
  • *
  • Posts: 20
Linux Debug window timeout
« on: December 03, 2010, 07:08:57 pm »
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: [Select]
cmd << wxString::Format(wxT("%d"),80000 + ::wxGetProcessId());should be changed to
Code: [Select]
cmd << wxString::Format(wxT("%dh"),80000 + ::wxGetProcessId());also, but not necessary:
Code: [Select]
uniqueSleepTimeStr << wxT("sleep ") << wxString::Format(wxT("%d"),80000 + ::wxGetProcessId());to
Code: [Select]
uniqueSleepTimeStr << wxT("sleep ") << wxString::Format(wxT("%dh"),80000 + ::wxGetProcessId());

Offline secks

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: Linux Debug window timeout
« Reply #1 on: December 03, 2010, 07:33:27 pm »
Here is the patch file is someone high up wants to implement it :D
tyia
iluia

Offline secks

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: Linux Debug window timeout
« Reply #2 on: February 17, 2011, 09:11:49 pm »
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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11714
    • Travis build status
Re: Linux Debug window timeout
« Reply #3 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 :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline secks

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: Linux Debug window timeout
« Reply #4 on: February 17, 2011, 09:57:24 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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11714
    • Travis build status
Re: Linux Debug window timeout
« Reply #5 on: March 28, 2011, 10:06:16 pm »
Fixed in the branch, sorry for the delay...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline secks

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: Linux Debug window timeout
« Reply #6 on: March 28, 2011, 10:29:55 pm »
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