问题
I show charset in my gdb:
The host character set is "UTF-8".
The target character set is "UTF-8".
The target wide character set is "auto; currently UTF-32".
But when I try to output a string in a register
p (char*) $register
I got a very strange string which hard to recognise:
$16 = 0x100001040 "A\020\021\021\033\ndgjhbhnghkb=ejj=h\004\005\b\003 ...
I am sure that if the string is purely ascii, all works fine.
So what should I do to get the string I want to see?
来源:https://stackoverflow.com/questions/44196215/gdb-print-string-in-an-wrong-format-a-little-like-octal-string