Author Topic: wxGTK291 and debug wxString  (Read 1769 times)

Offline cowboy65

  • Single posting newcomer
  • *
  • Posts: 2
wxGTK291 and debug wxString
« 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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12600
    • Travis build status
Re: wxGTK291 and debug wxString
« Reply #1 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.
(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!]