Question: *Note: I am not sure if Question 3 is correct. Given the C functions, GCC generated assembly and partial memory content below, answer the following


*Note: I am not sure if Question 3 is correct.
Given the C functions, GCC generated assembly and partial memory content below, answer the following questions: void caller() { int x = 200; Address in hex f(&x,100); } 08040030 void f(int *xp, int y) { 200 *xp -= y; 0804002c 08040028 08040024 } ? 1: f: 08040020 2: pushl febp 0804001c Ox0804002c Ret addr to caller() Ox08040030 08040018 3: movl fesp, Sebp 12 (Sebp), fecx 08040014 4: movl 5: movl 8 (Xebp), %edx subl Secx, (Sedx) 7: movl febp,%esp 8: popl febp 9: ret 1-3. After line 7 is executed, esp is 0x08040018. What are the values of ecx, Sedx, %ebp? Secx = |Question 1 Bedx = Question 2 Sebp = 0x08040014 4-5. After line 7 is executed, what are the content/values at memory locations Ox0804002c, 0x08040024? Memory location 0x0804002c contains Question 4 Memory location 0x08040024 contains Question 5 6-7. After line 9 is executed (function f returns), what are the values of Xesp, Sebp? fesp = Question 6 febp = Question 7
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
