linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.9] KDB: Fix compile problem when CONFIG_KPROBES and CONFIG_KDB set
@ 2004-11-27 20:18 Michael Frank
  2004-11-29 19:09 ` Tom Rini
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Frank @ 2004-11-27 20:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: SoftwareSuspend Development

Both  kprobes and kdb defined function do_int3.
Both functions were merged.

Signed off by: Michael Frank, email: mhf@linuxmail.org

diff -uN linux-2.6.9-mhf223/./arch/i386/kernel/traps.c.mhf.orig 
linux-2.6.9-mhf223/./arch/i386/kernel/traps.c
--- linux-2.6.9-mhf223/./arch/i386/kernel/traps.c.mhf.orig      2004-11-24 
16:51:02.000000000 +0800
+++ linux-2.6.9-mhf223/./arch/i386/kernel/traps.c       2004-11-24 
17:33:13.000000000 +0800
@@ -692,15 +692,21 @@
        nmi_callback = dummy_nmi_callback;
 }

-#ifdef CONFIG_KPROBES
+#if defined(CONFIG_KPROBES) || defined(CONFIG_KDB)
 asmlinkage int do_int3(struct pt_regs *regs, long error_code)
 {
+#if defined(CONFIG_KPROBES)
        if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP)
                        == NOTIFY_STOP)
                return 1;
        /* This is an interrupt gate, because kprobes wants interrupts
        disabled.  Normal trap handlers don't. */
        restore_interrupts(regs);
+#endif
+#ifdef CONFIG_KDB
+       if (kdb(KDB_REASON_BREAK, error_code, regs))
+               return 0;
+#endif /* CONFIG_KDB */
        do_trap(3, SIGTRAP, "int3", 1, regs, error_code, NULL);
        return 0;
 }
@@ -811,16 +817,6 @@
        return;
 }

-#ifdef CONFIG_KDB
-asmlinkage void do_int3(struct pt_regs * regs, long error_code)
-{
-       if (kdb(KDB_REASON_BREAK, error_code, regs))
-               return;
-       do_trap(3, SIGTRAP, "int3", 1, regs, error_code, NULL);
-}
-#endif /* CONFIG_KDB */
-
-
 /*
  * Note that we play around with the 'TS' bit in an attempt to get
  * the correct behaviour even in the presence of the asynchronous

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

* Re: [PATCH 2.6.9] KDB: Fix compile problem when CONFIG_KPROBES and CONFIG_KDB set
  2004-11-27 20:18 [PATCH 2.6.9] KDB: Fix compile problem when CONFIG_KPROBES and CONFIG_KDB set Michael Frank
@ 2004-11-29 19:09 ` Tom Rini
  2004-11-30  2:31   ` Keith Owens
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Rini @ 2004-11-29 19:09 UTC (permalink / raw)
  To: Michael Frank; +Cc: linux-kernel, SoftwareSuspend Development

On Sun, Nov 28, 2004 at 04:18:46AM +0800, Michael Frank wrote:

> Both  kprobes and kdb defined function do_int3.
> Both functions were merged.

Is there a reason KDB (or KPROBES for that matter) can't use the notifyr
chain?  That's what KGDB does...

-- 
Tom Rini
http://gate.crashing.org/~trini/

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

* Re: [PATCH 2.6.9] KDB: Fix compile problem when CONFIG_KPROBES and CONFIG_KDB set
  2004-11-29 19:09 ` Tom Rini
@ 2004-11-30  2:31   ` Keith Owens
  0 siblings, 0 replies; 3+ messages in thread
From: Keith Owens @ 2004-11-30  2:31 UTC (permalink / raw)
  To: Tom Rini; +Cc: Michael Frank, linux-kernel, SoftwareSuspend Development

On Mon, 29 Nov 2004 12:09:48 -0700, 
Tom Rini <trini@kernel.crashing.org> wrote:
>On Sun, Nov 28, 2004 at 04:18:46AM +0800, Michael Frank wrote:
>
>> Both  kprobes and kdb defined function do_int3.
>> Both functions were merged.
>
>Is there a reason KDB (or KPROBES for that matter) can't use the notifyr
>chain?  That's what KGDB does...

It's on my todo list for kdb v4.5.


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

end of thread, other threads:[~2004-11-30  2:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-27 20:18 [PATCH 2.6.9] KDB: Fix compile problem when CONFIG_KPROBES and CONFIG_KDB set Michael Frank
2004-11-29 19:09 ` Tom Rini
2004-11-30  2:31   ` Keith Owens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).