Messages in this thread Patch in this message | | | Date | Wed, 23 Jan 2002 14:00:45 -0700 | From | "Jeff V. Merkey" <> | Subject | [PATCH] kdb/mdb hardware breakpoints broken 2.4.17/18 |
| |
Please find a patch that corrects the problem with hardware breakpoints not working with kdb. I have noticed that gdb uses inserted int3 (0xCC) breakpoints (as does kdb) for soft breakpoint support, so this fix may not affect these programs. It is not clear why every signal handled is writing a 0 t the DR7 register.
Patch submitted to Keith Owens and Linux kernel.
Jeff
diff -Naur ./arch/i386/kernel/signal.c ../linux-new/./arch/i386/kernel/signal.c --- ./arch/i386/kernel/signal.c Fri Sep 14 15:15:40 2001 +++ ../linux-new/./arch/i386/kernel/signal.c Wed Jan 23 13:26:07 2002 @@ -698,7 +698,9 @@ * have been cleared if the watchpoint triggered * inside the kernel. */ - __asm__("movl %0,%%db7" : : "r" (current->thread.debugreg[7])); + + if (current->thread.debugreg[7]) + __asm__("movl %0,%%db7" : : "r" (current->thread.debugreg[7])); /* Whee! Actually deliver the signal. */ handle_signal(signr, ka, &info, oldset, regs);
| |