Changeset 140 in dev for BasicCompiler_Common/VarList.cpp
- Timestamp:
- Jun 15, 2007, 4:00:25 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/VarList.cpp
r137 r140 155 155 } 156 156 void VarList_Member(HWND hVarTree,HTREEITEM hParent,LONG_PTR pTopOffset,const CClass &objClass,BOOL bPtr){ 157 int i;158 157 char VarData[VN_SIZE],VarName[VN_SIZE]; 159 158 TV_INSERTSTRUCT tv; … … 165 164 tv.item.pszText=VarData; 166 165 167 for(i=0;i<objClass.iMemberNum;i++){166 BOOST_FOREACH( CMember *pMember, objClass.GetDynamicMembers() ){ 168 167 if(bPtr){ 169 168 lstrcpy(VarName,"->"); 170 lstrcat(VarName, objClass.ppobj_Member[i]->GetName().c_str());169 lstrcat(VarName,pMember->GetName().c_str()); 171 170 } 172 171 else{ 173 172 lstrcpy(VarName,"."); 174 lstrcat(VarName, objClass.ppobj_Member[i]->GetName().c_str());173 lstrcat(VarName,pMember->GetName().c_str()); 175 174 } 176 175 177 176 LONG_PTR offset; 178 177 int i2; 179 offset=objClass.GetMemberOffset( objClass.ppobj_Member[i]->GetName().c_str(), &i2 );180 181 if( objClass.ppobj_Member[i]->SubScripts[0]!=-1){178 offset=objClass.GetMemberOffset( pMember->GetName().c_str(), &i2 ); 179 180 if(pMember->SubScripts[0]!=-1){ 182 181 //構造体内の配列 183 182 sprintf(VarData,"%s %s(&H%X)",VarName,STRING_ARRAY,pTopOffset+offset); … … 188 187 VarList_Array(hVarTree,hParent, 189 188 pTopOffset+offset, 190 objClass.ppobj_Member[i]->GetType(),191 objClass.ppobj_Member[i]->SubScripts);189 pMember->GetType(), 190 pMember->SubScripts); 192 191 } 193 192 else{ … … 196 195 &tv, 197 196 VarName, 198 objClass.ppobj_Member[i]->GetType(),197 pMember->GetType(), 199 198 pTopOffset+offset); 200 199 } … … 323 322 } 324 323 void RefreshLocalVar(void){ 325 int i ,i2,i3,sw;324 int i2,i3,sw; 326 325 char temporary[VN_SIZE]; 327 326 TV_INSERTSTRUCT tv; … … 415 414 //Thisポインタを取得 416 415 LONG_PTR pThis; 417 const Variable *pVar = pUserProc->localVars.Find( "_System_LocalThis");416 const Variable *pVar = pUserProc->localVars.Find( Symbol( "_System_LocalThis" ) ); 418 417 if( !pVar ){ 419 418 return; … … 422 421 ReadProcessMemory(hDebugProcess,(void *)lpData,&pThis,sizeof(LONG_PTR),&accessBytes); 423 422 424 for(i=0;i<pUserProc->GetParentClassPtr()->iMemberNum;i++){425 offset=pUserProc->GetParentClassPtr()->GetMemberOffset( p UserProc->GetParentClassPtr()->ppobj_Member[i]->GetName().c_str(),&i2);426 427 if(p UserProc->GetParentClassPtr()->ppobj_Member[i]->SubScripts[0]!=-1){423 BOOST_FOREACH( CMember *pMember, pUserProc->GetParentClassPtr()->GetDynamicMembers() ){ 424 offset=pUserProc->GetParentClassPtr()->GetMemberOffset( pMember->GetName().c_str(),&i2); 425 426 if(pMember->SubScripts[0]!=-1){ 428 427 //配列 429 428 sprintf(temporary,"%s %s(&H%X)", 430 p UserProc->GetParentClassPtr()->ppobj_Member[i]->GetName().c_str(),429 pMember->GetName().c_str(), 431 430 STRING_ARRAY, 432 431 (ULONG_PTR)offset); … … 437 436 VarList_Array(hVarTree_This,hParent, 438 437 pThis+offset, 439 p UserProc->GetParentClassPtr()->ppobj_Member[i]->GetType(),440 p UserProc->GetParentClassPtr()->ppobj_Member[i]->SubScripts);438 pMember->GetType(), 439 pMember->SubScripts); 441 440 } 442 441 else{ 443 442 VarList_Insert(hVarTree_This,&tv, 444 p UserProc->GetParentClassPtr()->ppobj_Member[i]->GetName().c_str(),445 p UserProc->GetParentClassPtr()->ppobj_Member[i]->GetType(),443 pMember->GetName().c_str(), 444 pMember->GetType(), 446 445 pThis+offset); 447 446 }
Note:
See TracChangeset
for help on using the changeset viewer.