In GDB how do I print 0xc(%rsp)?

喜欢而已 提交于 2021-02-11 07:31:10

问题


I'm trying to debug some code for a project and I've come up against this line cmpl $0x7,0xc(%rsp). What is 0xc(%rsp), and how do I print it?


回答1:


What is 0xc(%rsp)

The memory location 12 bytes above current stack pointer. The value at that location is being compared with 7.

and how do I print it?

(gdb) print $rsp+0xc


来源:https://stackoverflow.com/questions/16212339/in-gdb-how-do-i-print-0xcrsp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!