I will narrow down my questions:
The entry address in GDB stays the same for the same program (even after reboot, and after rewriting the source code).
Why is th
For example 0x80483f4 is the starting address.
This is likely. Unless you have PIE (position independent executables), it will stay the same (for one binary) forever.
$2 = 0x80483fa
(gdb) x $2 0x80483fa : 0x3fc45c7
That is the binary representation of the instructions at main()+6
. Will never change in one binary.
(gdb) p 0x3fc45c7 $3 = 66864583 <-- even after reboot.
That means 0x3fc45c7 is 66864583 in decimal...
Note that none of this has anything to do with a
or b
.
BTW the best way to get values of variables "before assignment" is to printf
them before the assignment.