开发者

Why I can't show the string normally in gdb?

source:

char *pid_file...

gdb:

(gdb) p (char *)pid_file
$47 = 0x423047 "H\215\005\366i "
(gdb) x/s pid_file
开发者_运维技巧0x423047 <__libc_csu_init+55>:   "H\215\005\366i "

What's wrong here?


It looks like pid_file has not been assigned to any valid string yet, and points to arbitrary "garbage". You've elided the most relevant part ;-(

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜