DaedalusUsedPerl
DaedalusUsedPerl

Reputation: 772

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

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?

Upvotes: 1

Views: 13508

Answers (1)

Employed Russian
Employed Russian

Reputation: 213606

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

Upvotes: 1

Related Questions