User forums > Help
debugger_gdbmi pretty printing
oBFusCATed:
Looking at you other post, the problem is obvious. The initial commands handler has not escaped the paths in your source commands.
Can you also post the beginning of the log from the normal debugger?
Pecan:
Debugger_gdbmi log
--- Code: ---Active debugger config: GDB/MI:Default
start debugger
Building to ensure sources are up-to-date
Selecting target:
debug
Adding file: C:\Usr\Proj\test\Testpp\debug\Testpp.exe
[debug]PATH=.;C:\Usr\Proj\wxWidgets2810\lib\gcc_lib;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\test\Testpp\debug\Testpp.exe
Command-line: c:\Usr\mingw431\bin\gdb.exe -fullname -quiet --interpreter=mi -args C:\Usr\Proj\test\Testpp\debug\Testpp.exe
Working dir : C:\Usr\Proj\test\Testpp\.
Starting debugger:
[debug]Executing command: c:\Usr\mingw431\bin\gdb.exe -fullname -quiet --interpreter=mi -args C:\Usr\Proj\test\Testpp\debug\Testpp.exe
done
[debug]Executor stopped
[debug]Debugger_GDB_MI::CommitBreakpoints
[debug]ActionsMap::Run -> starting action: 0594C9A8 id: 1
[debug]BreakpointAddAction::m_initial_cmd = 10000000000
[debug]cmd==>10000000000-break-insert C:\Usr\Proj\test\Testpp\TestppMain.cpp:96
[debug]ActionsMap::Run -> starting action: 05877B20 id: 2
[debug]cmd==>20000000000-interpreter-exec console "source c:\Usr\mingw431\bin\stl.gdb"
[debug]ActionsMap::Run -> starting action: 058776A0 id: 3
[debug]cmd==>30000000000-interpreter-exec console "source c:\Usr\mingw431\bin\wx.gdb"
[debug]ActionsMap::Run -> starting action: 05877658 id: 4
[debug]cmd==>40000000000-enable-pretty-printing
[debug]output==>=thread-group-added,id="i1"
[debug]unparsable_output==>~"Reading symbols from C:\\Usr\\Proj\\test\\Testpp\\debug\\Testpp.exe..."
[debug]notification event recieved!
[debug]unparsable_output==>~"done.\n"
[debug]unparsable_output==>(gdb)
[debug]output==>10000000000^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x00402f69",func="TestppDialog::OnAbout(wxCommandEvent&)",file="C:\\Usr\\Proj\\test\\Testpp\\TestppMain.cpp",fullname="C:\\Usr\\Proj\\test\\Testpp\\TestppMain.cpp",line="96",times="0",original-location="C:\\Usr\\Proj\\test\\Testpp\\TestppMain.cpp:96"}
[debug]unparsable_output==>(gdb)
[debug]unparsable_output==>&"c:Usrmingw431\binstl.gdb: No such file or directory.\n"
[debug]output==>20000000000^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]BreakpointAddAction::OnCommandResult: 10000000000
[debug]BreakpointAddAction::breakpoint index is 1
[debug]BreakpointAddAction::Finishing1
[debug]BreakpointAddAction::destructor
[debug]output==>30000000000^error,msg="c:Usrmingw431\binwx.gdb: No such file or directory."
[debug]unparsable_output==>(gdb)
[debug]output==>40000000000^done
[debug]unparsable_output==>(gdb)
[debug]ActionsMap::Run -> starting action: 05792678 id: 5
[debug]RunAction::OnStart -> -exec-run
[debug]cmd==>50000000000-exec-run
[debug]output==>=thread-group-started,id="i1",pid="3060"
[debug]output==>=thread-created,id="1",group-id="i1"
[debug]unparsable_output==>~"[New Thread 3060.0xff4]\n"
[debug]output==>50000000000^running
[debug]output==>*running,thread-id="all"
[debug]unparsable_output==>(gdb)
[debug]notification event recieved!
Found child pid: 3060
[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:\\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]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]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]notification event recieved!
[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\\user32.dll",target-name="C:\\Windows\\syswow64\\user32.dll",host-name="C:\\Windows\\syswow64\\user32.dll",symbols-loaded="0",thread-group="i1"
[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]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]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\\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]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]notification event recieved!
[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]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:\\Windows\\SysWOW64\\dwmapi.dll",target-name="C:\\Windows\\SysWOW64\\dwmapi.dll",host-name="C:\\Windows\\SysWOW64\\dwmapi.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\\ole32.dll",target-name="C:\\Windows\\SysWOW64\\ole32.dll",host-name="C:\\Windows\\SysWOW64\\ole32.dll",symbols-loaded="0",thread-group="i1"
[debug]output==>=library-unloaded,id="C:\\Windows\\SysWOW64\\ole32.dll",target-name="C:\\Windows\\SysWOW64\\ole32.dll",host-name="C:\\Windows\\SysWOW64\\ole32.dll",thread-group="i1"
[debug]notification event recieved!
[debug]notification event recieved!
[debug]output==>*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame={addr="0x00402f69",func="TestppDialog::OnAbout",args=[{name="this",value="0x2115c98"},{name="event",value="..."}],file="C:\\Usr\\Proj\\test\\Testpp\\TestppMain.cpp",fullname="C:\\Usr\\Proj\\test\\Testpp\\TestppMain.cpp",line="96"},thread-id="1",stopped-threads="all"
[debug]unparsable_output==>(gdb)
[debug]notification event recieved!
[debug]Executor stopped
[debug]ActionsMap::Run -> starting action: 02D3D5B8 id: 6
[debug]cmd==>60000000000-var-create - @ msg
[debug]output==>60000000000^done,name="var1",numchild="1",value="{...}",type="wxString",thread-id="1",has_more="0"
[debug]unparsable_output==>(gdb)
[debug]WatchCreateAction::OnCommandOutput - processing command 60000000000
[debug]WatchCreateAction::Output - finishing at60000000000
[debug]updating watches
[debug]ActionsMap::Run -> starting action: 05877AD8 id: 7
[debug]cmd==>70000000000-var-delete var1
[debug]output==>70000000000^done,ndeleted="1"
[debug]unparsable_output==>(gdb)
--- End code ---
Pecan:
Debugger branch log
--- Code: ---Building to ensure sources are up-to-date
Selecting target:
debug
Adding source dir: C:\Usr\Proj\test\Testpp\
Adding source dir: C:\Usr\Proj\test\Testpp\
Adding file: C:\Usr\Proj\test\Testpp\debug\Testpp.exe
Changing directory to: C:/Usr/Proj/test/Testpp/.
[debug]PATH=.;C:\Usr\Proj\wxWidgets2810\lib\gcc_lib;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
[debug]Command-line: C:\Usr\mingw431\bin\gdb.exe -nx -fullname -quiet -args C:/Usr/Proj/test/Testpp/debug/Testpp.exe
[debug]Working dir : C:\Usr\Proj\test\Testpp
Starting debugger: C:\Usr\mingw431\bin\gdb.exe -nx -fullname -quiet -args C:/Usr/Proj/test/Testpp/debug/Testpp.exe
done
[debug]> set prompt >>>>>>cb_gdb:
[debug]Skip initializing the scripting!
Setting breakpoints
[debug]Reading symbols from C:/Usr/Proj/test/Testpp/debug/Testpp.exe...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.2.50.20101213
[debug]Copyright (C) 2010 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law. Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "mingw32".
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off
Debugger name and version: GNU gdb (GDB) 7.2.50.20101213
[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set debugevents on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> source C:\Usr\mingw431\bin\stl.gdb
source C:\Usr\mingw431\bin\wx.gdb
[debug]>>>>>>cb_gdb:>>>>>>cb_gdb:
[debug]> directory C:/Usr/Proj/test/Testpp/
[debug]>>>>>>cb_gdb:
[debug]> break "C:/Usr/Proj/test/Testpp/TestppMain.cpp:96"
[debug]Breakpoint 1 at 0x402f69: file C:\Usr\Proj\test\Testpp\TestppMain.cpp, line 96.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]gdb: windows_init_thread_list
Child process PID: 964
[debug][New Thread 964.0xfd4]
[debug]Breakpoint 1, TestppDialog::OnAbout (this=0x2155c98, event=...) at C:\Usr\Proj\test\Testpp\TestppMain.cpp:96
[debug]C:\Usr\Proj\test\Testpp\TestppMain.cpp:96:2590:beg:0x402f69
[debug]>>>>>>cb_gdb:
At C:\Usr\Proj\test\Testpp\TestppMain.cpp:96
[debug]> set debugevents off
[debug]>>>>>>cb_gdb:
[debug]> whatis msg
[debug]type = wxString
[debug]>>>>>>cb_gdb:
[debug]> output &msg
[debug](wxString *) 0x28e770>>>>>>cb_gdb:
[debug]> output msg
[debug]"wxWidgets 2.8.10-Windows-Unicode build">>>>>>cb_gdb:
--- End code ---
oBFusCATed:
Pecan,
Have you disabled "Enable watch stripts" in the normal gdb plugin?
It looks like you have not?
About the problem: I guess, I have to escape all '\' characters, when executing cli commands.
I can't test on windows at the moment, but I guess this patch will fix it:
--- Code: ---Index: src/plugin.cpp
===================================================================
--- src/plugin.cpp (revision 143)
+++ src/plugin.cpp (working copy)
@@ -1250,7 +1250,10 @@
if (escaped_cmd[0] == wxT('-'))
AddStringCommand(escaped_cmd);
else
+ {
+ escaped_cmd.Replace(wxT("\\"), wxT("\\\\"), true);
AddStringCommand(wxT("-interpreter-exec console \"") + escaped_cmd + wxT("\""));
+ }
}
void Debugger_GDB_MI::AttachToProcess(const wxString& pid)
--- End code ---
Pecan:
Ummm, nope. Enable watch scripts is UNchecked.
I'll give the patch a try. Thanks.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version