Changeset 140 in dev for BasicCompiler_Common/DebugMiddleFile.cpp
- Timestamp:
- Jun 15, 2007, 4:00:25 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/DebugMiddleFile.cpp
r137 r140 50 50 void CDebugSection::make(void){ 51 51 extern INCLUDEFILEINFO IncludeFileInfo; 52 int i2,i3,i 4,i5,BufferSize;52 int i2,i3,i5,BufferSize; 53 53 54 54 if(buffer){ … … 324 324 325 325 //メンバ 326 *(long *)(buffer+i2)= pobj_c->iMemberNum;327 i2+=sizeof(long); 328 for (i4=0;i4<pobj_c->iMemberNum;i4++){326 *(long *)(buffer+i2)=(int)pobj_c->dynamicMembers.size(); 327 i2+=sizeof(long); 328 foreach( CMember *member, pobj_c->dynamicMembers ){ 329 329 // 名前 330 lstrcpy(buffer+i2, pobj_c->ppobj_Member[i4]->GetName().c_str());330 lstrcpy(buffer+i2,member->GetName().c_str()); 331 331 i2+=lstrlen(buffer+i2)+1; 332 332 333 333 // 型 334 *(long *)(buffer+i2)= pobj_c->ppobj_Member[i4]->GetType().GetBasicType();334 *(long *)(buffer+i2)=member->GetType().GetBasicType(); 335 335 i2+=sizeof(long); 336 336 337 337 // 型の拡張情報 338 SetLpIndex_DebugFile(buffer,&i2, pobj_c->ppobj_Member[i4]->GetType());338 SetLpIndex_DebugFile(buffer,&i2,member->GetType()); 339 339 340 340 // アクセシビリティ 341 *(Prototype::Accessibility *)(buffer+i2)= pobj_c->ppobj_Member[i4]->GetAccessibility();341 *(Prototype::Accessibility *)(buffer+i2)=member->GetAccessibility(); 342 342 i2+=sizeof(Prototype::Accessibility); 343 343 344 memcpy(buffer+i2, pobj_c->ppobj_Member[i4]->SubScripts,sizeof(int)*MAX_ARRAYDIM);344 memcpy(buffer+i2,member->SubScripts,sizeof(int)*MAX_ARRAYDIM); 345 345 i2+=sizeof(int)*MAX_ARRAYDIM; 346 346 … … 705 705 i2+=sizeof(long); 706 706 707 //メンバ 708 pobj_c->iMemberNum=*(long *)(buffer+i2); 709 i2+=sizeof(long); 710 pobj_c->ppobj_Member= 711 (CMember **)HeapAlloc(hHeap,0,pobj_c->iMemberNum*sizeof(CMember *)); 712 for(i4=0;i4<pobj_c->iMemberNum;i4++){ 713 707 //静的メンバ 708 int nDynamicMember = *(long *)(buffer+i2); 709 i2+=sizeof(long); 710 for( i4=0; i4<nDynamicMember; i4++ ){ 714 711 // 名前 715 712 string name = (char *)(buffer+i2); … … 727 724 i2+=sizeof(Prototype::Accessibility); 728 725 729 pobj_c->ppobj_Member[i4]=new CMember( accessibility, name, type, false );730 731 memcpy( pobj_c->ppobj_Member[i4]->SubScripts,buffer+i2,sizeof(int)*MAX_ARRAYDIM);726 CMember *member=new CMember( accessibility, name, type, false ); 727 728 memcpy(member->SubScripts,buffer+i2,sizeof(int)*MAX_ARRAYDIM); 732 729 i2+=sizeof(int)*MAX_ARRAYDIM; 730 731 pobj_c->dynamicMembers.push_back( member ); 733 732 } 734 733
Note:
See TracChangeset
for help on using the changeset viewer.