Changeset 140 in dev for BasicCompiler_Common/WatchList.cpp
- Timestamp:
- Jun 15, 2007, 4:00:25 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/WatchList.cpp
r137 r140 104 104 105 105 int Debugging_GetMember( const CClass &objClass,char *member,RELATIVE_VAR *pRelativeVar, Type &resultType, BOOL bPrivateAccess){ 106 int i ,i2;106 int i2; 107 107 108 108 //直接参照に切り替え … … 124 124 //////////////////////////// 125 125 126 int offset = objClass.GetMemberOffset( VarName, &i ); 127 if(i==objClass.iMemberNum) return 0; 126 int memberIndex; 127 int offset = objClass.GetMemberOffset( VarName, &memberIndex ); 128 if(memberIndex==objClass.GetDynamicMembers().size()) return 0; 129 130 CMember *pMember = objClass.GetDynamicMembers()[memberIndex]; 128 131 129 132 130 133 //アクセシビリティをチェック 131 if(( bPrivateAccess==0 && objClass.ppobj_Member[i]->IsPrivate() )||132 objClass.ppobj_Member[i]->IsNoneAccess() ){134 if(( bPrivateAccess==0 && pMember->IsPrivate() )|| 135 pMember->IsNoneAccess() ){ 133 136 return 0; 134 137 } 135 else if(bPrivateAccess==0&& objClass.ppobj_Member[i]->IsProtected())138 else if(bPrivateAccess==0&&pMember->IsProtected()) 136 139 return 0; 137 140 138 resultType = objClass.ppobj_Member[i]->GetType();141 resultType = pMember->GetType(); 139 142 140 143 //ポインタ変数の場合 141 144 if( resultType.IsPointer() ){ 142 if( objClass.ppobj_Member[i]->SubScripts[0]==-1){145 if(pMember->SubScripts[0]==-1){ 143 146 lstrcpy(lpPtrOffset,array); 144 147 array[0]=0; … … 154 157 //配列オフセット 155 158 i2=Debugging_GetArray( 156 objClass.ppobj_Member[i]->SubScripts,159 pMember->SubScripts, 157 160 array, 158 161 resultType, … … 167 170 } 168 171 } 169 else if( objClass.ppobj_Member[i]->SubScripts[0]!=-1){172 else if(pMember->SubScripts[0]!=-1){ 170 173 resultType.SetBasicType( resultType.GetBasicType() | FLAG_PTR ); 171 174 } … … 209 212 } 210 213 211 i2=Debugging_GetMember( objClass.ppobj_Member[i]->GetType().GetClass(),214 i2=Debugging_GetMember(pMember->GetType().GetClass(), 212 215 NestMember, 213 216 pRelativeVar, … … 322 325 int Debugging_GetVarOffset( char *variable,RELATIVE_VAR *pRelativeVar, Type &resultType, int *pss){ 323 326 extern HANDLE hDebugProcess; 324 int i ,i2,i3;327 int i2,i3; 325 328 char member[VN_SIZE],VarName[VN_SIZE],array[VN_SIZE],lpPtrOffset[VN_SIZE]; 326 329 LONG_PTR lpData; … … 339 342 ///////////////// 340 343 if( UserProc::IsLocalAreaCompiling() ){ 341 const Variable *pVar = UserProc::CompilingUserProc().localVars.Find( VarName);344 const Variable *pVar = UserProc::CompilingUserProc().localVars.Find( Symbol( VarName ) ); 342 345 343 346 if( pVar ){ … … 379 382 //クラス内メンバを参照するとき(通常) 380 383 381 for(i=0;i<pobj_CompilingClass->iMemberNum;i++){ 382 if( pobj_CompilingClass->ppobj_Member[i]->GetName() == VarName ){ 384 bool isFound = false; 385 BOOST_FOREACH( CMember *pMember, pobj_CompilingClass->GetDynamicMembers() ){ 386 if( pMember->GetName() == VarName ){ 387 isFound = true; 383 388 break; 384 389 } 385 390 } 386 if( i==pobj_CompilingClass->iMemberNum) goto NonClassMember;391 if( !isFound ) goto NonClassMember; 387 392 } 388 393
Note:
See TracChangeset
for help on using the changeset viewer.