NOTE: This register is the only control register that can be written and read via 2 ways unlike the other that can be accessed only via the MOV instruction
; First way:; Write:movcr0,reg; Read:movreg,cr0; ----------------------; Second way:; Write:lmswreg; Read:smswreg
CR1
Reserved, the CPU will throw a #UD exception when trying to access it.
Contain linear addresses of up to 4 breakpoints. If paging is enabled, they are translated to physical addresses.
DR6
It permits the debugger to determine which debug conditions have occurred.
Bits 0 through 3 indicates, when set, that it's associated breakpoint condition was met when a debug exception was generated.
Bit 13 indicates that the next instruction in the instruction stream accesses one of the debug registers.
Bit 14 indicates (when set) that the debug exception was triggered by the single-step execution mode (enabled with TF bit in EFLAGS).
Bit 15 indicates (when set) that the debug instruction resulted from a task switch where T flag in the TSS of target task was set.
Bit 16 indicates (when clear) that the debug exception or breakpoint exception occured inside an RTM region.
DR7
Bit
Description
0
Local DR0 breakpoint
1
Global DR0 breakpoint
2
Local DR1 breakpoint
3
Global DR1 breakpoint
4
Local DR2 breakpoint
5
Global DR2 breakpoint
6
Local DR3 breakpoint
7
Global DR3 breakpoint
16-17
Conditions for DR0
18-19
Size of DR0 breakpoint
20-21
Conditions for DR1
22-23
Size of DR1 breakpoint
24-25
Conditions for DR2
26-27
Size of DR2 breakpoint
28-29
Conditions for DR3
30-31
Size of DR3 breakpoint
A local breakpoint bit deactivates on hardware task switches, while a global does not.
Condition 00b means execution break, 01b means a write watchpoint, and 11b means an R/W watchpoint. 10b is reserved for I/O R/W (unsupported).