Print variables in hexadecimal or decimal format

后端 未结 1 548
一整个雨季
一整个雨季 2020-12-12 20:24

Currently, when I print the value of a variable v in GDB (print v) I get an integer.

Is it possible to have GDB print such integer variable

相关标签:
1条回答
  • 2020-12-12 20:38

    Sure it is. Try these:

    # Hexadecimal
    p/x variable
    
    # Binary
    p/t variable
    

    See output formats.

    0 讨论(0)
提交回复
热议问题