??????????????????????????????????飬????????????????з?????
????7                       this->x = x;
????0x080484fd <point+3>:   mov    eax??DWORD PTR [ebp+0x8]
????0x08048500 <point+6>:   mov    edx??DWORD PTR [ebp+0xc]
????0x08048503 <point+9>:   mov    DWORD PTR [eax]??edx
????mov    eax??DWORD PTR [ebp+0x8] ???????????????????????????eax??
????mov    edx??DWORD PTR [ebp+0xc] ???????????????????????????edx??
????mov    DWORD PTR [eax]??edx        ??edx????????д??eax???????????
???????this->x = x?????C++???????????????point???????????????????????????????????????
????_ZN5pointC1Eii???ú??????????????this???????point????沼???????????????????struct point *?????????????int?????x??
????????????this->y = y????????????????this->x = x; ??????????Ψ??x??y??point??????????????????
????????ó???x?????point??????????????0????y???4??
?????????????????
????9                       ins_cnt++;
????0x0804850e <point+20>:  mov    eax??ds:0x804a01c
????0x08048513 <point+25>:  add    eax??0x1
????0x08048516 <point+28>:  mov    ds:0x804a01c??eax
?????????mov??????0x804a01c???????eax?У?add??????eax??1???????mov???eax????д???????С??????0x804a01c??????????????????????point???????ins_cnt??????
??????????????????point??????????????????£?
????struct point {
????int x;
????int y;
????};
????// point::ins_cnt ?????????????????????????????
????int point_ins_cnt = 0;
?????????????????????£?
????void point::point(struct point *this?? int x?? int y)
????{
????this->x = x;
????this->y = y;
????point_ins_cnt++;
????}
????????????????????????C++??????????????д????? ???? ??????????????????????????????????this?????????????????????C++???????????this??????????????????£?????ж??????????
??????????move????????????????????в?????????????????£?

 

(gdb) disassemble /m _ZN5point4moveEii
Dump of assembler code for function _ZN5point4moveEii:
22              point & move(int addx?? int addy)
0x0804853a <_ZN5point4moveEii+0>:       push   ebp
0x0804853b <_ZN5point4moveEii+1>:       mov    ebp??esp
23              {
24                      this->x += addx;
0x0804853d <_ZN5point4moveEii+3>:       mov    eax??DWORD PTR [ebp+0x8]
0x08048540 <_ZN5point4moveEii+6>:       mov    eax??DWORD PTR [eax]
0x08048542 <_ZN5point4moveEii+8>:       mov    edx??eax
0x08048544 <_ZN5point4moveEii+10>:      add    edx??DWORD PTR [ebp+0xc]
0x08048547 <_ZN5point4moveEii+13>:      mov    eax??DWORD PTR [ebp+0x8]
0x0804854a <_ZN5point4moveEii+16>:      mov    DWORD PTR [eax]??edx
25                      this->y += addy;
0x0804854c <_ZN5point4moveEii+18>:      mov    eax??DWORD PTR [ebp+0x8]
0x0804854f <_ZN5point4moveEii+21>:      mov    eax??DWORD PTR [eax+0x4]
0x08048552 <_ZN5point4moveEii+24>:      mov    edx??eax
0x08048554 <_ZN5point4moveEii+26>:      add    edx??DWORD PTR [ebp+0x10]
0x08048557 <_ZN5point4moveEii+29>:      mov    eax??DWORD PTR [ebp+0x8]
0x0804855a <_ZN5point4moveEii+32>:      mov    DWORD PTR [eax+0x4]??edx
26
27                      return *this;
0x0804855d <_ZN5point4moveEii+35>:      mov    eax??DWORD PTR [ebp+0x8]
28              }
0x08048560 <_ZN5point4moveEii+38>:      pop    ebp
0x08048561 <_ZN5point4moveEii+39>:      ret
End of assembler dump.