Question: 1. (7 pts) Given the C functions, GCC generated assembly and partial memory content below, void caller () int x = 200; f (&x, 100);

 1. (7 pts) Given the C functions, GCC generated assembly and

1. (7 pts) Given the C functions, GCC generated assembly and partial memory content below, void caller () int x = 200; f (&x, 100); Address in hex int *xp, int y) 1: f: 2: pushl%ebp 3: movi %esp, %ebp 4 : mov! 12 (%ebp) , %ecx 5 : movl 8 ( %ebp) , %eax 6:subl 08040030 0804002c 200 08040028 08040024? 08040020Ox0804002c 0804001cRet addr to caller() 08040018Ox08040030 08040014 %ecx, %edx) %ebp, %esp movi 8: popl %ebp 9: ret (3 pts) After line 7 is executed, %esp 1s 0x08040018. what are the values of %ecx, %edx, %ebp? (2 pts) After line 7 is executed, what are the content/values at memory locations 0x0804002c, 0x0 8040024? (2 pt) After line 9 is executed (function f returns), what are the values of %esp, %ebp? a. b. c. 1. (7 pts) Given the C functions, GCC generated assembly and partial memory content below, void caller () int x = 200; f (&x, 100); Address in hex int *xp, int y) 1: f: 2: pushl%ebp 3: movi %esp, %ebp 4 : mov! 12 (%ebp) , %ecx 5 : movl 8 ( %ebp) , %eax 6:subl 08040030 0804002c 200 08040028 08040024? 08040020Ox0804002c 0804001cRet addr to caller() 08040018Ox08040030 08040014 %ecx, %edx) %ebp, %esp movi 8: popl %ebp 9: ret (3 pts) After line 7 is executed, %esp 1s 0x08040018. what are the values of %ecx, %edx, %ebp? (2 pts) After line 7 is executed, what are the content/values at memory locations 0x0804002c, 0x0 8040024? (2 pt) After line 9 is executed (function f returns), what are the values of %esp, %ebp? a. b. c

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!