anchor.diff:        Result := Result+#10#13+
           Format('Code:   %s', [DebugWinExcpetionCode(Win.Exception.ExceptionRecord.ExceptionCode)])+' '+
           Format('Flags:  %d', [Win.Exception.ExceptionRecord.ExceptionFlags])+' '+
  -        Format('Addr:   %x', [Integer(Win.Exception.ExceptionRecord.ExceptionAddress)])+' '+
  +        Format('Addr:   %x', [PtrUInt(Win.Exception.ExceptionRecord.ExceptionAddress)])+' '+
           Format('Params: %d', [Win.Exception.ExceptionRecord.NumberParameters]);
       end;
       CREATE_THREAD_DEBUG_EVENT: begin
  
positive.code: begin
    i := 0;
    SetLength(buf, 0);
    repeat
      if i >= length(buf) then begin
        if length(buf) = 0 then SetLength(buf, 1024)
  
negative.code:     set in ContextFlags.  Note that CONTEXT_DEBUG_REGISTERS is NOT
      included in CONTEXT_FULL. }
  
      Dr0       : DWORD;
      Dr1       : DWORD;
      Dr2       : DWORD;
      Dr3       : DWORD;
      Dr6       : DWORD;
      Dr7       : DWORD;
  
    { This section is specified/returned if the
      ContextFlags word contians the flag CONTEXT_FLOATING_POINT. }
  
      FloatSave : TFloatingSaveArea;
  
    { This section is specified/returned if the
      ContextFlags word contians the flag CONTEXT_SEGMENTS. }
  
      SegGs     : DWORD;
      SegFs     : DWORD;
      SegEs     : DWORD;
      SegDs     : DWORD;
  
    { This section is specified/returned if the
      ContextFlags word contians the flag CONTEXT_INTEGER. }
  
      Edi       : DWORD;
      Esi       : DWORD;
      Ebx       : DWORD;
      Edx       : DWORD;
      Ecx       : DWORD;
      Eax       : DWORD;
  
    { This section is specified/returned if the
      ContextFlags word contians the flag CONTEXT_CONTROL. }
  
      Ebp       : DWORD;
      Eip       : DWORD;
      SegCs     : DWORD;
      EFlags    : DWORD;
      Esp       : DWORD;
      SegSs     : DWORD;
    end;
    PContext32 = ^TContext32;
  
  
  //
  // Context Frame
  //
  //  This frame has a several purposes: 1) it is used as an argument to
  //  NtContinue, 2) is is used to constuct a call frame for APC delivery,
  //  and 3) it is used in the user level thread creation routines.
  //
  //
  // The flags field within this record controls the contents of a CONTEXT
  // record.
  //
  // If the context record is used as an input parameter, then for each
  // portion of the context record controlled by a flag whose value is
  // set, it is assumed that that portion of the context record contains
  // valid context. If the context record is being used to modify a threads
  // context, then only that portion of the threads context is modified.
  //
  // If the context record is used as an output parameter to capture the
  // context of a thread, then only those portions of the thread's context
  // corresponding to set flags will be returned.
  //
  // CONTEXT_CONTROL specifies SegSs, Rsp, SegCs, Rip, and EFlags.
  //
  // CONTEXT_INTEGER specifies Rax, Rcx, Rdx, Rbx, Rbp, Rsi, Rdi, and R8-R15.
  //
  // CONTEXT_SEGMENTS specifies SegDs, SegEs, SegFs, and SegGs.
  //
  // CONTEXT_DEBUG_REGISTERS specifies Dr0-Dr3 and Dr6-Dr7.
  //
  // CONTEXT_MMX_REGISTERS specifies the floating point and extended registers
  //     Mm0/St0-Mm7/St7 and Xmm0-Xmm15).
  //
  
  //typedef struct DECLSPEC_ALIGN(16) _CONTEXT {
  type
    TContext64 = record
      // Register parameter home addresses.
      //
      // N.B. These fields are for convience - they could be used to extend the
      //      context record in the future.
      P1Home        : DWORD64;
      P2Home        : DWORD64;
      P3Home        : DWORD64;
      P4Home        : DWORD64;
      P5Home        : DWORD64;
      P6Home        : DWORD64;
  
      // Control flags.
      ContextFlags  : DWORD;
      MxCsr         : DWORD;
  
      // Segment Registers and processor flags.
      SegCs         : WORD;
      SegDs         : WORD;
      SegEs         : WORD;
      SegFs         : WORD;
      SegGs         : WORD;
      SegSs         : WORD;
      EFlags        : DWORD;
  
      // Debug registers
      Dr0           : DWORD64;
      Dr1           : DWORD64;
      Dr2           : DWORD64;
      Dr3           : DWORD64;
      Dr6           : DWORD64;
      Dr7           : DWORD64;
  
      // Integer registers.
      Rax           : DWORD64;
      Rcx           : DWORD64;
      Rdx           : DWORD64;
      Rbx           : DWORD64;
      Rsp           : DWORD64;
      Rbp           : DWORD64;
      Rsi           : DWORD64;
      Rdi           : DWORD64;
      R8            : DWORD64;
      R9            : DWORD64;
      R10           : DWORD64;
      R11           : DWORD64;
      R12           : DWORD64;
      R13           : DWORD64;
      R14           : DWORD64;
      R15           : DWORD64;
  
      // Program counter.
      Rip           : DWORD64;
  
      // Floating point state.
      FltSave       : XMM_SAVE_AREA32; // MWE: only translated the FltSave part of the union
  
      // Vector registers.
      VectorRegister  : array[0..25] of M128A;
      VectorControl   : DWORD64;
  
      // Special debug control registers.
      DebugControl          : DWORD64;
      LastBranchToRip       : DWORD64;
      LastBranchFromRip     : DWORD64;
      LastExceptionToRip    : DWORD64;
      LastExceptionFromRip  : DWORD64;
    end;
  
  
  const
    hexsize = sizeof(TDbgPtr)*2;
  