User forums > Help
debugger_gdbmi pretty printing
Pecan:
I'm having a problem displaying wxStrings with the debugger_gdbmi plugin.
I've installed pretty printing according to http://code.google.com/p/qp-gcc/wiki/GDB#Load_the_python_script_when_Debugger_started_in_Codeblocks
This appears to work ok for the debugger branch of CB.
But for the debugger_gdbmi plugin:
When I put a breakpoint on the line "wxMessageBox..."
--- Code: ---void TestppDialog::OnAbout(wxCommandEvent &event)
{
wxString msg = wxbuildinfo(long_f);
wxMessageBox(msg, _("Welcome to..."));
--- End code ---
Then hover over msg, I get the response "msg {...} wxString".
Whereas with the debugger branch of CB, I get: msg "wxWidgets 2.8.10-Windows-Unicode build" wxString
debugger_gdbmi output:
--- Code: ---[debug]output==>*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame={addr="0x00402f69",func="TestppDialog::OnAbout",args=[{name="this",value="0x2165d70"},{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: 028EE018 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: 05614138 id: 7
[debug]cmd==>70000000000-var-delete var1
[debug]output==>70000000000^done,ndeleted="1"
[debug]unparsable_output==>(gdb)
--- End code ---
gdb version output:
--- Code: ---c:\Usr\mingw431\bin>gdb --version
GNU gdb (GDB) 7.2.50.20101213
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
--- End code ---
Any suggestions would be appreciated.
svn build rev 7904 (2012-03-19 21:48:48) gcc 4.3.1 Windows/unicode - 32 bit
oBFusCATed:
Can you try with gdb-7.4, but I guess I'm not handling this case correctly.
Also I doubt the pretty printers work for wxString in 2.8, they are made for 2.9+, but I may be wrong.
Does it work for std::string? Because I think, I've tried it and it worked.
ollydbg:
--- Quote from: oBFusCATed on April 06, 2012, 04:23:30 pm ---Also I doubt the pretty printers work for wxString in 2.8, they are made for 2.9+, but I may be wrong.
--- End quote ---
If I remember correctly, wxWidgets 2.8.x and wx2.9+ need different python pretty printers (at least for wxString). See:
http://forums.codeblocks.org/index.php/topic,15050.msg100720.html#msg100720
I don't have c::b at hand right now, so I can not do any test.
Pecan:
--- Quote from: oBFusCATed on April 06, 2012, 04:23:30 pm ---Can you try with gdb-7.4, but I guess I'm not handling this case correctly.
Also I doubt the pretty printers work for wxString in 2.8, they are made for 2.9+, but I may be wrong.
Does it work for std::string? Because I think, I've tried it and it worked.
--- End quote ---
Pretty printing does work with wx 2.8 in the debugger branch.
debugger_gdmi also does *not* display a std string:
--- Code: ---[debug]output==>*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame={addr="0x00403005",func="TestppDialog::OnAbout",args=[{name="this",value="0x2155c98"},{name="event",value="..."}],file="C:\\Usr\\Proj\\test\\Testpp\\TestppMain.cpp",fullname="C:\\Usr\\Proj\\test\\Testpp\\TestppMain.cpp",line="100"},thread-id="1",stopped-threads="all"
[debug]unparsable_output==>(gdb)
[debug]notification event recieved!
[debug]Executor stopped
[debug]ActionsMap::Run -> starting action: 02BF9328 id: 6
[debug]cmd==>60000000000-var-create - @ mystr
[b][debug]output==>60000000000^done,name="var1",numchild="2",value="{...}",type="TestppDialog::string",thread-id="1",has_more="0"[/b]
[debug]unparsable_output==>(gdb)
[debug]WatchCreateAction::OnCommandOutput - processing command 60000000000
[debug]WatchCreateAction::Output - finishing at60000000000
[debug]updating watches
[debug]ActionsMap::Run -> starting action: 0562EED0 id: 7
[debug]cmd==>70000000000-var-delete var1
[debug]output==>70000000000^done,ndeleted="1"
[debug]unparsable_output==>(gdb)
--- End code ---
I'll see if I can find a gdb 7.4 for windows 7. If you have a link I'd appreciate it.
Pecan:
Here's a screen shot with wx 2.8 and the debugger branch of CB using pretty printers.
Here's a screen shot with wx.2.8 and the debugger_gdbmi using pretty printers
so, it seems to me, that wx2.8 is not the problem.
Navigation
[0] Message Index
[#] Next page
Go to full version