User forums > Help

Can't see value of unicode strings while debugging

(1/4) > >>

Denis:
I can't see values of unicode strings while debugging. I just see "" for wxString or something like 97 for const wchar_t* variables at watch frame or at popup hint with value. Values for variables like "const char*" or std::string (not unicode) are show correctly. How do you find out values of unicode string variables?

PS: MinGW GCC 3.4.2 + GNU gdb 6.6
PSS: Sorry for my English :-)

Hitnrun:
Don't know if this can pose any trouble, but the only way I could see a wxString on the watch window, is to add the wxString variable to the watch window, right-click edit, "Edit watch", keep the type "undefined", enable the "watch as array", and set some array count (say, 20).
If the array count is bigger than the string, some garbage characters appear, don't know if this can result in a SEGV in the future.

eranif:
Hi,

I am not using C::B for debugging, but for watching wxString in unicode build, I simply type in the gdb command line:
'p str.ToAscii()' and voila!

I believe you can do this in C::B as well.

Eran

Hitnrun:

--- Quote from: eranif on September 26, 2007, 09:22:31 pm ---Hi,

I am not using C::B for debugging, but for watching wxString in unicode build, I simply type in the gdb command line:
'p str.ToAscii()' and voila!

I believe you can do this in C::B as well.

Eran


--- End quote ---
I don't know why, but when I try to watch

str.ToAscii()

I get an error message

gdb: Kernel event for pid=XXXX tid=YYYY code=EXCEPTION_DEBUG_EVENT

does someone knows why?

Denis:
This is very inconvenient ways to find out value of wxString or wchat_t* variables :( I wanna see it fast and without any problems.

Navigation

[0] Message Index

[#] Next page

Go to full version