Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: killerbot on January 10, 2006, 08:49:55 pm

Title: watching wxString
Post by: killerbot on January 10, 2006, 08:49:55 pm
In older svn builds I was able to see the value of wxString variables in the debugger/watches, I could see the content of the m_pchData, but now nothing is visible anymore ? Might this be a unicode effect ??
Title: Re: watching wxString
Post by: mandrav on January 10, 2006, 08:53:43 pm
Might this be a unicode effect ??

Exactly.
Title: Re: watching wxString
Post by: killerbot on January 10, 2006, 09:07:25 pm
any solution in the pipeline ?
Title: Re: watching wxString
Post by: mandrav on January 10, 2006, 09:17:48 pm
any solution in the pipeline ?

Not yet but I 'm looking for one...
Title: Re: watching wxString
Post by: grv575 on January 11, 2006, 01:50:11 am
/nhc ??

http://blogs.msdn.com/joelpob/archive/2004/04/21/117664.aspx


Title: Re: watching wxString
Post by: mandrav on January 11, 2006, 09:13:42 am
x /nhc displays only a character. I 'm searching for a solution for strings...
Title: Re: watching wxString
Post by: Michael on January 11, 2006, 11:06:20 am
x /nhc displays only a character. I 'm searching for a solution for strings...
This (http://www.skynet.ie/~caolan/TechTexts/GdbUnicodePrinting.html) could help?

Michael
Title: Re: watching wxString
Post by: mandrav on January 11, 2006, 11:17:19 am
Thanks for the link Michael, but it assumes that you have in *your* executable a couple of convenient functions. We want C::B to handle this automatically though.

But I 've found a workaround already. Testing its last bits now and committing soon :)
Title: Re: watching wxString
Post by: Michael on January 11, 2006, 11:27:04 am
We want C::B to handle this automatically though.

Yes, I agree. Automatically would be preferably.

But I 've found a workaround already. Testing its last bits now and committing soon :)

Great :D.

Afer this document (http://sourceware.org/gdb/download/onlinedocs/gdb_9.html#SEC55):

Quote
More work inside GDB is needed to support multi-byte or variable-width character encodings, like the UTF-8 and UCS-2 encodings of Unicode.

I can just hope that this work will be done in a not-so-far future :).

Michael
Title: Re: watching wxString
Post by: mandrav on January 11, 2006, 12:15:13 pm
Quote
Yes, I agree. Automatically would be preferably.

Hehe, we 're only aiming for the best ;)

OK committed.
Notes:

:lol:

[attachment deleted by admin]
Title: Re: watching wxString
Post by: killerbot on January 11, 2006, 03:12:25 pm
Quote
It doesn't work inside "Local variables" and "Function arguments" automatic watches. Only in

Is it a big job to get it also working in those cases ?
Well for the moment we'll just add them manually (manual automatically ;-) )
Title: Re: watching wxString
Post by: mandrav on January 11, 2006, 03:48:47 pm
Is it a big job to get it also working in those cases ?

If it was easy I would have done it already.
On the other hand, I implemented it for tooltip evaluation too :)
Title: Re: watching wxString
Post by: rickg22 on January 17, 2006, 05:12:23 pm
Yeah but what happens to wxStrings in the locals? I need to add the watch AGAIN, even if the variable (now useless) remains in the locals.