gdb won't by default let you print wide character strings. Here is a little bit of gdb code that'll let you print them. In case that page moves, here is the relevant stuff. Paste this into your.gdbinit
and then you can usewchar_print
:define wchar_print echo " set $i = 0 while (1 == 1) set $c = (char)(($arg0)[$i++]) if ($c == '\0') loop_break end printf "%c", $c end echo " end document wchar_print wchar_print <wstr> Print ASCII part of <wstr>, which is a wide character string of type wchar_t*. end