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

C::B wxString & GDB

Started by uenz, October 06, 2006, 08:59:00 PM

Previous topic - Next topic

uenz

Hi,

i tried to find out if is is possible to show wxString contents in GDB.
A post form Jan/Feb 06 says it should be possible and work without intervention.
In my installation i only see wxString::m_pchData, but not the Text in the String.
No clue what i can du to get it to work.
Can someone give me a hint?

thx
uenz

Pecan

#1
   Could you please state your Operating System, Compiler, and CodeBlocks Version.

uenz

Oh sorry i completely forgot to do...
OS: WinXP
C::B  1.00 Rev. 3004 (nightly build)
GCC 3.4.1
GDB 3.6

The debug problem also occures on my Suse Linux box (GCC 4.1) with the selfcompiled C:B from svn.

Pecan

Quote from: uenz on October 06, 2006, 08:59:00 PM
Hi,

i tried to find out if is is possible to show wxString contents in GDB.
A post form Jan/Feb 06 says it should be possible and work without intervention.
In my installation i only see wxString::m_pchData, but not the Text in the String.
No clue what i can du to get it to work.
Can someone give me a hint?

thx
uenz

When using the CB debugger (not standalone GDB) wxStrings are shown
in both the watches window and the popup window.



When using the standalone GDB debugger, strings can be displayed using the "x" display command:



The following url contains the documentation for GDB which could be found using Google.
http://www.google.com/search?hl=en&q=GDB+documentation&btnG=Google+Search


uenz

Thanks for your fast response although my question was not complete.
I use only C:B to ddebug, but without success. Here is a Screenshot of my watchwindow:


[attachment deleted by admin]

Pecan

Quote from: uenz on October 07, 2006, 06:59:48 PM
Thanks for your fast response although my question was not complete.
I use only C:B to ddebug, but without success. Here is a Screenshot of my watchwindow:


Right click on the variable. It will add an entry into the context menu like "watch variablename". Click on that and you'll be able to see the string.

uenz

Hi Pecan,

thanks for your patience! I looked in all settings parameter instead of adding the variable to the watch by my own, because with all other types (int,float..) in Local Variables i was fine.
Thank you very much, for the solution!

thx
uenz

Pecan

This may be a bug. I'm not sure.

mandrav

Quote from: Pecan on October 08, 2006, 03:49:11 AM
This may be a bug. I'm not sure.

It's not a bug. The local vars and function args are returned by gdb automatically. We have no control over how they 're displayed.
Manually set watches (and tooltips) on the other hand, we can display them in any format we like...
Be patient!
This bug will be fixed soon...