Ignore:
Timestamp:
Feb 19, 2012, 12:41:25 PM (12 years ago)
Author:
chronos
Message:
  • Fixed: Step into, step over, step out, run to cursor debbuging actions.
  • Fixed: Updating interface from interpretter thread using synchronization.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r38 r39  
    255255
    256256procedure TMainForm.TargetStateChanged(Sender: TObject);
    257 var
    258   DebugStep: TDebugStep;
    259 begin
     257begin
     258  UpdateInterface;
    260259  if CurrentTarget.State = rsPaused then
    261260    AProgramShowExecutionPoint.Execute;
    262   UpdateInterface;
    263261end;
    264262
     
    322320  FormMesssages.Align := alClient;
    323321  FormMesssages.Show;
     322  PageControlRight.Width := MainForm.Width div 2;
     323  PageControlBottom.Height := MainForm.Height div 5;
    324324end;
    325325
     
    440440procedure TMainForm.AProgramRunExecute(Sender: TObject);
    441441begin
    442   FormCPU.LastStepCounter := 0;
    443   FormCPU.Show;
    444442  if CurrentTarget is TTargetInterpretter then
    445443    TTargetInterpretter(CurrentTarget).Input := FormInput.MemoInput.Lines.Text;
     
    595593  DebugStep: TDebugStep;
    596594begin
    597   DebugStep := CurrentTarget.DebugSteps.SearchBySourcePos(MemoSource.SelStart);
    598595  if CurrentTarget.State = rsStopped then begin
    599596    if not CurrentTarget.Compiled then AProgramCompile.Execute;
     597    DebugStep := CurrentTarget.DebugSteps.SearchBySourcePos(MemoSource.SelStart);
    600598    CurrentTarget.BreakPoints.SetSystem(DebugStep.TargetPosition);
    601599    AProgramRun.Execute;
    602   end else CurrentTarget.RunToCursor(DebugStep.TargetPosition);
     600  end else begin
     601    DebugStep := CurrentTarget.DebugSteps.SearchBySourcePos(MemoSource.SelStart);
     602    CurrentTarget.RunToCursor(DebugStep.TargetPosition);
     603  end;
    603604end;
    604605
Note: See TracChangeset for help on using the changeset viewer.