User forums > Using Code::Blocks
How to make C::B gdb debugger watch display the content of a wxString ?
tomay3000:
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
oBFusCATed:
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.
sam_gonfle:
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
--- Quote ---[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:
--- End quote ---
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.
oBFusCATed:
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.
sam_gonfle:
wx 3.1.0
i've not tried wx 2.8 it's a relic
Navigation
[0] Message Index
[#] Next page
Go to full version