Επεξεργασία

Κοινή χρήση μέσω


.cxr (Display Context Record)

The .cxr command displays the context record saved at the specified address. It also sets the register context.

.cxr [Options] [Address]  

Parameters

Options - Can be any combination of the following options.

/f Size
Forces the context size to equal the value of Size, in bytes. This can be useful when the context does not match the actual target -- for example, when using an x86 context on a 64-bit target during WOW64 debugging. If an invalid or inconsistent size is specified, the error "Unable to convert context to canonical form" will be displayed.

/w
Writes the current context to memory, and displays the address of the location where it was written.

Address - Address of the system context record (CONTEXT structure) to be read/written. An address of -1, causes the CONTEXT structure to be read from the dump file. This is the same behavior as .ecxr. An address of 0 is not supported. When debugging a dump file, omitting the address resets the register context to the default context for that thread (User Mode) or processor (Kernel Mode).

Environment

Item Description
Modes User mode, kernel mode
Targets Live, crash dump
Platforms All

Additional Information

For more information about the register context and other context settings, see Changing Contexts.

Remarks

The information from a context record can be used to assist in debugging a system halt where an unhandled exception has occurred and an exact stack trace is not available. The .cxr command displays the important registers for the specified context record.

This command also instructs the debugger to use the specified context record as the register context. After this command is executed, the debugger will have access to the most important registers and the stack trace for this thread. This register context persists until you allow the target to execute or use another register context command (.thread, .ecxr, .trap , or .cxr again). In user mode, it will also be reset if you change the current process or thread. See Register Context for details.

The .cxr command is often used to debug bug check 0x1E. For more information and an example, see Bug Check 0x1E (KMODE_EXCEPTION_NOT_HANDLED).

The .cxr /w command writes the context to memory and displays the address where it has been stored. This address can be passed to .apply_dbp (Apply Data Breakpoint to Context) if you need to apply data breakpoints to this context.

See also

Changing Contexts

Register Context

.exr (Display Exception Record)

.ecxr

.trap