Author Topic: C::B wxString & GDB  (Read 4894 times)

Offline uenz

  • Multiple posting newcomer
  • *
  • Posts: 14
C::B wxString & GDB
« 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

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2288
Re: C::B wxString & GDB
« Reply #1 on: October 06, 2006, 10:10:11 pm »
   Could you please state your Operating System, Compiler, and CodeBlocks Version.
« Last Edit: October 06, 2006, 10:14:21 pm by Pecan »

Offline uenz

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: C::B wxString & GDB
« Reply #2 on: October 07, 2006, 03:10:20 pm »
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.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2288
Re: C::B wxString & GDB
« Reply #3 on: October 07, 2006, 05:45:53 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


Offline uenz

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: C::B wxString & GDB
« Reply #4 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:


[attachment deleted by admin]

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2288
Re: C::B wxString & GDB
« Reply #5 on: October 07, 2006, 07:30:07 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.

Offline uenz

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: C::B wxString & GDB
« Reply #6 on: October 08, 2006, 12:22:59 am »
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

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2288
Re: C::B wxString & GDB
« Reply #7 on: October 08, 2006, 03:49:11 am »
This may be a bug. I'm not sure.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: C::B wxString & GDB
« Reply #8 on: October 08, 2006, 08:53:26 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...