Ignore:
Timestamp:
Sep 7, 2008, 12:38:43 AM (16 years ago)
Author:
dai
Message:

oldSourceLinesを排除。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/BreakPoint.cpp

    r725 r743  
    11#include "stdafx.h"
     2
     3#include "../../BasicCompiler_Common/DebugSection.h"
    24
    35//////////////////////////
     
    2830}
    2931
    30 void BreakPointsPerFile::update(char *nativeCodeBuffer)
     32void BreakPointsPerFile::update( char *nativeCodeBuffer, const SourceLines &sourceLines )
    3133{
    3234    int FileNum;
     
    8890
    8991        if(i2==this->lines[nCount]){
    90             extern SourceLines oldSourceLines;
    91 
    9292loop:
    9393            int tempCp = GetSourceCodeIndexFromLine( pNowSource->GetBuffer(), FileBaseLine+i2 );
    9494
    9595            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            {
    100105                i2--;
    101106                goto loop;
    102107            }
    103108
    104             nativeCodeBuffer[oldSourceLines[i3].GetNativeCodePos()]=(char)0xCC;
     109            nativeCodeBuffer[sourceLines[i3].GetNativeCodePos()] = (char)0xCC;
    105110
    106111            nCount++;
     
    192197}
    193198
    194 char *BreakPointManager::update(char *nativeCodeBuffer,int SizeOf_CodeSection){
     199char *BreakPointManager::update( char *nativeCodeBuffer, int SizeOf_CodeSection, const SourceLines &sourceLines )
     200{
    195201    char *buffer;
    196202    buffer=(char *)HeapAlloc(hHeap,0,SizeOf_CodeSection);
     
    199205    BOOST_FOREACH( BreakPointsPerFile &breakpointsPerFile, breakpointsPerFiles )
    200206    {
    201         breakpointsPerFile.update( buffer );
     207        breakpointsPerFile.update( buffer, sourceLines );
    202208    }
    203209
Note: See TracChangeset for help on using the changeset viewer.