All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: jmerkey@wolfmountaingroup.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.26 2/25] mdb: Merkey's Kernel Debugger
Date: Wed, 06 Aug 2008 03:35:59 +0200	[thread overview]
Message-ID: <878wvb6i2o.fsf@basil.nowhere.org> (raw)
In-Reply-To: <51549.166.70.238.45.1217815820.squirrel@webmail.wolfmountaingroup.com> (jmerkey@wolfmountaingroup.com's message of "Sun, 3 Aug 2008 20:10:20 -0600 (MDT)")

jmerkey@wolfmountaingroup.com writes:
> regs->ip)
> -#ifndef CONFIG_KPROBES
> +#if !defined(CONFIG_KPROBES) && !defined(CONFIG_MDB)
>  DO_VM86_ERROR(3, SIGTRAP, "int3", int3)
>  #endif
>  DO_VM86_ERROR(4, SIGSEGV, "overflow", overflow)
> @@ -733,6 +747,9 @@
>  {
>  	if (notify_die(DIE_NMIUNKNOWN, "nmi", regs, reason, 2, SIGINT) ==
> NOTIFY_STOP)
>  		return;
> +#ifdef	CONFIG_MDB
> +        mdb(NMI_EXCEPTION, reason, regs); // nmi is code 2
> +#endif

This should be all using die notifiers (register_die etc.) like the 
other kernel debuggers, not own hooks. As you can see there is already
a notify_die call around basically all the places you put in a mdb()
call, and you can just hook in there. If your other interfaces to the core 
kernel are clean enough this would even allow to use your debugger as a module.

-Andi

  reply	other threads:[~2008-08-06  1:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-04  2:10 [PATCH 2.6.26 2/25] mdb: Merkey's Kernel Debugger jmerkey
2008-08-06  1:35 ` Andi Kleen [this message]
2008-08-06  1:24   ` jmerkey
2008-08-06  2:01     ` Andi Kleen
2008-08-06  1:45       ` jmerkey

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=878wvb6i2o.fsf@basil.nowhere.org \
    --to=andi@firstfloor.org \
    --cc=jmerkey@wolfmountaingroup.com \
    --cc=linux-kernel@vger.kernel.org \
    /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.