This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]