This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
printing wchar_t*
- From: Vladimir Prus <ghost at cs dot msu dot su>
- To: gdb at sources dot redhat dot com
- Date: Thu, 13 Apr 2006 20:04:32 +0400
- Subject: printing wchar_t*
Hi,
at the moment, gdb seem to provide no support for printing wchar_t* values.
It prints them like this:
(gdb) print p15
print p15
$486 = (wchar_t *) 0x80489f8
Is there any "standard" way to make gdb automatically traverse wchar_t*,
printing values, and stopping at '0' value. I don't care much how it's
actually printed, for example, printing raw hex values will work:
0x56, 0x1456
or using \u escapes:
'test\u1234'
or whatever.
I have a user-defined command that can produce the output I want, but is
defining a custom command the right approach?
- Volodya