User forums > Using Code::Blocks
Debugger issues
byo:
--- Quote from: oBFusCATed on March 28, 2007, 08:47:39 pm ---
Okay, I should have given more info on this here. But I was at work, so there was no code::blocks to refresh my memory :oops:
So, the real problem is that I can't set breakpoint when the application is running (to make it stop), only when it is stopped on a breakpoint, then I can set/unset what ever I want.
Is is possible to be implement this feature?
Thank you for your responses, and keep up the good work :wink:
--- End quote ---
That was a problem few weeks ago. Now C::B has feature to stop running program :D. When your debugged application is running, just click on X button in debugger toolbar. It will break into your program so you may set breakpoints and other stuff and continue execution after that. But be carefull with it. Once you've stopped running program, next click on X button will kill it ;)
Regards
BYO
oBFusCATed:
--- Quote from: byo on March 28, 2007, 08:56:16 pm ---
That was a problem few weeks ago. Now C::B has feature to stop running program :D. When your debugged application is running, just click on X button in debugger toolbar. It will break into your program so you may set breakpoints and other stuff and continue execution after that. But be careful with it. Once you've stopped running program, next click on X button will kill it ;)
Regards
BYO
--- End quote ---
Good. I suppose you have considered the option to split this function in two separate functions :)
What problems will arise if setting new breakpoint in this situation automatically stops the application, sets the breakpoint and continues it?
--- Quote from: oBFusCATed on March 28, 2007, 12:49:26 pm ---2. Is it possible to continue the program at different point? I found that gdb can do it here: http://sourceware.org/gdb/current/onlinedocs/gdb_15.html#SEC147
--- End quote ---
Add what about that? Is it possible or it is too hard to be done?
oBFusCATed:
Hm, some very old bug, I thought that was fixed, but no it is there :?
Code::Blocks is freshly built from svn...
The backtrace below is from a crash which happened when I started a debug session, the application stopped on the breakpoint, then I started clicking till C::B crashed. 100% reproducible
--- Code: ---<?xml version="1.0" encoding="utf-8"?>
<report version="1.0" kind="exception">
<system description="Linux 2.6.17-gentoo-r9 x86_64"/>
<modules>
<module path="/usr/bin/codeblocks" address="00400000" size="001b4000"/>
</modules>
<stack>
<frame level="2" function="wxStackWalker::Walk(unsigned long)" offset="00000024"/>
<frame level="3" function="wxDebugReport::AddContext(wxDebugReport::Context)" offset="00000a57"/>
<frame level="4" function="EditorBase::CreateContextSubMenu(int)" offset="00000403"/>
<frame level="5" function="wxFatalSignalHandler" offset="0000001c"/>
<frame level="6"/>
<frame level="7" function="wxListLineDataArray::DoEmpty()" offset="00000022"/>
<frame level="8" function="wxListMainWindow::DoDeleteAllItems()" offset="0000020b"/>
<frame level="9" function="wxListMainWindow::DeleteAllItems()" offset="00000009"/>
<frame level="10" function="wxGenericListCtrl::DeleteAllItems()" offset="00000010"/>
<frame level="11" function="SimpleListLog::Clear()" offset="00000020"/>
<frame level="12" function="BreakpointsDlg::FillBreakpoints()" offset="00000031"/>
<frame level="13" function="DebuggerGDB::AddBreakpoint(wxString const&, int)" offset="00000091"/>
<frame level="14" function="cbEditor::ToggleBreakpoint(int, bool)" offset="000000e6"/>
<frame level="15" function="cbEditor::OnMarginClick(wxScintillaEvent&)" offset="00000063"/>
<frame level="16" function="wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)" offset="0000007f"/>
<frame level="17" function="wxEvtHandler::SearchDynamicEventTable(wxEvent&)" offset="00000052"/>
<frame level="18" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000095"/>
<frame level="19" function="wxWindowBase::TryParent(wxEvent&)" offset="00000045"/>
<frame level="20" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000063"/>
<frame level="21" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000050"/>
<frame level="22" function="wxScintilla::NotifyParent(SCNotification*)" offset="00000081"/>
<frame level="23" function="ScintillaWX::NotifyParent(SCNotification)" offset="00000015"/>
<frame level="24" function="Editor::NotifyMarginClick(Point, bool, bool, bool)" offset="0000014a"/>
<frame level="25" function="Editor::ButtonDown(Point, unsigned int, bool, bool, bool)" offset="000000a1"/>
<frame level="26" function="wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)" offset="0000007f"/>
<frame level="27" function="wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)" offset="0000009e"/>
<frame level="28" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="000000c6"/>
<frame level="29" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000050"/>
<frame level="30"/>
<frame level="31"/>
<frame level="32" function="g_closure_invoke" offset="0000010a"/>
<frame level="33"/>
<frame level="34" function="g_signal_emit_valist" offset="00000640"/>
<frame level="35" function="g_signal_emit" offset="00000080"/>
<frame level="36"/>
<frame level="37" function="gtk_propagate_event" offset="000000ae"/>
<frame level="38" function="gtk_main_do_event" offset="00000357"/>
<frame level="39"/>
<frame level="40" function="g_main_context_dispatch" offset="000001bc"/>
<frame level="41"/>
<frame level="42" function="g_main_loop_run" offset="00000196"/>
<frame level="43" function="gtk_main" offset="000000a2"/>
<frame level="44" function="wxEventLoop::Run()" offset="00000051"/>
<frame level="45" function="wxAppBase::MainLoop()" offset="0000004b"/>
<frame level="46"/>
<frame level="47" function="wxEntry(int&, wchar_t**)" offset="0000004c"/>
<frame level="48" function="EditorBase::CreateContextSubMenu(int)" offset="000003c2"/>
</stack>
</report>
--- End code ---
MortenMacFly:
--- Quote from: oBFusCATed on March 28, 2007, 11:41:16 pm ---[...] then I started clicking till C::B crashed. 100% reproducible
--- End quote ---
Where did you start to click? Using which mouse button? Please be more detailed.
With regards, Morten.
oBFusCATed:
--- Quote from: MortenMacFly on March 28, 2007, 11:55:39 pm ---Where did you start to click? Using which mouse button? Please be more detailed.
With regards, Morten.
--- End quote ---
Sorry.
I was clicking on the red dot to set/unset the breakpoint where the debugger stopped.
There is also an arrow draw at that position. Hope this is enough to reproduce it yourself.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version