Re: [PATCH] SW Breakpoint doesn't work after it triggers on non boot CPU

Keith Owens <[email protected]>
Newsgroups gmane.linux.kernel.debugging
Message-ID <[email protected]>
Konstantin Baydarov (on Mon, 9 Jul 2007 01:04:31 +0400) wrote:
>I'v set breakpoint to do_sync, then I'v triggered it, first on BOOT
>CPU(CPU0), than on CPU1. Here is log:

Fixed in kdb v4.4-2.6.23-rc2-common-2.  The code was testing the wrong
reason value.

Index: linux/kdb/kdbmain.c
===================================================================
--- linux.orig/kdb/kdbmain.c	2007-08-09 16:18:56.124872758 +1000
+++ linux/kdb/kdbmain.c	2007-08-09 14:56:27.169420747 +1000
@@ -2009,9 +2009,10 @@ kdb(kdb_reason_t reason, int error, stru
 	/* Set up a consistent set of process stacks before talking to the user */
 	KDB_DEBUG_STATE("kdb 9", result);
 	result = kdba_main_loop(reason, reason2, error, db_result, regs);
+	reason = reason2;	/* back to original event type */
 
 	KDB_DEBUG_STATE("kdb 10", result);
-	kdba_adjust_ip(reason2, error, regs);
+	kdba_adjust_ip(reason, error, regs);
 	KDB_STATE_CLEAR(LONGJMP);
 	KDB_DEBUG_STATE("kdb 11", result);
 	/* go which requires single-step over a breakpoint must only release

---------------------------
Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.