1

一、problem description

1.(gdb) disas main (partial assembly code)

 0x000000000000066e <+0>: push %rbp 0x000000000000066f <+1>: mov %rsp,%rbp 0x0000000000000672 <+4>: sub $0x10,%rsp 

2.b *(main+0), r

Breakpoint 1, 0x000055555555466e in main ()

二、Why do the addresses display differently? (gdb)

①0x000000000000066e <+0>: push %rbp

②0x000055555555466e in main ()

1
  • 1
    PIE executables don't have an address until after they start running. Do disas after start or starti. (start is a shortcut for setting a breakpoint in main and running, starti stops before executing any instructions in user-space in the new process.) Commented Dec 28, 2020 at 9:44

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.