Changeset 263 in dev for trunk/abdev/BasicCompiler32/MakePeHdr.cpp
- Timestamp:
- Aug 5, 2007, 3:47:49 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/MakePeHdr.cpp
r261 r263 239 239 240 240 //コードと行番号の関係 241 extern LINEINFO *pLineInfo; 242 extern int MaxLineInfoNum; 243 pLineInfo=(LINEINFO *)HeapAlloc(hHeap,0,1); 244 MaxLineInfoNum=0; 241 extern SourceLines oldSourceLines; 242 oldSourceLines.clear(); 245 243 246 244 … … 887 885 888 886 //機械語コードとBasicコードの関係を整理 889 extern LINEINFO *pLineInfo; 890 extern int MaxLineInfoNum; 887 extern SourceLines oldSourceLines; 891 888 int MinObp,MaxObp; 892 LINEINFO *pTempLineInfo; 893 pTempLineInfo=(LINEINFO *)HeapAlloc(hHeap,0,MaxLineInfoNum*sizeof(LINEINFO)); 894 i2=0; 889 SourceLines tempSourceLines; 895 890 MaxObp=0; 896 891 while(1){ 897 for(i3=0,MinObp=0x0FFFFFFF;i3< MaxLineInfoNum;i3++){898 if( pLineInfo[i3].TopObp<MinObp&&MaxObp<pLineInfo[i3].TopObp){899 MinObp= pLineInfo[i3].TopObp;892 for(i3=0,MinObp=0x0FFFFFFF;i3<(int)oldSourceLines.size();i3++){ 893 if(oldSourceLines[i3].GetNativeCodePos()<MinObp&&MaxObp<oldSourceLines[i3].GetNativeCodePos()){ 894 MinObp=oldSourceLines[i3].GetNativeCodePos(); 900 895 i4=i3; 901 896 } 902 897 } 903 898 if(MinObp==0x0FFFFFFF) break; 904 pTempLineInfo[i2]=pLineInfo[i4]; 905 MaxObp=pTempLineInfo[i2].TopObp; 906 i2++; 907 } 908 HeapDefaultFree(pLineInfo); 909 pLineInfo=(LINEINFO *)HeapAlloc(hHeap,0,i2*sizeof(LINEINFO)); 910 memcpy(pLineInfo,pTempLineInfo,i2*sizeof(LINEINFO)); 911 MaxLineInfoNum=i2; 912 HeapDefaultFree(pTempLineInfo); 899 tempSourceLines.push_back( oldSourceLines[i4] ); 900 MaxObp=tempSourceLines.back().GetNativeCodePos(); 901 } 902 oldSourceLines = tempSourceLines; 913 903 914 904 //デバッグセクションを生成 … … 1216 1206 delete pobj_GlobalVarSchedule; 1217 1207 1218 /* 1208 1219 1209 compiler.linker.SetImageBase( ImageBase ); 1220 1210 compiler.linker.ResolveDataTableSchedules( MemPos_DataSection ); 1221 1211 compiler.linker.ResolveDllProcSchedules( MemPos_CodeSection, MemPos_ImportSection, LookupSize, HintSize ); 1222 1212 compiler.linker.ResolveUserProcSchedules( MemPos_CodeSection ); 1223 compiler.linker.ResolveDataTableSchedules( MemPos_RWSection ); 1224 */ 1213 compiler.linker.ResolveGlobalVarSchedules( MemPos_RWSection ); 1214 1215 if( obp == compiler.linker.GetNativeCode().GetSize() ) 1216 { 1217 //memcpy( OpBuffer, compiler.linker.GetNativeCode().GetCodeBuffer(), compiler.linker.GetNativeCode().GetSize() ); 1218 } 1219 else 1220 { 1221 SetError(); 1222 } 1223 1225 1224 1226 1225
Note:
See TracChangeset
for help on using the changeset viewer.