Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
(crush) debugging with gdb - infinit loop problem
DoMeN:
I tryed with changing the code to use windows style of killing gdb insetad of linux style and I don't experience any crashes. Don't know why. I gues that there must be something wrong with pid variable since windows part of the code uses m_Pid instead and works OK.
I think that it would be better if this difference between linux and windows part would be removed and only win src would stay. Should I do this and commit a patch to BerilOS?
r. Domen
Pecan:
--- Quote from: DoMeN on March 02, 2007, 09:02:43 am ---I experience a crush in debuggergdb.cpp: void DebuggerGDB::Stop() in this line -> wxKill(pid, wxSIGINT);
Is this a wxWidgets function or is it a c::b function? I can't find its body so I gues this is wxWidgets stuff. How can I debug this?
r. Domen
--- End quote ---
If my fix was applied correctly, that line should read
--- Code: ---If (pid > 0)
wxKill(pid, wxSIGINT);
--- End code ---
The wxKill is killing codeblocks itself under some conditions because the pid is not checked.
Make sure the "if (pid > 0)" is there.
DoMeN:
Oh I see,
I only applied patch 1881 as the console patch is only intended for linux use and I'd like to have the same source for windows as well without aditional differences in what is implemented. I didn't know that it is necessary to apply both of the patches to fix gdb crush bug. I'll test it.
r. Domen
DoMeN:
BTW when has the patch No. 1882 been changed?
This part is now missing.
@@ -1521,7 +1550,8 @@
_("Debug"), wxOK | wxICON_EXCLAMATION);
else
#endif
- wxKill(pid, wxSIGINT);
+ if (pid > 0)
+ wxKill(pid, wxSIGINT);
#else
m_pProcess->CloseOutput();
wxKillError err = m_pProcess->Kill(m_Pid, wxSIGKILL);
Was it applied to patch 1880?
r. Domen
DoMeN:
I've built the latest svn version that is already patched and the patch doesn't solve the problem. It is true that C::B doesn't crush but now you get an error message that debugging process can not be stopped and you can't get out of the debugging session unles you close C::B or at least the entire workspace. Could this be changed to Error message with ok and force quit button?
Domen
EDIT: Closing the project doesn't stop the debugging session. When you reopen the project the debugging session is stil up and running. I doubt that this is a desired behaviour of C::B.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version