??????????????C++?麯??
????????? ???????[ 2017/1/4 11:19:55 ] ?????????麯?? ??????
????4. ??????????????????
???????????????????ú??vtable???????????????????ж??????vtable??????????????????????????????main????????????????????C++???????vtable???????????????
.globl main
.type main?? @function
main:
.LFB3:
.cfi_startproc
.cfi_personality 0x0??__gxx_personality_v0
pushl %ebp
.cfi_def_cfa_offset 8
movl %esp?? %ebp
.cfi_offset 5?? -8
.cfi_def_cfa_register 5
andl $-16?? %esp
subl $32?? %esp
leal 24(%esp)?? %eax
movl %eax?? (%esp)
call _ZN6DeriveC1Ev
leal 24(%esp)?? %eax
movl %eax?? 28(%esp)
movl 28(%esp)?? %eax
movl (%eax)?? %eax
movl (%eax)?? %edx
movl 28(%esp)?? %eax
movl %eax?? (%esp)
call *%edx
movl $0?? %eax
leave
ret
.cfi_endproc
andl $-16?? %esp
subl $32?? %esp
????????????????????d??bp?????????????????μ????
????Derive d;
????Base *pb;
????leal 24(%esp)?? %eax
????movl %eax?? (%esp)
????call _ZN6DeriveC1Ev
????esp+24?????d????????????????????????????d?????????????????C?????????£?
????Derive::Dervice(&d);
????leal 24(%esp)?? %eax
????movl %eax?? 28(%esp)
??????????????&d???????pb???????
????pb = &d;
??????????????????????Σ?
????movl 28(%esp)?? %eax
????movl (%eax)?? %eax
????movl (%eax)?? %edx
????movl 28(%esp)?? %eax
????movl %eax?? (%esp)
????call *%edx
?????????C?????????????
????pb->vtable[0](bp);
??????????????f?麯??????vtable???0???????????????
????5. С??
?????????????????????????C++????δ???????????????????????????????????????????????????
????1.??????и??е?vtable??????????????д??????麯????
????2. ??????????????????vtable????????麯????
????3.??????????????????麯?????????object->vtable?????麯????offset???????
??????????????g++?????????????VC++?????в?????????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
??C++????????????C++ lvalue??rvalueC++11????????C++???????????????C++?е?????????????????C++?????????C++???Windows????λ??C/C++???????????????????JAVA??C??C++??????????c++??python???????????????????????????????C++???????C++?е????????C++????????????????C++ ???????????????C++?????????????????????C++????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????