User forums > Help

debugger_gdbmi will not run CB

<< < (2/6) > >>

oBFusCATed:
No,no, OnExit is guaranteed to not be called. Put a breakpoint on exit(), _exit(), abort().
Something like this "break exit", "break abort"...
You can also use step into to start debugging.

Pecan:
Here's a trap, gdb backtrace and gdbmi log taken at the point that gdbmi issued the -gdb-exit command. It seems that something in CB on windows is returning with a code of
"037777777777". If you can tell me where to trap, I'll get more info.

BTW, if I comment out the code issuing "-gdb-exit", CB runs just fine. Otherwise, gdb exits, and cb is gone. "b abort()" or "b exit()" did not work.


--- Code: ---(gdb) bt
#0  Notifications::operator() (this=0x28f89c, parser=...) at C:\Usr\Proj\cbDebug\debbugger_gdbmi\src\plugin.cpp:347
#1  0x6c32d28b in dbg_mi::DispatchResults<Notifications> (exec=..., actions_map=..., on_notify=...)
    at C:/Usr/Proj/cbDebug/debbugger_gdbmi/src//cmd_queue.h:268
#2  0x6c306fae in Debugger_GDB_MI::RunQueue (this=0x5d29d30) at C:\Usr\Proj\cbDebug\debbugger_gdbmi\src\plugin.cpp:467
#3  0x6c307283 in Debugger_GDB_MI::OnTimer (this=0x5d29d30) at C:\Usr\Proj\cbDebug\debbugger_gdbmi\src\plugin.cpp:253
#4  0x10095099 in wxmsw28u_gcc_custom!_ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent ()
   from c:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#5  0x10097737 in wxmsw28u_gcc_custom!_ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler ()
   from c:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#6  0x10097810 in wxmsw28u_gcc_custom!_ZN12wxEvtHandler12ProcessEventER7wxEvent ()
   from c:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#7  0x101c763d in wxmsw28u_gcc_custom!_ZN11wxTimerBase6NotifyEv ()
   from c:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#8  0x100e4a97 in wxmsw28u_gcc_custom!_ZN7wxTimer4InitEv ()
   from c:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#9  0x751b6238 in USER32!IsDialogMessageW () from C:\Windows\syswow64\user32.dll
#10 0x00000000 in ?? ()



(gdb)
335                     {asm("int3"); /*trap*/
336                         m_executor.Execute(wxT("-gdb-exit"));
337                         break;
338                     }
339
340                     case dbg_mi::StoppedReason::Exited:
341                         {
342                             int code = -1;
343                             if(!dbg_mi::Lookup(result_value, wxT("exit-code"), code))
344                                 code = -1;
(gdb)
345                             m_plugin->SetExitCode(code);
346                             asm("int3"); /*trap*/
347                             m_executor.Execute(wxT("-gdb-exit"));
348                         }
349                         break;
350                     default:
351                         UpdateCursor(result_value, !m_executor.IsTemporaryInterupt());
352                     }
353
354                     if(!m_executor.IsTemporaryInterupt())
(gdb)

$3 = (const dbg_mi::ResultValue &) @0xb5c69a8: {m_name = {<wxStringBase> = {static npos = <optimized out>,
      m_pchData = 0x104d4858 L""}, <No data fields>}, m_type = dbg_mi::ResultValue::Tuple, m_value = {
    simple = {<wxStringBase> = {static npos = <optimized out>, m_pchData = 0x104d4858 L""}, <No data fields>},
    tuple = {<std::_Vector_base<dbg_mi::ResultValue*, std::allocator<dbg_mi::ResultValue*> >> = {
        _M_impl = {<std::allocator<dbg_mi::ResultValue*>> = {<__gnu_cxx::new_allocator<dbg_mi::ResultValue*>> = {<No data fie
lds>}, <No data fields>}, _M_start = 0xb5c9920, _M_finish = 0xb5c9928,
          _M_end_of_storage = 0xb5c9928}}, <No data fields>}}}

 (gdb) f 0
#0  Notifications::operator() (this=0x28f89c, parser=...) at C:\Usr\Proj\cbDebug\debbugger_gdbmi\src\plugin.cpp:347
347                             m_executor.Execute(wxT("-gdb-exit"));
(gdb) p reason.GetType()
$4 = dbg_mi::StoppedReason::Exited
(gdb)

[debug]notification event recieved!
[debug]output==>=library-loaded,id="C:\\Usr\\Proj\\cbDebug\\trunk\\src\\devel\\wxpropgrid.dll",target-name="C:\\Usr\\Proj\\cbDebug\\trunk\\src\\devel\\wxpropgrid.dll",host-name="C:\\Usr\\Proj\\cbDebug\\trunk\\src\\devel\\wxpropgrid.dll",symbols-loaded="0",thread-group="i1"
[debug]notification event recieved!
[debug]output==>=library-loaded,id="C:\\Windows\\SysWOW64\\imm32.dll",target-name="C:\\Windows\\SysWOW64\\imm32.dll",host-name="C:\\Windows\\SysWOW64\\imm32.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Windows\\syswow64\\msctf.dll",target-name="C:\\Windows\\syswow64\\msctf.dll",host-name="C:\\Windows\\syswow64\\msctf.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Windows\\SysWOW64\\uxtheme.dll",target-name="C:\\Windows\\SysWOW64\\uxtheme.dll",host-name="C:\\Windows\\SysWOW64\\uxtheme.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\User\\Programs\\VirtuaWin\\vwHook.dll",target-name="C:\\User\\Programs\\VirtuaWin\\vwHook.dll",host-name="C:\\User\\Programs\\VirtuaWin\\vwHook.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Usr\\mingw431\\bin\\exchndl.dll",target-name="C:\\Usr\\mingw431\\bin\\exchndl.dll",host-name="C:\\Usr\\mingw431\\bin\\exchndl.dll",symbols-loaded="0",thread-group="i1"
[debug]notification event recieved!
[debug]notification event recieved!
[debug]notification event recieved!
[debug]notification event recieved!
[debug]notification event recieved!
[debug]output==>=thread-exited,id="1",group-id="i1"
[debug]output==>=thread-group-exited,id="i1"
[debug]output==>*stopped,reason="exited",exit-code="037777777777"
[debug]notification event recieved!
[debug]notification event recieved!
[debug]notification event recieved!
[debug]cmd==>00000000000-gdb-exit
[debug]GDBExecutor is not stopped, but command (-gdb-exit) was executed!
[debug]unparsable_output==>(gdb)
[debug]output==>00000000000^exit

debugger terminated!

--- End code ---

oBFusCATed:
What happens if you try to reproduce the debug session on the command line?

Pecan:

--- Quote from: oBFusCATed on April 07, 2012, 05:09:21 pm ---What happens if you try to reproduce the debug session on the command line?

--- End quote ---

If you mean "can command line gdb run CB"' yes. No problem.
Like: c:\Usr\Proj\cbDebug\trunk\src\devel>c:\usr\mingw431\bin\gdb --args c:\Usr\Proj\cbdebug\trunk\src\devel\codeblocks.exe /p debu
g /d

Here's command line gdb running CB, ie., it did not exit gdb while loading, as does gdbmi plugin.

oBFusCATed:
Not exactly, I meant run command line gdb in mi mode set the command stream and use the same commands to see if it works correctly.
If it prints the same notification *stopped,reason="exited",exit-code="037777777777" then it is a problem of gdb.
Also try to remove some of the commands and see which command breaks it.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version