From: Himanshu Raj <rhim@cc.gatech.edu>
To: Tim Newsham <newsham@lava.net>
Cc: xen-devel@lists.xensource.com
Subject: Re: debugging xen ....
Date: Wed, 24 Aug 2005 07:55:21 -0400 [thread overview]
Message-ID: <20050824115521.GL29191@cc.gatech.edu> (raw)
In-Reply-To: <Pine.BSI.4.61.0508232123170.26990@malasada.lava.net>
Hi Tim,
Thanks for the reply. I will try this out asap. However, just looking at it,
this looks like a solution to debug guests running under xen. I am more interested
in debugging xen itself. Can you shed any light on that?
Thanks,
Himanshu
On Tue, Aug 23, 2005 at 09:30:54PM -1000, Tim Newsham wrote:
> >After looking around for a howto and asking ppl on IRC, I had to come back
> >to the forum for this - how to debug xen?
> >
> >Basically, I would love to be able to step through the code using gdb
> >connected
> >serially to another machine.
> >
> >Is there some functionality like that in Xen. I also found some emails
> >referencing
> >a XenDebugger-HowTo, however I couldn't find that file anywhere.
>
> Run the build script in xen-unstable.hg/tools/debugger/gdb.
> Install the gdbserver and gdb (I put them in /usr/local/bin
> as gdbserver-xen and xengdb).
> Build your kernel with debug. I use the flags
> "verbose=y domu_debug=y debug=y". although I dont know if these
> are all required.
> Start up your domain (I use vm-tools and do all the steps except
> the vm-pause step).
> Run gdbserver. I run "gdbserver-xen 127.0.0.1:9999 --attach $dom"
> Run gdb. I run "xengdb -x remgdb" where remgdb has the command
> "target remote 127.0.0.1:9999" in it.
>
> Tada, you're in a debugger.
>
> I use the following script to automate this tedious process:
>
> --- deb.sh ---
> #!/bin/sh
>
> run()
> {
> echo "$*"
> $* || (echo 'failed'; exit 1)
> }
>
> # vm-create isnt giving us the right answer...
> dom=`vm-create`
> echo dom is $dom
>
> run vm-memory -m $dom 64m
> run vm-memory -i $dom 64m
> run vm-build.linux $dom /root/kernel
>
> echo done $dom
> gdbserver-xen 127.0.0.1:9999 --attach $dom &
> sleep 1
> xengdb -x /root/remgdb
>
> run vm-pause -u $dom
> --- end deb.sh ---
>
> >Himanshu Raj
> >PhD Student, GaTech (www.cc.gatech.edu/~rhim)
>
> Hope this helps,
> Tim Newsham
> http://www.lava.net/~newsham/
--
-------------------------------------------------------------------------
Himanshu Raj
PhD Student, GaTech (www.cc.gatech.edu/~rhim)
I prefer to receive attachments in an open, non-proprietary format.
-------------------------------------------------------------------------
next prev parent reply other threads:[~2005-08-24 11:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-23 22:41 debugging xen Himanshu Raj
2005-08-24 7:30 ` Tim Newsham
2005-08-24 11:55 ` Himanshu Raj [this message]
2005-08-29 14:35 ` Michal Ostrowski
2005-08-29 17:29 ` 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=20050824115521.GL29191@cc.gatech.edu \
--to=rhim@cc.gatech.edu \
--cc=newsham@lava.net \
--cc=xen-devel@lists.xensource.com \
/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.