Author Topic: debugger_gdbmi will not run CB  (Read 18767 times)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
debugger_gdbmi will not run CB
« on: April 06, 2012, 07:20:15 pm »
When I attempt to debug CB itself using debugger_gdbmi, it appears to exit.

Log with "catch c++ exections" UNchecked.
Code
Active debugger config: GDB/MI:Default
start debugger
Building to ensure sources are up-to-date
Selecting target:
src
Adding file: C:\Usr\Proj\cbBeta\trunk\src\devel\codeblocks.exe

[debug]PATH=.;C:\Usr\Proj\cbBeta\trunk\src\base\tinyxml;C:\Usr\Proj\wxWidgets2810\lib\gcc_dll;C:\Usr\Proj\cbBeta\trunk\src\devel;C:\Usr\mingw431\bin;C:\Usr\mingw431;C:\Usr\Proj\ImageCraft\ImageCraft_IDB\trunk\src\output;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Dell\Dell Wireless WLAN Card;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared;C:\Usr\bin;C:\Program Files (x86)\CollabNet Subversion;C:\Program Files (x86)\TortoiseSVN\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Common Files\Adobe\AGL;c:\Usr\mingw431\bin

GDB path: c:\Usr\mingw431\bin\gdb.exe
DEBUGGEE path: C:\Usr\Proj\cbBeta\trunk\src\devel\codeblocks.exe
Command-line: c:\Usr\mingw431\bin\gdb.exe -fullname  -quiet --interpreter=mi -args C:\Usr\Proj\cbBeta\trunk\src\devel\codeblocks.exe
Working dir : C:\Usr\Proj\cbBeta\trunk\src\devel
Starting debugger:

[debug]Executing command: c:\Usr\mingw431\bin\gdb.exe -fullname  -quiet --interpreter=mi -args C:\Usr\Proj\cbBeta\trunk\src\devel\codeblocks.exe

done

[debug]Executor stopped
[debug]Debugger_GDB_MI::CommitBreakpoints
[debug]ActionsMap::Run -> starting action: 07A9D4A0 id: 1
[debug]cmd==>10000000000-interpreter-exec console "source c:\Usr\mingw431\bin\stl.gdb"
[debug]ActionsMap::Run -> starting action: 07A9C9A8 id: 2
[debug]cmd==>20000000000-interpreter-exec console "source c:\Usr\mingw431\bin\wx.gdb"
[debug]ActionsMap::Run -> starting action: 07A9C5B8 id: 3
[debug]cmd==>30000000000-enable-pretty-printing
[debug]output==>=thread-group-added,id="i1"
[debug]notification event recieved!
[debug]unparsable_output==>~"Reading symbols from C:\\Usr\\Proj\\cbBeta\\trunk\\src\\devel\\codeblocks.exe..."
[debug]unparsable_output==>~"done.\n"
[debug]unparsable_output==>(gdb)
[debug]unparsable_output==>&"c:Usrmingw431\binstl.gdb: No such file or directory.\n"
[debug]output==>10000000000^error,msg="c:Usrmingw431\binstl.gdb: No such file or directory."
[debug]unparsable_output==>(gdb)
[debug]unparsable_output==>&"c:Usrmingw431\binwx.gdb: No such file or directory.\n"
[debug]output==>20000000000^error,msg="c:Usrmingw431\binwx.gdb: No such file or directory."
[debug]unparsable_output==>(gdb)
[debug]output==>30000000000^done
[debug]unparsable_output==>(gdb)
[debug]ActionsMap::Run -> starting action: 05A55F68 id: 4
[debug]RunAction::OnStart -> -exec-run
[debug]cmd==>40000000000-exec-run
[debug]output==>=thread-group-started,id="i1",pid="4448"
[debug]output==>=thread-created,id="1",group-id="i1"
[debug]unparsable_output==>~"[New Thread 4448.0x13ec]\n"
[debug]output==>40000000000^running
[debug]output==>*running,thread-id="all"
[debug]unparsable_output==>(gdb)
[debug]notification event recieved!

Found child pid: 4448


[debug]notification event recieved!
[debug]RunAction success, the debugger is !stopped!
[debug]RunAction::Output - type: result
class: running
results:

[debug]Executor started
[debug]notification event recieved!
[debug]output==>=library-loaded,id="C:\\Windows\\system32\\ntdll.dll",target-name="C:\\Windows\\system32\\ntdll.dll",host-name="C:\\Windows\\system32\\ntdll.dll",symbols-loaded="0",thread-group="i1"
[debug]RunAction::destructor
[debug]output==>=library-loaded,id="C:\\Windows\\syswow64\\kernel32.dll",target-name="C:\\Windows\\syswow64\\kernel32.dll",host-name="C:\\Windows\\syswow64\\kernel32.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Windows\\syswow64\\KernelBase.dll",target-name="C:\\Windows\\syswow64\\KernelBase.dll",host-name="C:\\Windows\\syswow64\\KernelBase.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Usr\\Proj\\cbBeta\\trunk\\src\\devel\\wxmsw28u_gcc_custom.dll",target-name="C:\\Usr\\Proj\\cbBeta\\trunk\\src\\devel\\wxmsw28u_gcc_custom.dll",host-name="C:\\Usr\\Proj\\cbBeta\\trunk\\src\\devel\\wxmsw28u_gcc_custom.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Windows\\syswow64\\advapi32.dll",target-name="C:\\Windows\\syswow64\\advapi32.dll",host-name="C:\\Windows\\syswow64\\advapi32.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==>=library-loaded,id="C:\\Windows\\syswow64\\msvcrt.dll",target-name="C:\\Windows\\syswow64\\msvcrt.dll",host-name="C:\\Windows\\syswow64\\msvcrt.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Windows\\SysWOW64\\sechost.dll",target-name="C:\\Windows\\SysWOW64\\sechost.dll",host-name="C:\\Windows\\SysWOW64\\sechost.dll",symbols-loaded="0",thread-group="i1"
[debug]notification event recieved!
[debug]notification event recieved!
[debug]output==>=library-loaded,id="C:\\Windows\\syswow64\\rpcrt4.dll",target-name="C:\\Windows\\syswow64\\rpcrt4.dll",host-name="C:\\Windows\\syswow64\\rpcrt4.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Windows\\syswow64\\sspicli.dll",target-name="C:\\Windows\\syswow64\\sspicli.dll",host-name="C:\\Windows\\syswow64\\sspicli.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Windows\\syswow64\\cryptbase.dll",target-name="C:\\Windows\\syswow64\\cryptbase.dll",host-name="C:\\Windows\\syswow64\\cryptbase.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Windows\\WinSxS\\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7600.16385_none_421189da2b7fabfc\\comctl32.dll",target-name="C:\\Windows\\WinSxS\\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7600.16385_none_421189da2b7fabfc\\comctl32.dll",host-name="C:\\Windows\\WinSxS\\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7600.16385_none_421189da2b7fabfc\\comctl32.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Windows\\syswow64\\gdi32.dll",target-name="C:\\Windows\\syswow64\\gdi32.dll",host-name="C:\\Windows\\syswow64\\gdi32.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Windows\\syswow64\\user32.dll",target-name="C:\\Windows\\syswow64\\user32.dll",host-name="C:\\Windows\\syswow64\\user32.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]notification event recieved!
[debug]output==>=library-loaded,id="C:\\Windows\\syswow64\\lpk.dll",target-name="C:\\Windows\\syswow64\\lpk.dll",host-name="C:\\Windows\\syswow64\\lpk.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Windows\\syswow64\\usp10.dll",target-name="C:\\Windows\\syswow64\\usp10.dll",host-name="C:\\Windows\\syswow64\\usp10.dll",symbols-loaded="0",thread-group="i1"
[debug]notification event recieved!
[debug]notification event recieved!
[debug]output==>=library-loaded,id="C:\\Windows\\syswow64\\shlwapi.dll",target-name="C:\\Windows\\syswow64\\shlwapi.dll",host-name="C:\\Windows\\syswow64\\shlwapi.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Windows\\syswow64\\comdlg32.dll",target-name="C:\\Windows\\syswow64\\comdlg32.dll",host-name="C:\\Windows\\syswow64\\comdlg32.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Windows\\syswow64\\shell32.dll",target-name="C:\\Windows\\syswow64\\shell32.dll",host-name="C:\\Windows\\syswow64\\shell32.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Windows\\SysWOW64\\mingwm10.dll",target-name="C:\\Windows\\SysWOW64\\mingwm10.dll",host-name="C:\\Windows\\SysWOW64\\mingwm10.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Windows\\syswow64\\ole32.dll",target-name="C:\\Windows\\syswow64\\ole32.dll",host-name="C:\\Windows\\syswow64\\ole32.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==>=library-loaded,id="C:\\Windows\\syswow64\\oleaut32.dll",target-name="C:\\Windows\\syswow64\\oleaut32.dll",host-name="C:\\Windows\\syswow64\\oleaut32.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Windows\\SysWOW64\\winmm.dll",target-name="C:\\Windows\\SysWOW64\\winmm.dll",host-name="C:\\Windows\\SysWOW64\\winmm.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Windows\\SysWOW64\\wsock32.dll",target-name="C:\\Windows\\SysWOW64\\wsock32.dll",host-name="C:\\Windows\\SysWOW64\\wsock32.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Windows\\syswow64\\ws2_32.dll",target-name="C:\\Windows\\syswow64\\ws2_32.dll",host-name="C:\\Windows\\syswow64\\ws2_32.dll",symbols-loaded="0",thread-group="i1"
[debug]notification event recieved!
[debug]notification event recieved!
[debug]notification event recieved!
[debug]notification event recieved!
[debug]output==>=library-loaded,id="C:\\Windows\\syswow64\\nsi.dll",target-name="C:\\Windows\\syswow64\\nsi.dll",host-name="C:\\Windows\\syswow64\\nsi.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Windows\\SysWOW64\\shfolder.dll",target-name="C:\\Windows\\SysWOW64\\shfolder.dll",host-name="C:\\Windows\\SysWOW64\\shfolder.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-loaded,id="C:\\Usr\\Proj\\cbBeta\\trunk\\src\\devel\\codeblocks.dll",target-name="C:\\Usr\\Proj\\cbBeta\\trunk\\src\\devel\\codeblocks.dll",host-name="C:\\Usr\\Proj\\cbBeta\\trunk\\src\\devel\\codeblocks.dll",symbols-loaded="0",thread-group="i1"
[debug]notification event recieved!
[debug]notification event recieved!
[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]notification event recieved!
[debug]notification event recieved!
[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]notification event recieved!
[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]notification event recieved!
[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]output==>=thread-exited,id="1",group-id="i1"
[debug]output==>=thread-group-exited,id="i1"
[debug]output==>*stopped,reason="exited",exit-code="037777777777"
[debug]unparsable_output==>(gdb)
[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]output==>00000000000^exit

debugger terminated!


svn build  rev 7904 (2012-03-19 21:48:48)   gcc 4.3.1 Windows/unicode - 32 bit
« Last Edit: April 06, 2012, 07:22:13 pm by Pecan »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: debugger_gdbmi will not run CB
« Reply #1 on: April 06, 2012, 08:57:26 pm »
I found a gdb 7.4. But the same thing happens. GDB just exits when attempting to debug CB.
svn build  rev 7904 (2012-03-19 21:48:48)   gcc 4.3.1 Windows/unicode - 32 bit
Code
Active debugger config: GDB/MI:Default
start debugger
Building to ensure sources are up-to-date
Selecting target:
src
Adding file: C:\Usr\Proj\cbBeta\trunk\src\devel\codeblocks.exe

[debug]PATH=.;C:\Usr\Proj\cbBeta\trunk\src\base\tinyxml;C:\Usr\Proj\wxWidgets2810\lib\gcc_dll;C:\Usr\Proj\cbBeta\trunk\src\devel;C:\Usr\mingw431\bin;C:\Usr\mingw431;C:\Usr\Proj\ImageCraft\ImageCraft_IDB\trunk\src\output;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Dell\Dell Wireless WLAN Card;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared;C:\Usr\bin;C:\Program Files (x86)\CollabNet Subversion;C:\Program Files (x86)\TortoiseSVN\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Common Files\Adobe\AGL;c:\Usr\mingw431\bin

GDB path: c:\Usr\mingw463\bin\gdb.exe
DEBUGGEE path: C:\Usr\Proj\cbBeta\trunk\src\devel\codeblocks.exe
Command-line: c:\Usr\mingw463\bin\gdb.exe -fullname  -quiet --interpreter=mi -args C:\Usr\Proj\cbBeta\trunk\src\devel\codeblocks.exe
Working dir : C:\Usr\Proj\cbBeta\trunk\src\devel
Starting debugger:

[debug]Executing command: c:\Usr\mingw463\bin\gdb.exe -fullname  -quiet --interpreter=mi -args C:\Usr\Proj\cbBeta\trunk\src\devel\codeblocks.exe

done

[debug]Executor stopped
[debug]Debugger_GDB_MI::CommitBreakpoints
[debug]ActionsMap::Run -> starting action: 05877658 id: 1
[debug]cmd==>10000000000-interpreter-exec console "source c:\Usr\mingw431\bin\stl.gdb"
[debug]ActionsMap::Run -> starting action: 09CB7250 id: 2
[debug]cmd==>20000000000-interpreter-exec console "source c:\Usr\mingw431\bin\wx.gdb"
[debug]ActionsMap::Run -> starting action: 09CB7400 id: 3
[debug]cmd==>30000000000-enable-pretty-printing
[debug]output==>=thread-group-added,id="i1"
[debug]unparsable_output==>~"Reading symbols from C:\\Usr\\Proj\\cbBeta\\trunk\\src\\devel\\codeblocks.exe..."
[debug]notification event recieved!
[debug]unparsable_output==>~"done.\n"
[debug]unparsable_output==>(gdb)
[debug]unparsable_output==>&"c:Usrmingw431\binstl.gdb: No such file or directory.\n"
[debug]output==>10000000000^error,msg="c:Usrmingw431\binstl.gdb: No such file or directory."
[debug]unparsable_output==>(gdb)
[debug]unparsable_output==>&"c:Usrmingw431\binwx.gdb: No such file or directory.\n"
[debug]output==>20000000000^error,msg="c:Usrmingw431\binwx.gdb: No such file or directory."
[debug]unparsable_output==>(gdb)
[debug]output==>30000000000^done
[debug]unparsable_output==>(gdb)
[debug]ActionsMap::Run -> starting action: 057925C8 id: 4
[debug]RunAction::OnStart -> -exec-run
[debug]cmd==>40000000000-exec-run
[debug]output==>=thread-group-started,id="i1",pid="3644"
[debug]output==>=thread-created,id="1",group-id="i1"
[debug]unparsable_output==>~"[New Thread 3644.0x818]\n"
[debug]output==>40000000000^running
[debug]output==>*running,thread-id="all"
[debug]unparsable_output==>(gdb)
[debug]notification event recieved!

Found child pid: 3644


[debug]notification event recieved!
[debug]RunAction success, the debugger is !stopped!
[debug]RunAction::Output - type: result
class: running
results:

[debug]Executor started
[debug]notification event recieved!
[debug]unparsable_output==>&"warning: Can not parse XML library list; XML support was disabled at compile time\n"
[debug]RunAction::destructor
[debug]output==>=thread-exited,id="1",group-id="i1"
[debug]output==>=thread-group-exited,id="i1",exit-code="01777777777777777777777"
[debug]output==>*stopped,reason="exited",exit-code="037777777777"
[debug]unparsable_output==>(gdb)
[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]output==>00000000000^exit

debugger terminated!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: debugger_gdbmi will not run CB
« Reply #2 on: April 06, 2012, 09:12:32 pm »
GDB doesn't exit, C::B exits for some reason. Does it enter some function in our code? Or it fails before that?
Have you tried to put a breakpoint on the exit function (you have to set the breakpoint manually from the command entry box)?

Does C::B runs correctly with the normal debugger? Is the PATH env var set the same in both debuggers?

I've just tested and it works on linux.
(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 Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: debugger_gdbmi will not run CB
« Reply #3 on: April 06, 2012, 11:54:23 pm »
debugger_gdbmi does not seem to be able to trace across a call.
When I put an asm("int3"); in the code, on the next function call no more stepping is possible and the frame window shows only strange results.



When this happens, the step next button is enabled but nothing happens on the screen. There is no current debug line pointer. The only way out is to either "run" (then cb exits) or to use the stop debugger button.


None of these problems occur using the regular debugger in the debugger branch. I'll document that for you if you'd like.

Code
Active debugger config: GDB/MI:Default
start debugger
Building to ensure sources are up-to-date
Selecting target:
src
Adding file: C:\Usr\Proj\cbDebug\trunk\src\devel\codeblocks.exe

[debug]PATH=.;C:\Usr\Proj\cbDebug\trunk\src\base\tinyxml;C:\Usr\Proj\wxWidgets2810\lib\gcc_dll;C:\Usr\Proj\cbDebug\trunk\src\devel;C:\Usr\mingw431\bin;C:\Usr\mingw431;C:\Usr\Proj\ImageCraft\ImageCraft_IDB\trunk\src\output;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Dell\Dell Wireless WLAN Card;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared;C:\Usr\bin;C:\Program Files (x86)\CollabNet Subversion;C:\Program Files (x86)\TortoiseSVN\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Common Files\Adobe\AGL;c:\Usr\mingw431\bin

GDB path: c:\Usr\mingw463\bin\gdb.exe
DEBUGGEE path: C:\Usr\Proj\cbDebug\trunk\src\devel\codeblocks.exe
Command-line: c:\Usr\mingw463\bin\gdb.exe -fullname  -quiet --interpreter=mi -args C:\Usr\Proj\cbDebug\trunk\src\devel\codeblocks.exe
Working dir : C:\Usr\Proj\cbDebug\trunk\src\devel
Starting debugger:

[debug]Executing command: c:\Usr\mingw463\bin\gdb.exe -fullname  -quiet --interpreter=mi -args C:\Usr\Proj\cbDebug\trunk\src\devel\codeblocks.exe

done

[debug]Executor stopped
[debug]Debugger_GDB_MI::CommitBreakpoints
[debug]ActionsMap::Run -> starting action: 05AADEA8 id: 1
[debug]cmd==>10000000000-interpreter-exec console "source c:\\Usr\\mingw431\\bin\\stl.gdb"
[debug]ActionsMap::Run -> starting action: 05AAE4D8 id: 2
[debug]cmd==>20000000000-interpreter-exec console "source c:\\Usr\\mingw431\\bin\\wx.gdb"
[debug]ActionsMap::Run -> starting action: 05AAE9E8 id: 3
[debug]cmd==>30000000000-enable-pretty-printing
[debug]output==>=thread-group-added,id="i1"
[debug]notification event recieved!
[debug]unparsable_output==>~"Reading symbols from C:\\Usr\\Proj\\cbDebug\\trunk\\src\\devel\\codeblocks.exe..."
[debug]unparsable_output==>~"done.\n"
[debug]unparsable_output==>(gdb)
[debug]unparsable_output==>&"c:\\Usr\\mingw431\\bin\\stl.gdb:6: Error in sourced command file:\n"
[debug]unparsable_output==>&"Python scripting is not supported in this copy of GDB.\n"
[debug]output==>10000000000^error,msg="c:\\Usr\\mingw431\\bin\\stl.gdb:6: Error in sourced command file:\nPython scripting is not supported in this copy of GDB."
[debug]unparsable_output==>(gdb)
[debug]unparsable_output==>&"c:\\Usr\\mingw431\\bin\\wx.gdb:6: Error in sourced command file:\n"
[debug]unparsable_output==>&"Python scripting is not supported in this copy of GDB.\n"
[debug]output==>20000000000^error,msg="c:\\Usr\\mingw431\\bin\\wx.gdb:6: Error in sourced command file:\nPython scripting is not supported in this copy of GDB."
[debug]unparsable_output==>(gdb)
[debug]output==>30000000000^done
[debug]unparsable_output==>(gdb)
[debug]ActionsMap::Run -> starting action: 054D3E90 id: 4
[debug]RunAction::OnStart -> -exec-run
[debug]cmd==>40000000000-exec-run
[debug]output==>=thread-group-started,id="i1",pid="2612"
[debug]output==>=thread-created,id="1",group-id="i1"
[debug]unparsable_output==>~"[New Thread 2612.0x2b8]\n"
[debug]output==>40000000000^running
[debug]output==>*running,thread-id="all"
[debug]notification event recieved!

Found child pid: 2612


[debug]notification event recieved!
[debug]RunAction success, the debugger is !stopped!
[debug]RunAction::Output - type: result
class: running
results:

[debug]Executor started
[debug]notification event recieved!
[debug]unparsable_output==>(gdb)
[debug]RunAction::destructor
[debug]unparsable_output==>&"warning: Can not parse XML library list; XML support was disabled at compile time\n"
[debug]output==>*stopped,reason="signal-received",signal-name="SIGTRAP",signal-meaning="Trace/breakpoint trap",frame={addr="0x0049dee1",func="CodeBlocksApp::OnInit",args=[{name="this",value="0x26317c0"}],file="C:\\Usr\\Proj\\cbDebug\\trunk\\src\\src\\app.cpp",fullname="C:\\Usr\\Proj\\cbDebug\\trunk\\src\\src\\app.cpp",line="501"},thread-id="1",stopped-threads="all"
[debug]unparsable_output==>(gdb)
[debug]notification event recieved!
[debug]Executor stopped
[debug]ActionsMap::Run -> starting action: 055C7E70 id: 5
[debug]cmd==>50000000000-stack-info-frame
[debug]cmd==>50000000001-stack-list-frames 0 30
[debug]cmd==>50000000002-stack-list-arguments 1 0 30
[debug]output==>50000000000^done,frame={level="0",addr="0x0049dee1",func="CodeBlocksApp::OnInit",file="C:\\Usr\\Proj\\cbDebug\\trunk\\src\\src\\app.cpp",fullname="C:\\Usr\\Proj\\cbDebug\\trunk\\src\\src\\app.cpp",line="501"}
[debug]unparsable_output==>(gdb)
[debug]output==>50000000001^done,stack=[frame={level="0",addr="0x0049dee1",func="CodeBlocksApp::OnInit",file="C:\\Usr\\Proj\\cbDebug\\trunk\\src\\src\\app.cpp",fullname="C:\\Usr\\Proj\\cbDebug\\trunk\\src\\src\\app.cpp",line="501"},frame={level="1",addr="0x004c063c",func="wxAppConsole::CallOnInit",file="C:/Usr/Proj/wxWidgets2810/include/wx/app.h",fullname="C:/Usr/Proj/wxWidgets2810/include/wx/app.h",line="76"},frame={level="2",addr="0x10038a15",func="??"},frame={level="3",addr="0x1009d89a",func="??"},frame={level="4",addr="0x004a1182",func="WinMain@16",file="C:\\Usr\\Proj\\cbDebug\\trunk\\src\\src\\app.cpp",fullname="C:\\Usr\\Proj\\cbDebug\\trunk\\src\\src\\app.cpp",line="262"},frame={level="5",addr="0x004bb528",func="main"}]
[debug]unparsable_output==>(gdb)
[debug]output==>50000000002^done,stack-args=[frame={level="0",args=[{name="this",value="0x26317c0"}]},frame={level="1",args=[{name="this",value="0x26317c0"}]},frame={level="2",args=[]},frame={level="3",args=[]},frame={level="4",args=[{name="hInstance",value="0x400000"},{name="hPrevInstance",value="0x0"},{name="lpCmdLine",value="0xdb3e13 \"\""},{name="nCmdShow",value="10"}]},frame={level="5",args=[]}]
[debug]unparsable_output==>(gdb)
[debug]GenerateBacktrace::OnCommandOutput: tuple size 6 stack=[frame={level=0,addr=0x0049dee1,func=CodeBlocksApp::OnInit,file=C:\\Usr\\Proj\\cbDebug\\trunk\\src\\src\\app.cpp,fullname=C:\\Usr\\Proj\\cbDebug\\trunk\\src\\src\\app.cpp,line=501},frame={level=1,addr=0x004c063c,func=wxAppConsole::CallOnInit,file=C:/Usr/Proj/wxWidgets2810/include/wx/app.h,fullname=C:/Usr/Proj/wxWidgets2810/include/wx/app.h,line=76},frame={level=2,addr=0x10038a15,func=??},frame={level=3,addr=0x1009d89a,func=??},frame={level=4,addr=0x004a1182,func=WinMain@16,file=C:\\Usr\\Proj\\cbDebug\\trunk\\src\\src\\app.cpp,fullname=C:\\Usr\\Proj\\cbDebug\\trunk\\src\\src\\app.cpp,line=262},frame={level=5,addr=0x004bb528,func=main}]
[debug]GenerateBacktrace::OnCommandOutput arguments
[debug]ActionsMap::Run -> starting action: 054D3E90 id: 6
[debug]RunAction::OnStart -> -exec-next
[debug]cmd==>60000000000-exec-next
[debug]output==>60000000000^running
[debug]output==>*running,thread-id="all"
[debug]unparsable_output==>(gdb)
[debug]output==>*stopped,reason="end-stepping-range",frame={addr="0x618af790",func="??",args=[]},thread-id="1",stopped-threads="all"
[debug]unparsable_output==>(gdb)
[debug]RunAction success, the debugger is !stopped!
[debug]RunAction::Output - type: result
class: running
results:

[debug]Executor started
[debug]notification event recieved!
[debug]notification event recieved!
[debug]ParseStateInfo does not have valid source
[debug]Executor stopped
[debug]RunAction::destructor
[debug]ActionsMap::Run -> starting action: 055C7E70 id: 7
[debug]cmd==>70000000000-stack-info-frame
[debug]cmd==>70000000001-stack-list-frames 0 30
[debug]cmd==>70000000002-stack-list-arguments 1 0 30
[debug]output==>70000000000^done,frame={level="0",addr="0x618af790",func="??"}
[debug]unparsable_output==>(gdb)
[debug]output==>70000000001^done,stack=[frame={level="0",addr="0x618af790",func="??"},frame={level="1",addr="0x004c063c",func="wxAppConsole::CallOnInit",file="C:/Usr/Proj/wxWidgets2810/include/wx/app.h",fullname="C:/Usr/Proj/wxWidgets2810/include/wx/app.h",line="76"},frame={level="2",addr="0x10038a15",func="??"},frame={level="3",addr="0x1009d89a",func="??"},frame={level="4",addr="0x004a1182",func="WinMain@16",file="C:\\Usr\\Proj\\cbDebug\\trunk\\src\\src\\app.cpp",fullname="C:\\Usr\\Proj\\cbDebug\\trunk\\src\\src\\app.cpp",line="262"},frame={level="5",addr="0x004bb528",func="main"}]
[debug]unparsable_output==>(gdb)
[debug]output==>70000000002^done,stack-args=[frame={level="0",args=[]},frame={level="1",args=[{name="this",value="0x26317c0"}]},frame={level="2",args=[]},frame={level="3",args=[]},frame={level="4",args=[{name="hInstance",value="0x400000"},{name="hPrevInstance",value="0x0"},{name="lpCmdLine",value="0xdb3e13 \"\""},{name="nCmdShow",value="10"}]},frame={level="5",args=[]}]
[debug]GenerateBacktrace::OnCommandOutput: tuple size 6 stack=[frame={level=0,addr=0x618af790,func=??},frame={level=1,addr=0x004c063c,func=wxAppConsole::CallOnInit,file=C:/Usr/Proj/wxWidgets2810/include/wx/app.h,fullname=C:/Usr/Proj/wxWidgets2810/include/wx/app.h,line=76},frame={level=2,addr=0x10038a15,func=??},frame={level=3,addr=0x1009d89a,func=??},frame={level=4,addr=0x004a1182,func=WinMain@16,file=C:\\Usr\\Proj\\cbDebug\\trunk\\src\\src\\app.cpp,fullname=C:\\Usr\\Proj\\cbDebug\\trunk\\src\\src\\app.cpp,line=262},frame={level=5,addr=0x004bb528,func=main}]
[debug]GenerateBacktrace::OnCommandOutput arguments
[debug]ActionsMap::Run -> starting action: 0BFD4C00 id: 8
[debug]cmd==>80000000000-stack-select-frame 1
[debug]unparsable_output==>(gdb)
[debug]output==>80000000000^done
[debug]unparsable_output==>(gdb)
[debug]ActionsMap::Run -> starting action: 054D3FF0 id: 9
[debug]RunAction::OnStart -> -exec-next
[debug]cmd==>90000000000-exec-next
[debug]output==>90000000000^error,msg="Cannot find bounds of current function"
[debug]unparsable_output==>(gdb)
[debug]RunAction::destructor
[debug]ActionsMap::Run -> starting action: 054D3FF0 id: 10
[debug]RunAction::OnStart -> -exec-next
[debug]cmd==>100000000000-exec-next
[debug]output==>100000000000^error,msg="Cannot find bounds of current function"
[debug]unparsable_output==>(gdb)
[debug]RunAction::destructor
[debug]ActionsMap::Run -> starting action: 054D3FF0 id: 11
[debug]RunAction::OnStart -> -exec-next
[debug]cmd==>110000000000-exec-next
[debug]output==>110000000000^error,msg="Cannot find bounds of current function"
[debug]unparsable_output==>(gdb)
[debug]RunAction::destructor
« Last Edit: April 06, 2012, 11:56:33 pm by Pecan »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: debugger_gdbmi will not run CB
« Reply #4 on: April 07, 2012, 01:55:36 am »
I put a break on "int CodeBlocksApp::OnExit(". Never got there.
Seems like something is issuing an -gdb-exit command to gdb.

Code
http://debug]Executor started
[debug]notification event recieved!
[debug]output==>=thread-exited,id="1",group-id="i1"
[debug]RunAction::destructor
[debug]output==>=thread-group-exited,id="i1"
[debug]output==>*stopped,reason="exited",exit-code="037777777777"
[debug]unparsable_output==>(gdb)
[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]output==>00000000000^exit

debugger terminated!

svn build  rev 7904 (2012-03-19 21:48:48)   gcc 4.3.1 Windows/unicode - 32 bit
« Last Edit: April 07, 2012, 01:57:37 am by Pecan »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: debugger_gdbmi will not run CB
« Reply #5 on: April 07, 2012, 09:17:03 am »
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.
(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 Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: debugger_gdbmi will not run CB
« Reply #6 on: April 07, 2012, 04:45:18 pm »
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!
« Last Edit: April 07, 2012, 04:52:46 pm by Pecan »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: debugger_gdbmi will not run CB
« Reply #7 on: April 07, 2012, 05:09:21 pm »
What happens if you try to reproduce the debug session on the command line?
(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 Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: debugger_gdbmi will not run CB
« Reply #8 on: April 07, 2012, 05:36:09 pm »
What happens if you try to reproduce the debug session on the command line?

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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: debugger_gdbmi will not run CB
« Reply #9 on: April 07, 2012, 05:51:52 pm »
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.
(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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: debugger_gdbmi will not run CB
« Reply #10 on: April 07, 2012, 06:43:35 pm »
It works for me, Windows 7,  gcc 4.5.2, gdb 7.3.50.cvs-blabla.

Here is the full log -> http://pastebin.com/8LS6Mh8D I've stopped it manually, but other than that it worked as expected.
(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 Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: debugger_gdbmi will not run CB
« Reply #11 on: April 07, 2012, 07:16:27 pm »
It works for me, Windows 7,  gcc 4.5.2, gdb 7.3.50.cvs-blabla.

Here is the full log -> http://pastebin.com/8LS6Mh8D I've stopped it manually, but other than that it worked as expected.


Your output doesn't look like my output. I have a whole bunch of notification event received that you do not.

Could you post the SVN link of your plugin again. Maybe I have the wrong one.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: debugger_gdbmi will not run CB
« Reply #12 on: April 07, 2012, 07:28:17 pm »
The gdb-7.4 from a freshly installed mingw install is broken in mi mode. Crashed with internal error.

Here is the link: svn://cmpt.benbmp.org/cb_gdb_mi/debbugger_gdbmi
(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 Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: debugger_gdbmi will not run CB
« Reply #13 on: April 07, 2012, 07:50:52 pm »
The gdb-7.4 from a freshly installed mingw install is broken in mi mode. Crashed with internal error.

Here is the link: svn://cmpt.benbmp.org/cb_gdb_mi/debbugger_gdbmi

1) I'm getting the correct SVN debbugger_gdbmi
2) CB runs when entering:
    gdb.exe -fullname  -quiet --interpreter=mi -args C:\Usr\Proj\cbDebug\trunk\src\devel\codeblocks.exe
    -exec-run

Seems the only thing left to try is the executables you are using.
Where can we get your windows gcc 4.5.2, gdb 7.3.50.cvs-blabla.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: debugger_gdbmi will not run CB
« Reply #14 on: April 07, 2012, 07:57:50 pm »
(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!]