Commit 61feb64
committed
[NTOS:KD64] kdx86.c: Fix Dr7 check to verify whether debugger disabling is allowed (reactos#7538)
Don't check the whole Dr7 value, but only the first 8 bits that
correspond to the local/global enable breakpoints.
We cannot check the whole value because some of the Dr7 bits are
reserved always set to 1 (bit 10), or describe other debug state.
References:
- https://en.wikipedia.org/wiki/X86_debug_register#DR7_-_Debug_control
- Intel® 64 and IA-32 Architectures Software Developer’s Manual,
Volume 3 (3A, 3B, 3C, & 3D): System Programming Guide
https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html
Section "19.2.4 Debug Control Register (DR7)" (pgs. 644-646)1 parent dfb4390 commit 61feb64
1 file changed
+6
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
429 | | - | |
430 | | - | |
| 429 | + | |
431 | 430 | | |
432 | 431 | | |
433 | 432 | | |
434 | 433 | | |
435 | | - | |
436 | | - | |
| 434 | + | |
437 | 435 | | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
442 | 439 | | |
443 | | - | |
444 | 440 | | |
445 | 441 | | |
446 | | - | |
| 442 | + | |
447 | 443 | | |
448 | 444 | | |
0 commit comments