Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: tomay3000 on April 25, 2017, 03:19:11 am
-
Hello,
How to make C::B gdb debugger watch display the content of a wxString stored in m_impl to be displayed directly in wxString field in the watch grid (so I don't have to expand wxString object each time I want to see the content of m_impl).
Help me please :'(
Thank you for your understanding.
I am using Windows XP SP3 32bit under VMware Workstation, with C::B svn 11021 and TDM-GCC-32 v5.1.0 and wxWidgets 3.1.0
-
Find the gdb pretty printer script in the wx project for your version and search how to enable it in codeblocks.
You need python enabled gdb for this to work.
-
hi,
I have the same problem.
wxString are displayed in the watch tab when local under string->m_impl->..->_M_P_.
If the same string is added as watch , nothing works. If the string is global, nothing works.
If the cursor hover on the string, i have
[debug]> whatis strTrv
[debug]type = wxString
[debug]>>>>>>cb_gdb:
[debug]> output &strTrv
[debug](wxString *) 0xdcafb90>>>>>>cb_gdb:
[debug]> output /c strTrv.m_pchData[0]@((wxStringData*)strTrv.m_pchData - 1)->nDataLength
[debug]No symbol "wxStringData" in current context.
[debug]>>>>>>cb_gdb:
As for every C::B's update, it's a nightmare to be able to debug the wxString. I spent a lot of time to make it work for previous versions of C::B or wxWidgets and of course, i don't remember what i've done before. I tried whith another debbuger ( TDM ) with python-> not working.
copying print.py stuff from wxWidgets -> not working
forums are most of time a waste of time, problem is known since more then 10 years...
I don't feel like spending days to configurate a single debugger, so i tried another ide : Netbeans.
it works perfectly !!!
Hope i've been a bit more helpfull for tomay3000.
regards.
-
sam_gonfle:
I guess not... You've not mentioned any version information for any of the components you've tried.
wxString changed in wx3.x, so old scripts (for wx2.8) don't work any more.
Also the defaults in C::B are only meant to work with wx2.8.
-
wx 3.1.0
i've not tried wx 2.8 it's a relic
-
Still not enough information like cb version, compiler, debugger version, os...
For wx3.1 you should setup gdb enabled python.
-
C::B 16.01
gdb 7.6.1 , gcc, ... standard toolchain installed with/by C::B 16.01
Windows
btw: when C::B starts, it restore the first project in the workspace as the active prj, wichever the active proj saved was .
-
gdb 7.6.1
i don't think this debugger is python enabled. You will need to check this. Here are some links that will help you:
http://wiki.codeblocks.org/index.php/Pretty_Printers
http://forums.codeblocks.org/index.php?topic=16633.0