Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: cowboy65 on April 13, 2011, 01:21:34 am

Title: wxGTK291 and debug wxString
Post by: cowboy65 on April 13, 2011, 01:21:34 am
I recently moved to wxGTK-2.9.1.  My other system components are Ubuntu 10.10 and Code::Blocks 10.05.  When I want to watch a wxString variable in the debugger, I cannot set a watch on it, and the tooltip mode complains about not finding a wxStringData variable in the context.  The debugger reported when it first started that is had registered a new type - wxString. Researching this problem suggested it was related to switching to Unicode mode for all wxStrings, and further that gdb_types.script should allow the gdb debugger to deal with this.  Looking into that script, I see it is apparently accessing an internal component of wxString that is of type wxStringData. My version of the script is dated 2010-08-10.  Looking into wx/string.h, I find no mention of wxStringData in that file.

I know most people using wxGTK-2.9.1 and C::B need to debug wxString variables, so there must be a way to do it that I have overlooked in my setup. Any suggestions?
Title: Re: wxGTK291 and debug wxString
Post by: oBFusCATed on April 13, 2011, 02:14:43 am
Install python enabled debugger, wx python scripts for gdb and disable the wxString handling in gdb_types.script.
This is the best way to debug wxString.
The wxString was changed in 2.9, so probably the gdb script in C::B is broken and won't be fixed,
because the python pretty printers are better suited for the task.