Ignore:
Timestamp:
May 18, 2019, 12:13:44 AM (5 years ago)
Author:
chronos
Message:
  • Modified: Improved stepping through source and target code. Each step has source, program and target index.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r113 r114  
    226226    AProgramShowExecutionPoint.Execute;
    227227  if Core.CurrentTarget.State = rsStopped then
    228   Core.CurrentTarget.Messages.AddMessage(SProgramStopped);
     228    Core.CurrentTarget.Messages.AddMessage(SProgramStopped);
    229229end;
    230230
     
    487487      Core.ThemeManager.UseTheme(Self);
    488488      FormSourceCode.UpdateTheme;
     489      Core.SaveToRegistry(Core.ApplicationInfo.GetRegistryContext);
     490      SaveToRegistry(Core.ApplicationInfo.GetRegistryContext);
    489491    end;
    490492  finally
     
    523525  DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEditSource.SelStart - 1);
    524526  if Assigned(DebugStep) then begin
    525     BreakPoint := Core.CurrentTarget.BreakPoints.SearchByTargetPos(DebugStep.TargetPosition);
     527    BreakPoint := Core.CurrentTarget.BreakPoints.SearchByTargetPos(DebugStep.ProgramPosition);
    526528    if Assigned(BreakPoint) then
    527529      Core.CurrentTarget.BreakPoints.Delete(Core.CurrentTarget.BreakPoints.IndexOf(BreakPoint))
    528       else Core.CurrentTarget.BreakPoints.AddItem(DebugStep.TargetPosition);
     530      else Core.CurrentTarget.BreakPoints.AddItem(DebugStep.ProgramPosition);
    529531  end;
    530532end;
     
    555557    if not Core.CurrentTarget.Compiled then AProgramCompile.Execute;
    556558    DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEditSource.SelStart - 1);
    557     Core.CurrentTarget.BreakPoints.SetSystem(DebugStep.TargetPosition);
     559    Core.CurrentTarget.BreakPoints.SetSystem(DebugStep.ProgramPosition);
    558560    AProgramRun.Execute;
    559561  end else begin
    560562    DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEditSource.SelStart - 1);
    561     Core.CurrentTarget.RunToCursor(DebugStep.TargetPosition);
     563    Core.CurrentTarget.RunToCursor(DebugStep.ProgramPosition);
    562564  end;
    563565end;
     
    567569  DebugStep: TDebugStep;
    568570begin
    569   DebugStep := Core.CurrentTarget.DebugSteps.SearchByTargetPos(Core.CurrentTarget.ExecutionPosition);
     571  DebugStep := Core.CurrentTarget.DebugSteps.SearchByProgramPos(Core.CurrentTarget.ExecutionPosition);
    570572  FormSourceCode.SynEditSource.SelStart := DebugStep.SourcePosition + 1;
    571573  FormTargetCode.SynEditTarget.SelStart := DebugStep.TargetPosition + 1;
     
    578580  if Core.CurrentTarget.State = rsStopped then begin
    579581    if not Core.CurrentTarget.Compiled then AProgramCompile.Execute;
    580     Core.CurrentTarget.BreakPoints.SetSystem(TDebugStep(Core.CurrentTarget.DebugSteps.First).TargetPosition);
     582    Core.CurrentTarget.BreakPoints.SetSystem(TDebugStep(Core.CurrentTarget.DebugSteps.First).ProgramPosition);
    581583    AProgramRun.Execute;
    582584  end else Core.CurrentTarget.StepInto;
     
    592594  if Core.CurrentTarget.State = rsStopped then begin
    593595    if not Core.CurrentTarget.Compiled then AProgramCompile.Execute;
    594     Core.CurrentTarget.BreakPoints.SetSystem(TDebugStep(Core.CurrentTarget.DebugSteps.First).TargetPosition);
     596    Core.CurrentTarget.BreakPoints.SetSystem(TDebugStep(Core.CurrentTarget.DebugSteps.First).ProgramPosition);
    595597    AProgramRun.Execute;
    596598  end else Core.CurrentTarget.StepOver;
Note: See TracChangeset for help on using the changeset viewer.