Changeset 68 for trunk/Target/UTargetInterpretter.pas
- Timestamp:
- Oct 11, 2015, 6:28:24 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Target/UTargetInterpretter.pas
r66 r68 55 55 public 56 56 FProgramBreakpoints: array of Boolean; 57 SourceJump: array of Integer;58 57 SourceBreakpoint: array of Boolean; 59 58 Memory: array of Integer; … … 176 175 I: Integer; 177 176 begin 178 SetLength(SourceJump, Length(FProgram));179 //FillChar(Pointer(SourceJump)^, Length(SourceJump), 0);180 for I := 0 to Length(FProgram) - 1 do181 SourceJump[I] := 0;182 177 SetLength(Loop, 0); 183 178 for I := 0 to Length(FProgram) - 1 do begin … … 188 183 end; 189 184 cmLoopEnd: begin 190 if SourceJump[I] > 0 then raise Exception.Create(SJumpTableColision); 191 SourceJump[I] := Loop[High(Loop)]; 192 if SourceJump[Loop[High(Loop)]] > 0 then raise Exception.Create(SJumpTableColision); 193 SourceJump[Loop[High(Loop)]] := I; 185 if FProgram[I].Parameter > 0 then 186 raise Exception.Create(SJumpTableColision); 187 FProgram[I].Parameter := Loop[High(Loop)]; 188 if FProgram[Loop[High(Loop)]].Parameter > 0 then 189 raise Exception.Create(SJumpTableColision); 190 FProgram[Loop[High(Loop)]].Parameter := I; 194 191 SetLength(Loop, Length(Loop) - 1); 195 192 end; … … 221 218 begin 222 219 if Memory[MemoryPosition] = 0 then 223 FProgramIndex := SourceJump[FProgramIndex];220 FProgramIndex := FProgram[FProgramIndex].Parameter; 224 221 end; 225 222 … … 227 224 begin 228 225 if Memory[MemoryPosition] > 0 then 229 FProgramIndex := SourceJump[FProgramIndex]- 1;226 FProgramIndex := FProgram[FProgramIndex].Parameter - 1; 230 227 end; 231 228 … … 347 344 if Step.Operation = soStepOut then begin 348 345 BreakPoints.SetSystem(Step.TargetPosition + 1); 349 Step := DebugSteps.SearchByTargetPos( SourceJump[Step.TargetPosition]);346 Step := DebugSteps.SearchByTargetPos(FProgram[Step.TargetPosition].Parameter); 350 347 BreakPoints.AddSystem(Step.TargetPosition); 351 348 end else 352 349 if Step.Operation = soStepIn then begin 353 350 BreakPoints.SetSystem(Step.TargetPosition + 1); 354 Step := DebugSteps.SearchByTargetPos( SourceJump[Step.TargetPosition]);351 Step := DebugSteps.SearchByTargetPos(FProgram[Step.TargetPosition].Parameter); 355 352 BreakPoints.AddSystem(Step.TargetPosition); 356 353 end else BreakPoints.SetSystem(Step.TargetPosition + 1); … … 369 366 if Step.Operation = soStepOut then begin 370 367 BreakPoints.SetSystem(Step.TargetPosition + 1); 371 Step := DebugSteps.SearchByTargetPos( SourceJump[Step.TargetPosition]);368 Step := DebugSteps.SearchByTargetPos(FProgram[Step.TargetPosition].Parameter); 372 369 BreakPoints.AddSystem(Step.TargetPosition); 373 370 end else 374 371 if Step.Operation = soStepIn then begin 375 Step := DebugSteps.SearchByTargetPos( SourceJump[Step.TargetPosition]);372 Step := DebugSteps.SearchByTargetPos(FProgram[Step.TargetPosition].Parameter); 376 373 BreakPoints.SetSystem(Step.TargetPosition + 1); 377 374 end else BreakPoints.SetSystem(Step.TargetPosition + 1);
Note:
See TracChangeset
for help on using the changeset viewer.