lkml.org 
[lkml]   [1999]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectPATCH: 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) {
\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.024 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site