Changeset 206 in dev for trunk/abdev/BasicCompiler_Common/Debug.cpp
- Timestamp:
- Jul 12, 2007, 2:58:26 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/Debug.cpp
r165 r206 1 #include "stdafx.h" 2 3 #include <Compiler.h> 4 1 5 #include "../BasicCompiler_Common/common.h" 6 #include "../BasicCompiler_Common/DebugSection.h" 2 7 3 8 //デバッグ用 … … 224 229 SendDlgItemMessage(hMainDlg,IDC_DEBUGLIST,EM_REPLACESEL,0,(LPARAM)buffer); 225 230 } 226 GlobalProc *GetSubFromObp(ULONG_PTR pos){ 227 extern GlobalProc **ppSubHash; 228 GlobalProc *pUserProc; 229 int i2; 230 231 for(i2=0;i2<MAX_HASH;i2++){ 232 pUserProc=ppSubHash[i2]; 233 while(pUserProc){ 234 if(rva_to_real(pUserProc->beginOpAddress) <= pos && 235 pos < rva_to_real(pUserProc->endOpAddress)) 236 return pUserProc; 237 238 pUserProc=pUserProc->pNextData; 239 } 240 } 241 return 0; 231 UserProc *GetSubFromObp(ULONG_PTR pos){ 232 compiler.GetMeta().GetUserProcs().Iterator_Reset(); 233 while( compiler.GetMeta().GetUserProcs().Iterator_HasNext() ) 234 { 235 UserProc *pUserProc = compiler.GetMeta().GetUserProcs().Iterator_GetNext(); 236 237 if(rva_to_real(pUserProc->GetBeginOpAddress()) <= pos && 238 pos < rva_to_real(pUserProc->GetEndOpAddress())) 239 { 240 return pUserProc; 241 } 242 } 243 return NULL; 242 244 } 243 245 void ReleaseSingleStep(DWORD dwBeforeStepRun,HANDLE hThread,CONTEXT *pContext){ … … 447 449 pobj_dti=new CDebugThreadInfo(); 448 450 449 GlobalProc *pUserProc;451 UserProc *pUserProc; 450 452 451 453 extern DWORD dwStepRun; … … 681 683 if(!bRet) MessageBox(hMainDlg,"プロセスメモリーの読み込みに失敗","error",MB_OK); 682 684 683 extern UserProc *pSub_DebugSys_EndProc;685 extern const UserProc *pSub_DebugSys_EndProc; 684 686 if((BYTE)temporary[0]==0xE8&& 685 *((long *)(temporary+1))+5==(long)rva_to_real(pSub_DebugSys_EndProc-> beginOpAddress)-(long)EIP_RIP(Context)){687 *((long *)(temporary+1))+5==(long)rva_to_real(pSub_DebugSys_EndProc->GetBeginOpAddress())-(long)EIP_RIP(Context)){ 686 688 //プロシージャの終端位置の場合はステップインを行う 687 689 goto StepIn; … … 704 706 //シングルステップON 705 707 WriteProcessMemory(hDebugProcess, 706 (void *)rva_to_real(pUserProc-> beginOpAddress),707 pobj_DBDebugSection->pobj_now->SingleStepCodeBuffer+pUserProc-> beginOpAddress,708 pUserProc-> endOpAddress-pUserProc->beginOpAddress,708 (void *)rva_to_real(pUserProc->GetBeginOpAddress()), 709 pobj_DBDebugSection->pobj_now->SingleStepCodeBuffer+pUserProc->GetBeginOpAddress(), 710 pUserProc->GetEndOpAddress()-pUserProc->GetBeginOpAddress(), 709 711 &lpAccBytes); 710 712 }
Note:
See TracChangeset
for help on using the changeset viewer.