X86 Debug Register - DR7 - Debug Control

Debug Control

The low-order eight bits of DR7 (0,2,4,6 and 1,3,5,7) selectively enable the four address breakpoint conditions. There are two levels of enabling: the local (0,2,4,6) and global (1,3,5,7) levels. The local enable bits are automatically reset by the processor at every task switch to avoid unwanted breakpoint conditions in the new task. The global enable bits are not reset by a task switch; therefore, they can be used for conditions that are global to all tasks.

Bits 16-17 (DR0), 20-21 (DR1), 24-25 (DR2), 28-29 (DR3), define when breakpoints trigger. Each breakpoint has a two-bit entry that specifies whether they break on execution (00b), data write (01b), data read or write (11b). 10b is defined to mean break on IO read or write but no hardware supports it. Bits 18-19 (DR0), 22-23 (DR1), 26-27 (DR2), 30-31 (DR3), define how large an area of memory is watched by breakpoints. Again each breakpoint has a two-bit entry that specifies whether they watch one (00b), two (01b), eight (10b) or four (11b) bytes.

Read more about this topic:  X86 Debug Register, DR7

Famous quotes containing the word control:

    He took control of me for forty-five minutes. This time I’ll have control over him for the rest of his life. If he gets out fifteen years from now, I’ll know. I’ll check on him every three months through police computers. If he makes one mistake he’s going down again. I’ll make sure. I’m his worst enemy now.
    Elizabeth Wilson, U.S. crime victim. As quoted in People magazine, p. 88 (May 31, 1993)