Related questions
How to print -0x4(%rbp) in gdb?
In the disassembly there's such code:
movl $0x6,-0x4(%rbp)
I try to print the value this way but fails:
(gdb) p 0x4(%esp)
A syntax error in expression, near `%esp)'.
(gdb) p 0x4+$esp
Argument to arithmetic …
GDB info registers command - Second column of output
Upon running info registers in gdb, we get an output similar to the following:
rax 0x1c 28
rbx 0x0 0
rcx 0x400a60 4196960
rdx 0x7fffffffde88 140737488346760
rsi 0x1 1
rdi 0x400932 4196658
rbp 0x0 0x0
rsp 0x7fffffffde68 0x7fffffffde68
r8 0x400ad0 4197072
…