Difference between x and p in gdb?

后端 未结 1 2003
陌清茗
陌清茗 2021-02-20 16:35

I\'m a bit confused about the uses of x and p in gdb. Which one do I use to look at the contents of a register and which one to look at something in memory?

相关标签:
1条回答
  • 2021-02-20 17:40

    x shows you the contents of a memory address

    p shows you the value stored in a named variable

    info registers and info frame shows you registers and what they're doing.

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