正在加载图片...
14subs0x4,岩esp 15mov0xc(号ebp),号eax 16push1(岩eax) 17 mov 0x8(号ebp),号eax 18push1(暑eax) 19 push $0x80484d8 180482f0<init+0x58> 21addS0x10,告esp gebp, esp 23 pop 号eb 24 ret Assume that procedure swap starts executing whith the following register values Register value %oebp Oxbffff628 Oxbffff60c Questions (1) What value does %ebp get set to on line2.(I pts) (2) At what address are the local variable"temp"stored, and where are parameters and the return address placed for function swap. (4 pts) (3) Explain caller saved registers and callee registers together with this segment of code. (4 pts) (4) Draw a diagram of the stack frame for function"swap"right after the 20th instruction call 80482f0< init+0x58>" Include as much information as you can about the addresses and the contents of the stack frame elements. (8 pt (5) Indicate the regions of the stack frame that are not used by swap. (1 pts) 7 of 7-Page 7 of 7 14 sub $0x4,%esp 15 mov 0xc(%ebp),%eax 16 pushl (%eax) 17 mov 0x8(%ebp),%eax 18 pushl (%eax) 19 push $0x80484d8 20 call 80482f0 <_init+0x58> 21 add $0x10,%esp 22 mov %ebp,%esp 23 pop %ebp 24 ret Assume that procedure swap starts executing whith the following register values: Register Value %ebp 0xbffff628 %esp 0xbffff60c Questions: (1) What value does %ebp get set to on line2. (1 pts) (2) At what address are the local variable “temp” stored, and where are parameters and the return address placed for function swap. (4 pts) (3) Explain caller saved registers and callee registers together with this segment of code. (4 pts) (4) Draw a diagram of the stack frame for function “swap” right after the 20th instruction ”call 80482f0 <_init+0x58>”. Include as much information as you can about the addresses and the contents of the stack frame elements. (8 pts) (5) Indicate the regions of the stack frame that are not used by swap. (1 pts)
<<向上翻页
©2008-现在 cucdc.com 高等教育资讯网 版权所有