All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Frank <mhf@linuxmail.org>
To: linux-kernel@vger.kernel.org
Cc: SoftwareSuspend Development  <softwaresuspend-devel@lists.berlios.de>
Subject: [PATCH 2.6.9] KDB: Fix compile problem when CONFIG_KPROBES and CONFIG_KDB set
Date: Sun, 28 Nov 2004 04:18:46 +0800	[thread overview]
Message-ID: <200411280418.47543.mhf@linuxmail.org> (raw)

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

             reply	other threads:[~2004-11-28  2:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-27 20:18 Michael Frank [this message]
2004-11-29 19:09 ` [PATCH 2.6.9] KDB: Fix compile problem when CONFIG_KPROBES and CONFIG_KDB set Tom Rini
2004-11-30  2:31   ` Keith Owens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200411280418.47543.mhf@linuxmail.org \
    --to=mhf@linuxmail.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=softwaresuspend-devel@lists.berlios.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.