Changeset 75 in dev for BasicCompiler32/VarList.cpp
- Timestamp:
- Mar 20, 2007, 4:36:16 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/VarList.cpp
r73 r75 348 348 if(pobj_dti->lplpSpBase[i2]==0) return; 349 349 350 extern SubInfo**ppSubHash;351 SubInfo *psi;350 extern UserProc **ppSubHash; 351 UserProc *pUserProc; 352 352 for(i3=0,sw=0;i3<MAX_HASH;i3++){ 353 p si=ppSubHash[i3];354 while(p si){355 if(rva_to_real(p si->CompileAddress) <= pobj_dti->lplpObp[i2] &&356 pobj_dti->lplpObp[i2] < rva_to_real(p si->EndOpAddr)){353 pUserProc=ppSubHash[i3]; 354 while(pUserProc){ 355 if(rva_to_real(pUserProc->beginOpAddress) <= pobj_dti->lplpObp[i2] && 356 pobj_dti->lplpObp[i2] < rva_to_real(pUserProc->endOpAddress)){ 357 357 sw=1; 358 358 break; 359 359 } 360 360 361 p si=psi->pNextData;361 pUserProc=pUserProc->pNextData; 362 362 } 363 363 if(sw) break; 364 364 } 365 if(!p si) return;366 367 for(i=0;i<p si->VarNum;i++){368 VARIABLE *pVar=&p si->pVar[i];365 if(!pUserProc) return; 366 367 for(i=0;i<pUserProc->VarNum;i++){ 368 VARIABLE *pVar=&pUserProc->pVar[i]; 369 369 370 370 //スコープ外の場合は無視 … … 416 416 417 417 TreeView_DeleteAllItems(hVarTree_This); 418 if(!p si->pobj_ParentClass) return;418 if(!pUserProc->GetParentClassPtr()) return; 419 419 420 420 //Thisポインタを取得 421 421 LONG_PTR pThis; 422 for(i=0;i<p si->VarNum;i++){423 if(lstrcmp(p si->pVar[i].name,"_System_LocalThis")==0) break;424 } 425 if(i==p si->VarNum) return;426 lpData=pobj_dti->lplpSpBase[i2]+p si->pVar[i].offset;422 for(i=0;i<pUserProc->VarNum;i++){ 423 if(lstrcmp(pUserProc->pVar[i].name,"_System_LocalThis")==0) break; 424 } 425 if(i==pUserProc->VarNum) return; 426 lpData=pobj_dti->lplpSpBase[i2]+pUserProc->pVar[i].offset; 427 427 ReadProcessMemory(hDebugProcess,(void *)lpData,&pThis,sizeof(LONG_PTR),&lpAccBytes); 428 428 429 for(i=0;i<p si->pobj_ParentClass->iMemberNum;i++){430 offset = p si->pobj_ParentClass->GetMemberOffset( psi->pobj_ParentClass->ppobj_Member[i]->name, &i2 );431 432 if(p si->pobj_ParentClass->ppobj_Member[i]->SubScripts[0]!=-1){429 for(i=0;i<pUserProc->GetParentClassPtr()->iMemberNum;i++){ 430 offset = pUserProc->GetParentClassPtr()->GetMemberOffset( pUserProc->GetParentClassPtr()->ppobj_Member[i]->name, &i2 ); 431 432 if(pUserProc->GetParentClassPtr()->ppobj_Member[i]->SubScripts[0]!=-1){ 433 433 //配列 434 434 sprintf(temporary,"%s %s(&H%X)", 435 p si->pobj_ParentClass->ppobj_Member[i]->name,435 pUserProc->GetParentClassPtr()->ppobj_Member[i]->name, 436 436 STRING_ARRAY, 437 437 offset); … … 442 442 VarList_Array(hVarTree_This,hParent, 443 443 pThis+offset, 444 p si->pobj_ParentClass->ppobj_Member[i]->TypeInfo.type,445 p si->pobj_ParentClass->ppobj_Member[i]->SubScripts,446 p si->pobj_ParentClass->ppobj_Member[i]->TypeInfo.u.lpIndex);444 pUserProc->GetParentClassPtr()->ppobj_Member[i]->TypeInfo.type, 445 pUserProc->GetParentClassPtr()->ppobj_Member[i]->SubScripts, 446 pUserProc->GetParentClassPtr()->ppobj_Member[i]->TypeInfo.u.lpIndex); 447 447 } 448 448 else{ 449 449 VarList_Insert(hVarTree_This,&tv, 450 p si->pobj_ParentClass->ppobj_Member[i]->name,451 p si->pobj_ParentClass->ppobj_Member[i]->TypeInfo.type,450 pUserProc->GetParentClassPtr()->ppobj_Member[i]->name, 451 pUserProc->GetParentClassPtr()->ppobj_Member[i]->TypeInfo.type, 452 452 pThis+offset, 453 p si->pobj_ParentClass->ppobj_Member[i]->TypeInfo.u.lpIndex);453 pUserProc->GetParentClassPtr()->ppobj_Member[i]->TypeInfo.u.lpIndex); 454 454 } 455 455 } … … 583 583 584 584 //プロシージャ コンボボックス 585 extern SubInfo**ppSubHash;586 SubInfo *psi;585 extern UserProc **ppSubHash; 586 UserProc *pUserProc; 587 587 int sw; 588 588 SendMessage(hProcCombo,CB_RESETCONTENT,0,0); 589 589 for(i2=pobj_dti->iProcLevel;i2>=0;i2--){ 590 590 for(i3=0,sw=0;i3<MAX_HASH;i3++){ 591 p si=ppSubHash[i3];592 while(p si){593 if(rva_to_real(p si->CompileAddress) <= pobj_dti->lplpObp[i2] &&594 pobj_dti->lplpObp[i2] < rva_to_real(p si->EndOpAddr)){595 lstrcpy(temporary,p si->name);591 pUserProc=ppSubHash[i3]; 592 while(pUserProc){ 593 if(rva_to_real(pUserProc->beginOpAddress) <= pobj_dti->lplpObp[i2] && 594 pobj_dti->lplpObp[i2] < rva_to_real(pUserProc->endOpAddress)){ 595 lstrcpy(temporary,pUserProc->GetName().c_str()); 596 596 sw=1; 597 597 break; 598 598 } 599 p si=psi->pNextData;599 pUserProc=pUserProc->pNextData; 600 600 } 601 601 if(sw) break; 602 602 } 603 if(!p si){603 if(!pUserProc){ 604 604 if(i2==0){ 605 605 lstrcpy(temporary,"Global"); … … 706 706 707 707 if(pobj_dti->lplpSpBase[i2]){ 708 extern SubInfo**ppSubHash;709 SubInfo *psi;708 extern UserProc **ppSubHash; 709 UserProc *pUserProc; 710 710 for(i3=0,sw=0;i3<MAX_HASH;i3++){ 711 p si=ppSubHash[i3];712 while(p si){713 if(rva_to_real(p si->CompileAddress) <= pobj_dti->lplpObp[i2] &&714 pobj_dti->lplpObp[i2] < rva_to_real(p si->EndOpAddr)){711 pUserProc=ppSubHash[i3]; 712 while(pUserProc){ 713 if(rva_to_real(pUserProc->beginOpAddress) <= pobj_dti->lplpObp[i2] && 714 pobj_dti->lplpObp[i2] < rva_to_real(pUserProc->endOpAddress)){ 715 715 sw=1; 716 716 break; 717 717 } 718 718 719 p si=psi->pNextData;719 pUserProc=pUserProc->pNextData; 720 720 } 721 721 if(sw) break; … … 723 723 724 724 725 if(p si){726 LocalVar=p si->pVar;727 MaxLocalVarNum=p si->VarNum;728 729 pobj_CompilingClass=p si->pobj_ParentClass;725 if(pUserProc){ 726 LocalVar=pUserProc->pVar; 727 MaxLocalVarNum=pUserProc->VarNum; 728 729 pobj_CompilingClass=pUserProc->GetParentClassPtr(); 730 730 } 731 731 }
Note:
See TracChangeset
for help on using the changeset viewer.