V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
hailongs
V2EX  ›  C

gdb 调试问题

  •  
  •   hailongs · Jan 15, 2016 · 1644 views
    This topic created in 3761 days ago, the information mentioned may be changed or developed.

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

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

    2 replies    2016-01-15 20:54:43 +08:00
    zts1993
        1
    zts1993  
       Jan 15, 2016 via Android
    非二进制安全字符串?
    yeahren
        2
    yeahren  
       Jan 15, 2016
    (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
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   747 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 20:44 · PVG 04:44 · LAX 13:44 · JFK 16:44
    ♥ Do have faith in what you're doing.