V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
hailongs
V2EX  ›  C

gdb 调试问题

  •  
  •   hailongs · 2016 年 1 月 15 日 · 1501 次点击
    这是一个创建于 3663 天前的主题,其中的信息可能已经有所发展或是发生改变。

    gdb 调试打印中文如何打印,每次打印都会打印如下。。

    $23 = 0x6d26ecd8 "һ\274", <incomplete sequence \323>

    2 条回复    2016-01-15 20:54:43 +08:00
    zts1993
        1
    zts1993  
       2016 年 1 月 15 日 via Android
    非二进制安全字符串?
    yeahren
        2
    yeahren  
       2016 年 1 月 15 日
    (gdb) help printf
    printf "printf format string", arg1, arg2, arg3, ..., argn
    This is useful for formatted output in user-defined commands.
    .
    .
    .
    (gdb) printf "%s\n", test_chinese_str
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   817 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 21:40 · PVG 05:40 · LAX 13:40 · JFK 16:40
    ♥ Do have faith in what you're doing.