public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kdb/mdb hardware breakpoints broken 2.4.17/18
@ 2002-01-23 21:00 Jeff V. Merkey
       [not found] ` <200201240422.g0O4MuJ26799@bharata.in.ibm.com>
  2002-01-24  5:59 ` Keith Owens
  0 siblings, 2 replies; 4+ messages in thread
From: Jeff V. Merkey @ 2002-01-23 21:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: jmerkey

[-- Attachment #1: Type: text/plain, Size: 382 bytes --]



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


[-- Attachment #2: patch-0123.kdb --]
[-- Type: text/plain, Size: 584 bytes --]

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);

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-01-24 12:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-23 21:00 [PATCH] kdb/mdb hardware breakpoints broken 2.4.17/18 Jeff V. Merkey
     [not found] ` <200201240422.g0O4MuJ26799@bharata.in.ibm.com>
2002-01-24  5:20   ` Bharata B Rao
2002-01-24  5:59 ` Keith Owens
2002-01-24 18:15   ` Suparna Bhattacharya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox