Changeset 743 in dev for trunk/ab5.0/abdev/BasicCompiler_Common/src/BreakPoint.cpp
- Timestamp:
- Sep 7, 2008, 12:38:43 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/src/BreakPoint.cpp
r725 r743 1 1 #include "stdafx.h" 2 3 #include "../../BasicCompiler_Common/DebugSection.h" 2 4 3 5 ////////////////////////// … … 28 30 } 29 31 30 void BreakPointsPerFile::update( char *nativeCodeBuffer)32 void BreakPointsPerFile::update( char *nativeCodeBuffer, const SourceLines &sourceLines ) 31 33 { 32 34 int FileNum; … … 88 90 89 91 if(i2==this->lines[nCount]){ 90 extern SourceLines oldSourceLines;91 92 92 loop: 93 93 int tempCp = GetSourceCodeIndexFromLine( pNowSource->GetBuffer(), FileBaseLine+i2 ); 94 94 95 95 int i3; 96 for(i3=0;i3<(int)oldSourceLines.size()-1;i3++){ 97 if(oldSourceLines[i3].GetSourceCodePosition().GetPos()==tempCp) break; 98 } 99 if(i3==oldSourceLines.size()-1){ 96 for( i3=0; i3<static_cast<int>(sourceLines.size()-1); i3++ ) 97 { 98 if( sourceLines[i3].GetSourceCodePosition().GetPos() == tempCp ) 99 { 100 break; 101 } 102 } 103 if( i3 == sourceLines.size() - 1 ) 104 { 100 105 i2--; 101 106 goto loop; 102 107 } 103 108 104 nativeCodeBuffer[ oldSourceLines[i3].GetNativeCodePos()]=(char)0xCC;109 nativeCodeBuffer[sourceLines[i3].GetNativeCodePos()] = (char)0xCC; 105 110 106 111 nCount++; … … 192 197 } 193 198 194 char *BreakPointManager::update(char *nativeCodeBuffer,int SizeOf_CodeSection){ 199 char *BreakPointManager::update( char *nativeCodeBuffer, int SizeOf_CodeSection, const SourceLines &sourceLines ) 200 { 195 201 char *buffer; 196 202 buffer=(char *)HeapAlloc(hHeap,0,SizeOf_CodeSection); … … 199 205 BOOST_FOREACH( BreakPointsPerFile &breakpointsPerFile, breakpointsPerFiles ) 200 206 { 201 breakpointsPerFile.update( buffer );207 breakpointsPerFile.update( buffer, sourceLines ); 202 208 } 203 209
Note:
See TracChangeset
for help on using the changeset viewer.