struct C040 { virtual void foo() {} }; |
PRINT_SIZE_DETAIL(C040) |
The size of C040 is 4 The detail of C040 is 40 b4 45 00 |
struct C050 : C040 {}; |
PRINT_SIZE_DETAIL(C050) |
The size of C050 is 4 The detail of C050 is 44 b4 45 00 |
C040 obj1, obj2; PRINT_VTABLE_ITEM(obj1, 0, 0) PRINT_VTABLE_ITEM(obj2, 0, 0) |
obj1 : objadr:0012FDC4 vpadr:0012FDC4 vtadr:0045B440 vtival(0):0041D834 obj2 : objadr:0012FDB8 vpadr:0012FDB8 vtadr:0045B440 vtival(0):0041D834 |
(注:第一列为对象名,第二列(objadr)为对象的内存地址,第三列(vpadr)为虚表指针地址,第四列(vtadr)为虚表的地址,第五列(vtival(n))为虚表中的条目的值,n为条目的索引,从0开始。后同)