News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Debugger settings for wxWidgets?

Started by MyMindsAvatar, October 31, 2010, 09:29:55 AM

Previous topic - Next topic

MyMindsAvatar

Hi everyone,

I currently running C::B svn 6784 on Ubuntu Lucid Lynx with a wxWidgets GUI (v2.9.1), but I need some help configuring the default debugger (GNU gdb (GDB) 7.1-ubuntu) to display the wx objects in a more meaningful way. I'm assuming this is a configuration issue because I can find most of the information I'm after but through various class members (e.g. the value held in a wxString variable is found in _M_p in _M_dataplus in m_impl), rather than just being displayed as "text".

If anyone can offer any advice on how to get the correct display of variable information, I would be very grateful.

Many thanks,

Richard ~

oBFusCATed

You can try to use the wx python scripts for gdb, but you should comment the wx functions from the gdb_types.script file in the codeblocks distribution.
(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!]

MyMindsAvatar

Thanks oBFusCATed. I tried editing the dgb_types.script file but it didn't appear to have the any effect. I don't know how to try the wx python scripts suggestion in favour of what I'm currently using, so anything more on that would great.

I was wondering if this is because 2.9.1 is a developmental release and the string handling has been updated with better Unicode support, cf. 2.8.11 (current stable release)? Could this be a part of it, do you think?

Many thanks,

Richard ~

oBFusCATed

Yes, I think they've modified the internals of wxString in 2.9+, so the scripts coming with C::B aren't working...

You should remove the functions that register wxString parsing in C::B.
Then this might help: http://wxwidgets.blogspot.com/2009/01/pretty-printing-wxstuff-in-gdb.html
(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!]

MyMindsAvatar

Thanks again oBFusCATed. I've commented out the wxString section from the gdb_types.script (C::B scripts), and have found the print.py file in my wx folder (as indicated by your pretty-printing link). Only thing is, it looks like it should work (contains all the right "paths") but I'm not convinced it's being loaded...how would I check this?

Richard ~

oBFusCATed

Probably this could help: http://tromey.com/blog/?p=524
Or read in the gdb docs, there should be something in it...
Also you need gdb compiled with --enable-python
(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!]

ollydbg

Quote from: oBFusCATed on November 01, 2010, 12:28:28 PM
Probably this could help: http://tromey.com/blog/?p=524
Or read in the gdb docs, there should be something in it...
Also you need gdb compiled with --enable-python
http://code.google.com/p/qp-gcc/wiki/GDB

and there is a python wx script support for gdb in the package.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.