lkml.org 
[lkml]   [2002]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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);
\
 
 \ /
  Last update: 2005-03-22 13:15    [W:0.063 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site