hailongs
V2EX  ›  C

gdb 调试问题

  •  
  •   hailongs · Jan 15, 2016 · 1706 views
    This topic created in 3793 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   ·   3636 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 10:32 · PVG 18:32 · LAX 03:32 · JFK 06:32
    ♥ Do have faith in what you're doing.