WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: follow-up to guest debug support patches

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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel