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:

    “Have we any control over being born?,” my friend asked in despair. “No, the job is done for us while we’re sleeping, so to speak, and when we wake up everything is all set. We merely appear, like an ornate celebrity wheeled out in a wheelchair.” “I don’t remember,” my friend claimed. “No need to,” I said: “what need have us free-loaders for any special alertness? We’re done for.”
    Marvin Cohen, U.S. author and humorist. The Self-Devoted Friend, New Directions (1967)