??????????????C++??????????
???????????? ???????[ 2014/7/2 11:24:38 ] ????????Net ???????
????6. ??????????
?????????t???????????????÷?????????????????????÷??????????????????????????????????????this??????C++?????????????????????????????????????????????????????????????????????????κ??????????????<class-name>::<member>????????????????????????this???
????????point::get_instances()??????????????
(gdb)disassemble/m_ZN5point13get_instancesEv
Dumpofassemblercodeforfunction_ZN5point13get_instancesEv:
17staticintget_instances()
0x08048530<_ZN5point13get_instancesEv+0>:pushebp
0x08048531<_ZN5point13get_instancesEv+1>:movebp??esp
18{
19returnins_cnt;
0x08048533<_ZN5point13get_instancesEv+3>:moveax??ds:0x804a01c
20}
0x08048538<_ZN5point13get_instancesEv+8>:popebp
0x08048539<_ZN5point13get_instancesEv+9>:ret
Endofassemblerdump.
|
????????????????д??????????κβ???????????????????ú???????д?????????????????????void????????????????ú???????????????????main?????????????????
????39 x.move(10?? 10);
????0x080484ba <main+38>: mov DWORD PTR [esp+0x8]??0xa
????0x080484c2 <main+46>: mov DWORD PTR [esp+0x4]??0xa
????0x080484ca <main+54>: lea eax??[esp+0x14]
????0x080484ce <main+58>: mov DWORD PTR [esp]??eax
????0x080484d1 <main+61>: call 0x804853a <_ZN5point4moveEii>
????40
????41 int p_ins_cnt = point::get_instances();
????0x080484d6 <main+66>: call 0x8048530 <_ZN5point13get_instancesEv>
????0x080484db <main+71>: mov DWORD PTR [esp+0x1c]??eax
??????x.move(10?? 10)????????????????????mov …?? 0xa??????10??????У????_ZN5point4moveEii???????????????????????????????this????
??????x.move(10?? 10) ?????????????call _ZN5point13get_instancesEv?????_ZN5point13get_instancesEv?????????κβ?????
???????point::get_instances()?????????C?????????????£?
????[cpp] view plaincopyprint?
????int point::get_instances(void)
????{
????return point_ins_cnt;
????}
????7. ???
??????????C++?麯??????е?????????C++??????????沼??????????????????????
????1??class??????????????????????????????棬???????????????????????嶨????????????
????2) class??????????????????????????????????е????????????????????????????????б?????g++??????????????????0????????????.bss????????.data??????
????3??????????????????????????棬????C++???????????????????????????????????????this??????????????????????????????????
????4) ??????????????????????????棬????C++???????????????????????????????this?????????????????????????????????
????8. ???????????
???????????????????????????C++??????????沼?????????????????????????У??????????????????????const?????????????????????????const??????????????????????????????const???????????????????????????????????????????????
????39 x.move(10?? 10);
????0x080484ba <main+38>: mov DWORD PTR [esp+0x8]??0xa
????0x080484c2 <main+46>: mov DWORD PTR [esp+0x4]??0xa
????0x080484ca <main+54>: lea eax??[esp+0x14]
????0x080484ce <main+58>: mov DWORD PTR [esp]??eax
????0x080484d1 <main+61>: call 0x804853a <_ZN5point4moveEii>
????40
????41 int p_ins_cnt = point::get_instances();
????0x080484d6 <main+66>: call 0x8048530 <_ZN5point13get_instancesEv>
????0x080484db <main+71>: mov DWORD PTR [esp+0x1c]??eax
??????x.move(10?? 10)????????????????????mov …?? 0xa??????10??????У????_ZN5point4moveEii???????????????????????????????this????
??????x.move(10?? 10) ?????????????call _ZN5point13get_instancesEv?????_ZN5point13get_instancesEv?????????κβ?????
???????point::get_instances()?????????C?????????????£?
????[cpp] view plaincopyprint?
????int point::get_instances(void)
????{
????return point_ins_cnt;
????}
????7. ???
??????????C++?麯??????е?????????C++??????????沼??????????????????????
????1??class??????????????????????????????棬???????????????????????嶨????????????
????2) class??????????????????????????????????е????????????????????????????????б?????g++??????????????????0????????????.bss????????.data??????
????3??????????????????????????棬????C++???????????????????????????????????????this??????????????????????????????????
????4) ??????????????????????????棬????C++???????????????????????????????this?????????????????????????????????
????8. ???????????
???????????????????????????C++??????????沼?????????????????????????У??????????????????????const?????????????????????????const??????????????????????????????const???????????????????????????????????????????????
???????????????????????漰???????????????????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 ??????