- - - - - - begin - - - - - - ;42 : speak(&chinese); 0x4013c7 lea 0x5c(%esp),%eax 0x4013cb mov %eax,(%esp) 0x4013ce movl $0x1,0x20(%esp) 0x4013d6 call 0x401350 <speak(CPerson*)> - - - - - - call speak - - - - - - ;34 : void speak(CPerson* pPerson) { 0x401350 push %ebp 0x401351 mov %esp,%ebp 0x401353 sub $0x8,%esp ;35 : pPerson->showSpeak(); 0x401356 mov 0x8(%ebp),%eax //一级寻址ebp+0x8 0x401359 mov (%eax),%eax //二级寻址eax 0x40135b add $0x8,%eax 0x40135e mov (%eax),%eax //三级寻址eax,这里等同于0x438780 0x401360 mov 0x8(%ebp),%ecx 0x401363 call *%eax //call showSpeak ;36 : } 0x401365 nop 0x401366 leave 0x401367 ret - - - - - - call showSpeak - - - - - - ;14 : virtual void showSpeak() { 0x438780 push %ebp 0x438781 mov %esp,%ebp 0x438783 sub $0x28,%esp 0x438786 mov %ecx,-0xc(%ebp) ;15 : printf("speak Chinese\n"); 0x438789 movl $0x4b9024,(%esp) 0x438790 call 0x430c20 <puts> ;16 : } 0x438795 nop 0x438796 leave 0x438797 ret
- - - - - - 对应栈过程 - - - - - - 栈编号 处值 地址 esp-0x10(esp) 0x28fea0 esp-0xc 0x28fea4 esp-0x8(ebp) 0x28fea8 esp 0x28ff0c 0x28feb0 0x28ff08 0x28feb0 esp+0x20 0x1 0x28fed0 esp+0x54 0x4c14d0 0x28ff04 esp+0x58 0x4c150c 0x28ff08 esp+0x5c 0x4c14f8 0x28ff0c ebp 0x28ff28 - - - - - - 补充处 - - - - - - 0x4c14d0 0x4c14d4 0x438658 0x4c14d8 0x4c14f8 0x4c14fc eax 0x438780 0x4c1500 0x4c150c 0x4c1510 0x43880c 0x4c1514
原文地址:https://www.cnblogs.com/reverse201/p/10362241.html
时间: 2024-10-16 01:02:54