All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
To: Jack F Vogel <jfv@bluesong.net>
Cc: Kip Macy <kip.macy@gmail.com>,
	Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>,
	xen-devel@lists.sourceforge.net,
	Keir Fraser <Keir.Fraser@cl.cam.ac.uk>Ian.Pratt@cl.cam.ac.uk,
	jfv@us.ibm.com
Subject: Re: Re: follow-up to guest debug support patches
Date: Sat, 12 Mar 2005 20:27:41 +0000	[thread overview]
Message-ID: <20050312202741.GC7644@cl.cam.ac.uk> (raw)
In-Reply-To: <20050312185848.GA16403@trane.bluesong.net>

On Sat, Mar 12, 2005 at 10:58:48AM -0800, Jack F Vogel wrote:
> On Sat, Mar 12, 2005 at 10:40:02AM -0800, Kip Macy wrote:
>    
> > > Doesn't the change in traps.c break in-guest debugger support?  It seems
> > > to always pause the domain if it is in kernel, an in-guest debugger
> > > which has set a breakpoint in the kernel will never get the int3.  I
> > > think
> > > this needs some kind of flag to enable/disable this behaviour.
> > 
> > I thought about that, but is there an In-guest kernel debugger that
> > can set breakpoints? All I know of are stubs that require a serial
> > port. Does NetBSD's in-kernel debugger allow one to set breakpoints
> > and continue? If so I can just put the debugger option back in
> > Rules.mk.
>   
> I believe there is a kdb patch for i386 Linux, and I have intended
> to extend my x86_64 kdb patch to Xen soon.
> 
> I had even had thoughts of an extended debugger in dom0, but have
> been too busy to think that through. Any thoughts from others on
> that? I recall a particularly nasty AIX bug that I worked on once
> on an S390 machine, the debugger in the nucleus (on VM/ESA) allowed
> me to set a watchpoint outside the guest and made a memory corruption
> problem MUCH easier to track down :)

I've ported the NetBSD in-kernel debugger (DDB) to Xen.  It doesn't
yet offer all the functionality one would want (pretty print various
information in Xen) but it can do what I wanted it for, i.e. look
at stack traces with symbols and inspect memory.  It will be entered
on faults and can be entered by pressing 'X' on Xen's console.

An example of how it could be extended is "show shared_info" which takes
a machine address of a shared_info structure and then prints its contents.
Pressing 'q' on Xen's console prints the machine addresses of the domain's
shared_info structures.

If anybody wants to play with it, I've put it up at:
http://www.cl.cam.ac.uk/~cl349/xenddb/

Extract the tarball in a xen-unstable.bk directory, which will create
xen/ddb.  Then apply the patch to hook it into the Makefiles and into
Xen's debugger hooks.  The mkddbxen script needs to be run after building
Xen (make xen) and will add the symbol table into the Xen binary.
On boot, you should see a line like this:
(XEN) Loaded initial symtab at fc556fc0, strtab at fc55eb74, # entries 1730

    christian



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

  parent reply	other threads:[~2005-03-12 20:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-12 16:02 follow-up to guest debug support patches Ian Pratt
2005-03-12 17:13 ` Keir Fraser
2005-03-12 18:40 ` Kip Macy
2005-03-12 18:58   ` Jack F Vogel
2005-03-12 19:04     ` Wim Coekaerts
2005-03-12 19:05     ` Kip Macy
2005-03-12 20:27     ` Christian Limpach [this message]
2005-03-12 19:46   ` Christian Limpach
2005-03-12 20:06     ` Kip Macy
2005-03-12 21:22 ` New patch was " Kip Macy

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=20050312202741.GC7644@cl.cam.ac.uk \
    --to=christian.limpach@cl.cam.ac.uk \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=jfv@bluesong.net \
    --cc=kip.macy@gmail.com \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=xen-devel@lists.sourceforge.net \
    /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.