Messages in this thread Patch in this message | | | Date | Thu, 09 Dec 1999 20:57:11 +0000 | From | Eric Pouech <> | Subject | PATCH: saving i386 debug register on debug traps |
| |
since 2.1.0 (!), the DR6 value was not saved on debug traps, so not allowing to know which DR0-3 did trigger a trap (if any)
this patch (against 2.2.13) should solve this issue
A+ -- --------------- Eric Pouech (http://perso.wanadoo.fr/eric.pouech/) "The future will be better tomorrow", Vice President Dan Quayle--- traps.c.orig Thu Dec 9 21:39:40 1999 +++ traps.c Thu Dec 9 21:49:13 1999 @@ -354,10 +354,11 @@ unsigned int condition; struct task_struct *tsk = current; + __asm__ __volatile__("movl %%db6,%0" : "=r" (condition)); + tsk->tss.debugreg[6] = condition; + if (regs->eflags & VM_MASK) goto debug_vm86; - - __asm__ __volatile__("movl %%db6,%0" : "=r" (condition)); /* Mask out spurious TF errors due to lazy TF clearing */ if (condition & DR_STEP) { | |