扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
struct C041 { C041() : c_(0x01) {} virtual void foo() { c_ = 0x02; } char c_; }; |
C041 obj; PRINT_DETAIL(C041, obj) PRINT_VTABLE_ITEM(obj, 0, 0) obj.foo(); C041 * pt = &obj; pt->foo(); |
The detail of C041 is 14 b3 45 00 01 obj : objadr:0012F824 vpadr:0012F824 vtadr:0045B314 vtival(0):0041DF1E |
004230DF lea ecx,[ebp+FFFFF948h] 004230E5 call 0041DF1E |
01 004263F0 push ebp 02 004263F1 mov ebp,esp 03 004263F3 sub esp,0CCh 04 004263F9 push ebx 05 004263FA push esi 06 004263FB push edi 07 004263FC push ecx 08 004263FD lea edi,[ebp+FFFFFF34h] 09 00426403 mov ecx,33h 10 00426408 mov eax,0CCCCCCCCh 11 0042640D rep stos dword ptr [edi] 12 0042640F pop ecx 13 00426410 mov dword ptr [ebp-8],ecx 14 00426413 mov eax,dword ptr [ebp-8] 15 00426416 mov byte ptr [eax+4],2 16 0042641A pop edi 17 0042641B pop esi 18 0042641C pop ebx 19 0042641D mov esp,ebp 20 0042641F pop ebp 21 00426420 ret |
01 004230F6 mov eax,dword ptr [ebp+FFFFF900h] 02 004230FC mov edx,dword ptr [eax] 03 004230FE mov esi,esp 04 00423100 mov ecx,dword ptr [ebp+FFFFF900h] 05 00423106 call dword ptr [edx] |
C051 obj; C041 * pt1 = dynamic_cast<C041*>(&obj); C042 * pt2 = dynamic_cast<C042*>(&obj); pt1->foo(); pt2->foo2(); |
00404B59 lea eax,[ebp+FFFFF8ECh] 00404B5F mov dword ptr [ebp+FFFFF8E0h],eax |
01 00404B65 lea eax,[ebp+FFFFF8ECh] 02 00404B6B test eax,eax 03 00404B6D je 00404B7D 04 00404B6F lea ecx,[ebp+FFFFF8F1h] 05 00404B75 mov dword ptr [ebp+FFFFF04Ch],ecx 06 00404B7B jmp 00404B87 07 00404B7D mov dword ptr [ebp+FFFFF04Ch],0 08 00404B87 mov edx,dword ptr [ebp+FFFFF04Ch] 09 00404B8D mov dword ptr [ebp+FFFFF8D4h],edx |
lea eax, [ebp+FFFFF8F1h] mov dword ptr [ebp+FFFFF8d4h], eax |
01 00404B93 mov eax,dword ptr [ebp+FFFFF8E0h] 02 00404B99 mov edx,dword ptr [eax] 03 00404B9B mov esi,esp 04 00404B9D mov ecx,dword ptr [ebp+FFFFF8E0h] 05 00404BA3 call dword ptr [edx] 06 00404BA5 cmp esi,esp 07 00404BA7 call 0041DDDE 08 00404BAC mov eax,dword ptr [ebp+FFFFF8D4h] 09 00404BB2 mov edx,dword ptr [eax] 10 00404BB4 mov esi,esp 11 00404BB6 mov ecx,dword ptr [ebp+FFFFF8D4h] 12 00404BBC call dword ptr [edx] 13 00404BBE cmp esi,esp 14 00404BC0 call 0041DDDE |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者