I will limit my questions:
The write address in GDB remains the same for the same program (even after rebooting and after overwriting the source code).
Why is this?
For example, 0x80483f4 is the starting address.
**0x80483f4** <main()> push %ebp β β0x80483f5 <main()+1> mov %esp,%ebp β β0x80483f7 <main()+3> sub $0x10,%esp β β0x80483fa <main()+6> movl $0x3,-0x4(%ebp) β β0x8048401 <main()+13> movl $0x3,-0x8(%ebp) β β0x8048408 <main()+20> mov $0x0,%eax β β0x804840d <main()+25> leave β β0x804840e <main()+26> ret
In addition, the value that we get, say, 0x80483fa , is always the same.
$2 = 0x80483fa <main()+6> (gdb) x $2 0x80483fa <main()+6>: 0x3fc45c7 (gdb) p 0x3fc45c7 $3 = 66864583 <-- even after reboot.
What does this tell me? I'm interested in the values ββbefore and after each assignment (say c = a + b later), without using breakpoints to jump one line at a time.
Source:
int main() { int b = 3; int a = 3; return 0; }
Can someone explain this to me? Thank you (I would also mark this as homework, although this is actually not the case.)
source share