anchor.diff:    end;
     
   
  -  { TWinDbgTarget }
   
     TWinDbgTarget = class(TDbgTarget)
     private
       fCmdLine  : String;
       fOnlyProcess  : Boolean;
       fis32proc     : Boolean; //todo:
  -  
       {the root process. If it's terminated the Target is terminated too}
       fMainProc   : TProcessInformation; 
  -    
       fProcesses    : THandleList;
       fThreads      : THandleList;
       fLastEvent    : TDebugEvent;
  
positive.code:   fThreads.DeleteByID(ThreadID);
  end;
  
  function TWinDbgTarget.StartDebugProcess(const ACommandLine: String; OnlyProcess: Boolean): Boolean;
  begin
    fCmdLine:=ACommandLine;
    fOnlyProcess:=OnlyProcess;
  
negative.code:     fWaited       : Boolean;
      fTerminated   : Boolean;
      fEHandled     : Boolean;
      function StartProcess(const ACommandLine: String; OnlyProcess: Boolean): Boolean;
    protected
      procedure AddProcess(ProcessID: DWORD; ProcessHandle: THandle);
      procedure AddThread(ProcessID, ThreadID: DWORD; ThreadHandle: THandle);
      procedure RemoveThread(ThreadID: TThreadID);
    public
      constructor Create;
      destructor Destroy; override;
      procedure Terminate; override;
      function SuspendProcess(procID: TDbgProcessID): Boolean; override;
      function ResumeProcess(procID: TDbgProcessID): Boolean; override;
      function WaitNextEvent(var Event: TDbgEvent): Boolean; override;
      function GetThreadsCount(procID: TDbgProcessID): Integer; override;
      function GetThreadID(procID: TDbgProcessID; AIndex: Integer): TDbgThreadID; override;
      function GetThreadRegs(procID: TDbgProcessID; ThreadID: TDbgThreadID; Regs: TDbgDataList): Boolean; override;
      function SetThreadRegs(procID: TDbgProcessID; ThreadID: TDbgThreadID; Regs: TDbgDataList): Boolean; override;
      function SetSingleStep(procID: TDbgProcessID; ThreadID: TDbgThreadID): Boolean; override;
      function ReadMem(procID: TDbgProcessID; Offset: TDbgPtr; Count: Integer; var Data: array of byte): Integer; override;
      function WriteMem(procID: TDbgProcessID; Offset: TDbgPtr; Count: Integer; const Data: array of byte): Integer; override;
    end;
  
  implementation
  