Jump to content

DBG_C_ReadCoRegs

From EDM2
Revision as of 22:44, 4 March 2020 by Martini (talk | contribs) (Created page with "Debug Command 14 - Read Coprocessor Registers Command ;Parameters *Pid= Process ID of debuggee processor *Tid= Thread ID of Coprocessor register set to read *Cmd= DBG_C_...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Debug Command 14 - Read Coprocessor Registers Command

Parameters
  • Pid= Process ID of debuggee processor
  • Tid= Thread ID of Coprocessor register set to read
  • Cmd= DBG_C_ReadCoRegs
  • Value= Coprocessor Type Identifier
  • Buffer= Pointer to Coprocessor Register Context Buffer
  • Len= Size of Coprocessor Register Context Buffer
  • Index= Reserved, must be zero

If Tid is zero and the debuggee is stopped, the register set comes from the active debuggee thread. If Tid is zero and the debuggee is executing, ERROR_INVALID_THREADID is returned.

The coprocessor type identifier is a number that identifies the format of the coprocessor register context buffer. The buffer length must correspond exactly to the requested buffer format. The supported coprocessor types, formats and lengths include the following:

For the Intel 80387 NPX processor:

Value= DBG_CO_387 = 1 
Len= 108 

The coprocessor register context buffer format is the same as that defined by the fsave/frestore instructions as executed by the appropriate processor.

Returns

The debugger's coprocessor register context buffer is filled in with a copy of the registers read from the appropriate coprocessor, for the thread specified in the Tid field.

If an error occurs while attempting to access the coprocessor context during this command, the DBG_N_CoError notification is returned.

Restrictions

An error is returned if any one of the following occurs:

  • The debuggee process is emulating the coprocessor.
  • The specified debuggee thread has not yet attempted to use the coprocessor.
  • The wrong coprocessor type is used.
  • Index is not zero.