Changeset 259 in dev for trunk/abdev
- Timestamp:
- Aug 3, 2007, 3:24:22 AM (17 years ago)
- Location:
- trunk/abdev
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/Compile_Object.cpp
r253 r259 16 16 //をセットしておかなければならない 17 17 18 //jnzのジャンプ先番地18 /* //jnzのジャンプ先番地 19 19 extern int obp; 20 int jnz_back = obp; 20 int jnz_back = obp;*/ 21 21 22 22 if(bSomeObjects){ … … 24 24 25 25 //push ebx 26 compiler.codeGenerator.op_push(REG_EBX);26 //compiler.codeGenerator.op_push(REG_EBX); 27 27 } 28 28 … … 78 78 79 79 if(bSomeObjects){ 80 /* 80 81 //pop ebx 81 82 compiler.codeGenerator.op_pop(REG_EBX); … … 89 90 //jne ↑ 90 91 compiler.codeGenerator.op_jne( jnz_back-obp, sizeof(long), false, true ); 92 */ 91 93 } 92 94 } … … 261 263 262 264 //jnzの番地 263 extern int obp;264 int jnz_back = obp; 265 /*extern int obp; 266 int jnz_back = obp;*/ 265 267 266 268 //push ecx … … 289 291 290 292 //jne ↑ 291 compiler.codeGenerator.op_jne( jnz_back-obp, sizeof(long), false, true );293 //compiler.codeGenerator.op_jne( jnz_back-obp, sizeof(long), false, true ); 292 294 293 295 -
trunk/abdev/BasicCompiler32/Compile_ProcOp.cpp
r256 r259 264 264 265 265 extern int obp; 266 pUserProc-> SetBeginOpAddress( obp );266 pUserProc->_beginOpAddressOld = obp; 267 267 268 268 //コンパイル中の関数が属するクラス … … 294 294 SystemProc(*pUserProc); 295 295 296 pUserProc-> SetEndOpAddress( obp );296 pUserProc->_endOpAddressOld = obp; 297 297 return; 298 298 } … … 737 737 738 738 739 pUserProc-> SetEndOpAddress( obp );739 pUserProc->_endOpAddressOld = obp; 740 740 741 741 -
trunk/abdev/BasicCompiler32/MakePeHdr.cpp
r258 r259 554 554 vector<ObjectModule *> masterObjectModules; 555 555 masterObjectModules.push_back( &compiler.objectModule ); 556 //compiler.linker.Link( masterObjectModules );556 compiler.linker.Link( masterObjectModules ); 557 557 558 558 … … 704 704 705 705 if( pUserProc->GetName() == "DllMain" ){ 706 DllMain_EntryPoint=pUserProc-> GetBeginOpAddress();706 DllMain_EntryPoint=pUserProc->_beginOpAddressOld; 707 707 } 708 708 709 709 lpdwExportAddressTable=(DWORD *)HeapReAlloc(hHeap,0,lpdwExportAddressTable,(ExportNum+1)*sizeof(DWORD)); 710 lpdwExportAddressTable[ExportNum]=pUserProc-> GetBeginOpAddress();710 lpdwExportAddressTable[ExportNum]=pUserProc->_beginOpAddressOld; 711 711 712 712 lpdwExportNamePointerTable=(DWORD *)HeapReAlloc(hHeap,0,lpdwExportNamePointerTable,(ExportNum+1)*sizeof(DWORD)); … … 1177 1177 // プロシージャポインタスケジュール 1178 1178 for(i=0;i<pobj_SubAddrSchedule->num;i++){ 1179 if(pobj_SubAddrSchedule->ppsi[i]-> GetBeginOpAddress()==01180 &&pobj_SubAddrSchedule->ppsi[i]-> GetEndOpAddress()==0){1179 if(pobj_SubAddrSchedule->ppsi[i]->_beginOpAddressOld==0 1180 &&pobj_SubAddrSchedule->ppsi[i]->_endOpAddressOld==0){ 1181 1181 SetError(300,NULL,-1); 1182 1182 } … … 1184 1184 if(pobj_SubAddrSchedule->pbCall[i]){ 1185 1185 *((long *)(OpBuffer+pobj_SubAddrSchedule->pObpValues[i]))= 1186 pobj_SubAddrSchedule->ppsi[i]-> GetBeginOpAddress()-(pobj_SubAddrSchedule->pObpValues[i]+sizeof(long));1186 pobj_SubAddrSchedule->ppsi[i]->_beginOpAddressOld-(pobj_SubAddrSchedule->pObpValues[i]+sizeof(long)); 1187 1187 } 1188 1188 else{ 1189 1189 *((long *)(OpBuffer+pobj_SubAddrSchedule->pObpValues[i]))= 1190 pobj_SubAddrSchedule->ppsi[i]-> GetBeginOpAddress()+ImageBase+MemPos_CodeSection;1190 pobj_SubAddrSchedule->ppsi[i]->_beginOpAddressOld+ImageBase+MemPos_CodeSection; 1191 1191 } 1192 1192 } -
trunk/abdev/BasicCompiler32/NumOpe.cpp
r256 r259 677 677 //リテラル値のみの計算かどうかを判別するためのフラグ 678 678 BOOL bLiteralCalculation=1; 679 680 //リテラル演算の場合を考慮した演算前のバッファ位置681 extern int obp;682 int BeforeObp = obp;683 679 684 680 //リテラル演算の場合を考慮した演算前のプロシージャスケジュール位置 -
trunk/abdev/BasicCompiler64/Compile_ProcOp.cpp
r257 r259 184 184 else bDebugSupportProc=0; 185 185 186 pUserProc-> SetBeginOpAddress( obp );186 pUserProc->_beginOpAddressOld = obp; 187 187 188 188 //コンパイル中の関数が属するクラス … … 222 222 pobj_sf=0; 223 223 224 pUserProc-> SetEndOpAddress( obp );224 pUserProc->_endOpAddressOld = obp; 225 225 return; 226 226 } -
trunk/abdev/BasicCompiler64/MakePeHdr.cpp
r257 r259 624 624 625 625 if( pUserProc->GetName() == "DllMain" ){ 626 DllMain_EntryPoint=pUserProc-> GetBeginOpAddress();626 DllMain_EntryPoint=pUserProc->_beginOpAddressOld; 627 627 } 628 628 629 629 lpdwExportAddressTable=(DWORD *)HeapReAlloc(hHeap,0,lpdwExportAddressTable,(ExportNum+1)*sizeof(DWORD)); 630 lpdwExportAddressTable[ExportNum]=pUserProc-> GetBeginOpAddress();630 lpdwExportAddressTable[ExportNum]=pUserProc->_beginOpAddressOld; 631 631 632 632 lpdwExportNamePointerTable=(DWORD *)HeapReAlloc(hHeap,0,lpdwExportNamePointerTable,(ExportNum+1)*sizeof(DWORD)); … … 1125 1125 // プロシージャポインタスケジュール 1126 1126 for(i=0;i<pobj_SubAddrSchedule->num;i++){ 1127 if(pobj_SubAddrSchedule->ppsi[i]-> GetBeginOpAddress()==01128 &&pobj_SubAddrSchedule->ppsi[i]-> GetEndOpAddress()==0){1127 if(pobj_SubAddrSchedule->ppsi[i]->_beginOpAddressOld==0 1128 &&pobj_SubAddrSchedule->ppsi[i]->_endOpAddressOld==0){ 1129 1129 SetError(300,NULL,-1); 1130 1130 } … … 1132 1132 if(pobj_SubAddrSchedule->pbCall[i]){ 1133 1133 *((long *)(OpBuffer+pobj_SubAddrSchedule->pObpValues[i]))= 1134 pobj_SubAddrSchedule->ppsi[i]-> GetBeginOpAddress()-(pobj_SubAddrSchedule->pObpValues[i]+sizeof(long));1134 pobj_SubAddrSchedule->ppsi[i]->_beginOpAddressOld-(pobj_SubAddrSchedule->pObpValues[i]+sizeof(long)); 1135 1135 } 1136 1136 else{ 1137 1137 *((long *)(OpBuffer+pobj_SubAddrSchedule->pObpValues[i]))= 1138 pobj_SubAddrSchedule->ppsi[i]-> GetBeginOpAddress()+ImageBase+MemPos_CodeSection;1138 pobj_SubAddrSchedule->ppsi[i]->_beginOpAddressOld+ImageBase+MemPos_CodeSection; 1139 1139 } 1140 1140 } -
trunk/abdev/BasicCompiler_Common/Debug.cpp
r256 r259 235 235 UserProc *pUserProc = compiler.objectModule.meta.GetUserProcs().Iterator_GetNext(); 236 236 237 if(rva_to_real(pUserProc-> GetBeginOpAddress()) <= pos &&238 pos < rva_to_real(pUserProc-> GetEndOpAddress()))237 if(rva_to_real(pUserProc->_beginOpAddressOld) <= pos && 238 pos < rva_to_real(pUserProc->_endOpAddressOld)) 239 239 { 240 240 return pUserProc; … … 694 694 extern const UserProc *pSub_DebugSys_EndProc; 695 695 if((BYTE)temporary[0]==0xE8&& 696 *((long *)(temporary+1))+5==(long)rva_to_real(pSub_DebugSys_EndProc-> GetBeginOpAddress())-(long)EIP_RIP(Context)){696 *((long *)(temporary+1))+5==(long)rva_to_real(pSub_DebugSys_EndProc->_beginOpAddressOld)-(long)EIP_RIP(Context)){ 697 697 //プロシージャの終端位置の場合はステップインを行う 698 698 goto StepIn; … … 715 715 //シングルステップON 716 716 WriteProcessMemory(hDebugProcess, 717 (void *)rva_to_real(pUserProc-> GetBeginOpAddress()),718 pobj_DBDebugSection->pobj_now->SingleStepCodeBuffer+pUserProc-> GetBeginOpAddress(),719 pUserProc-> GetEndOpAddress()-pUserProc->GetBeginOpAddress(),717 (void *)rva_to_real(pUserProc->_beginOpAddressOld), 718 pobj_DBDebugSection->pobj_now->SingleStepCodeBuffer+pUserProc->_beginOpAddressOld, 719 pUserProc->_endOpAddressOld-pUserProc->_beginOpAddressOld, 720 720 &lpAccBytes); 721 721 } -
trunk/abdev/BasicCompiler_Common/DebugMiddleFile.cpp
r256 r259 236 236 i2+=lstrlen(buffer+i2)+1; 237 237 238 *(long *)(buffer+i2)=pUserProc-> GetBeginOpAddress();239 i2+=sizeof(long); 240 *(long *)(buffer+i2)=pUserProc-> GetEndOpAddress();238 *(long *)(buffer+i2)=pUserProc->_beginOpAddressOld; 239 i2+=sizeof(long); 240 *(long *)(buffer+i2)=pUserProc->_endOpAddressOld; 241 241 i2+=sizeof(long); 242 242 … … 620 620 pUserProc->SetParentClass( pClass ); 621 621 622 pUserProc-> SetBeginOpAddress( *(long *)(buffer+i2));623 i2+=sizeof(long); 624 pUserProc-> SetEndOpAddress( *(long *)(buffer+i2));622 pUserProc->_beginOpAddressOld = *(long *)(buffer+i2); 623 i2+=sizeof(long); 624 pUserProc->_endOpAddressOld = *(long *)(buffer+i2); 625 625 i2+=sizeof(long); 626 626 -
trunk/abdev/BasicCompiler_Common/VarList.cpp
r256 r259 362 362 { 363 363 pUserProc = compiler.objectModule.meta.GetUserProcs().Iterator_GetNext(); 364 if(rva_to_real(pUserProc-> GetBeginOpAddress()) <= pobj_dti->lplpObp[i2] &&365 pobj_dti->lplpObp[i2] < rva_to_real(pUserProc-> GetEndOpAddress())){364 if(rva_to_real(pUserProc->_beginOpAddressOld) <= pobj_dti->lplpObp[i2] && 365 pobj_dti->lplpObp[i2] < rva_to_real(pUserProc->_endOpAddressOld)){ 366 366 break; 367 367 } … … 610 610 pUserProc = compiler.objectModule.meta.GetUserProcs().Iterator_GetNext(); 611 611 612 if(rva_to_real(pUserProc-> GetBeginOpAddress()) <= pobj_dti->lplpObp[i2] &&613 pobj_dti->lplpObp[i2] < rva_to_real(pUserProc-> GetEndOpAddress()))612 if(rva_to_real(pUserProc->_beginOpAddressOld) <= pobj_dti->lplpObp[i2] && 613 pobj_dti->lplpObp[i2] < rva_to_real(pUserProc->_endOpAddressOld)) 614 614 { 615 615 lstrcpy(temporary,pUserProc->GetName().c_str()); … … 723 723 pUserProc = compiler.objectModule.meta.GetUserProcs().Iterator_GetNext(); 724 724 725 if(rva_to_real(pUserProc-> GetBeginOpAddress()) <= pobj_dti->lplpObp[i2] &&726 pobj_dti->lplpObp[i2] < rva_to_real(pUserProc-> GetEndOpAddress())){725 if(rva_to_real(pUserProc->_beginOpAddressOld) <= pobj_dti->lplpObp[i2] && 726 pobj_dti->lplpObp[i2] < rva_to_real(pUserProc->_endOpAddressOld)){ 727 727 break; 728 728 } -
trunk/abdev/BasicCompiler_Common/include/Procedure.h
r257 r259 375 375 return *pCompilingUserProc; 376 376 } 377 378 379 380 mutable long _beginOpAddressOld; 381 mutable long _endOpAddressOld; 377 382 }; 378 383 -
trunk/abdev/BasicCompiler_Common/src/Class.cpp
r256 r259 737 737 pUserProc=(UserProc *)pVtbl[i]; 738 738 if(!pUserProc) continue; 739 pVtbl[i]=pUserProc-> GetBeginOpAddress()+ImageBase+MemPos_CodeSection;739 pVtbl[i]=pUserProc->_beginOpAddressOld+ImageBase+MemPos_CodeSection; 740 740 } 741 741 }
Note:
See TracChangeset
for help on using the changeset viewer.