Changeset 75 in dev for BasicCompiler_Common/Debug.cpp


Ignore:
Timestamp:
Mar 20, 2007, 4:36:16 AM (17 years ago)
Author:
dai_9181
Message:

TYPEINFO→Typeへのリファクタリングを実施。64bitはほぼ完了。32bitが全般的に未完成。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler_Common/Debug.cpp

    r73 r75  
    224224    SendDlgItemMessage(hMainDlg,IDC_DEBUGLIST,EM_REPLACESEL,0,(LPARAM)buffer);
    225225}
    226 SubInfo *GetSubFromObp(ULONG_PTR pos){
    227     extern SubInfo **ppSubHash;
    228     SubInfo *psi;
     226UserProc *GetSubFromObp(ULONG_PTR pos){
     227    extern UserProc **ppSubHash;
     228    UserProc *pUserProc;
    229229    int i2;
    230230
    231231    for(i2=0;i2<MAX_HASH;i2++){
    232         psi=ppSubHash[i2];
    233         while(psi){
    234             if(rva_to_real(psi->CompileAddress) <= pos  &&
    235                 pos < rva_to_real(psi->EndOpAddr))
    236                 return psi;
    237 
    238             psi=psi->pNextData;
     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;
    239239        }
    240240    }
     
    447447    pobj_dti=new CDebugThreadInfo();
    448448
    449     SubInfo *psi;
     449    UserProc *pUserProc;
    450450
    451451    extern DWORD dwStepRun;
     
    681681                        if(!bRet) MessageBox(hMainDlg,"プロセスメモリーの読み込みに失敗","error",MB_OK);
    682682
    683                         extern SubInfo *pSub_DebugSys_EndProc;
     683                        extern UserProc *pSub_DebugSys_EndProc;
    684684                        if((BYTE)temporary[0]==0xE8&&
    685                             *((long *)(temporary+1))+5==(long)rva_to_real(pSub_DebugSys_EndProc->CompileAddress)-(long)EIP_RIP(Context)){
     685                            *((long *)(temporary+1))+5==(long)rva_to_real(pSub_DebugSys_EndProc->beginOpAddress)-(long)EIP_RIP(Context)){
    686686                            //プロシージャの終端位置の場合はステップインを行う
    687687                            goto StepIn;
     
    700700                        else{
    701701                            //プロシージャを識別
    702                             psi=GetSubFromObp(pobj_dti->lplpObp[pobj_dti->iProcLevel]);
     702                            pUserProc=GetSubFromObp(pobj_dti->lplpObp[pobj_dti->iProcLevel]);
    703703
    704704                            //シングルステップON
    705705                            WriteProcessMemory(hDebugProcess,
    706                                 (void *)rva_to_real(psi->CompileAddress),
    707                                 pobj_DBDebugSection->pobj_now->SingleStepCodeBuffer+psi->CompileAddress,
    708                                 psi->EndOpAddr-psi->CompileAddress,
     706                                (void *)rva_to_real(pUserProc->beginOpAddress),
     707                                pobj_DBDebugSection->pobj_now->SingleStepCodeBuffer+pUserProc->beginOpAddress,
     708                                pUserProc->endOpAddress-pUserProc->beginOpAddress,
    709709                                &lpAccBytes);
    710710                        }
Note: See TracChangeset for help on using the changeset viewer.