I am using gdb
disassemble my_fun
# 0x7ffff5792a60 <PRIVATE0000000000579168>: push %r12
# => 0x7ffff5792a62 <PRIVATE0000000000579168+2>: push %r13
# 0x7ffff5792a64 <PRIVATE0000000000579168+4>: push %r14
I notice that the memory location of instructions e.g. 0x7ffff5792a60
is the same in different gdb
debug sessions.
How is it possible? Is it a virtual memory address? Are we guaranteed to have the same memory address? Does it depend on how the application is compiled?