I have the following assembly, which I'd like to see how the:
push %rbp
mov %rsp, %rbp
work before the actual code starts, for example:
.globl main
main:
push %rbp
mov %rsp, %rbp
movq $8, -8(%rbp)
mov -8(%rbp), %rax
pop %rbp
ret
However, when I run gdb
and then b main
and then run
, it starts directly on the instruction movq $0x8,-0x8(%rbp)
. Is there a way to "start from the top" and not skip the prologue?