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] Debugging the hypervisor

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-devel] Debugging the hypervisor
From: Matthew Donovan <matthew@xxxxxxxxxxxxxx>
Date: Wed, 21 May 2008 12:43:15 -0400
Delivery-date: Wed, 21 May 2008 09:37:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
 Well, maybe I'm not going about this the right way then.  

Back in February, I asked some questions about getting the interrupt
descriptor table from an HVM guest with xc_vcpu_getcontext.  You said the
only way to do it at the time was to do an hvm-save hypercall and parse the
binary.  At the time, we put the whole issue to the side to get some other
things working first.  Now we've come back to it and are looking at getting
an HVM's IDT programmatically without doing the hvm_save() call.

I've been looking at the source but I really wanted to be able to put in a
breakpoint and step through the code (if it's possible) to see how
everything really interacts.

If you can give me any direction (either for debugging Xen or getting the
IDT) I would really appreciate it.

Thanks
-matthew

> -----Original Message-----
> From: Keir Fraser [mailto:keir.fraser@xxxxxxxxxxxxx] 
> Sent: Wednesday, May 21, 2008 11:45 AM
> To: Matthew Donovan; xen-devel@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Xen-devel] Debugging the hypervisor
> 
> I'm rather confused about what you're trying to achieve. A 
> good first step
> would be to get Xen console output over the serial line. You 
> achieve this by
> specifying com1=115200 (for example) and console=com1,vga on 
> Xen's command
> line. If you can get that working then you can move onto the 
> gdbstub. This
> requires:
>  1. that you add e.g. 'com1=115200 gdb=com1' to Xen's command line
>  2. you connect to the gdbstub with gdb, not with minicom!
>  3. Xen must crash for the gdbstub to be entered. The stub 
> provides only
> post-mortem debugging analysis support
> 
>  -- Keir
> 
> On 21/5/08 16:10, "Matthew Donovan" <matthew@xxxxxxxxxxxxxx> wrote:
> 
> > I am trying to debug the Xen hypervisor from a second 
> computer over the
> > serial port, but nothing seems to work.  Using mercurial, I got
> > xen-3.2-testing.hg.  I followed the steps in crashdb.txt in 
> the docs/misc/
> > folder:
> > set debug=y in Config.mk, crash_debug=y in xen/Rules.mk
> > 
> > I also added -fno-omit-frame-pointer to these file as well.
> > 
> > I compiled with no errors and booted with minicom connected to the
> > workstation via com1 but when I do Ctrl-A three times to 
> connect, nothing
> > happens.  The debuggee boots find and gives me the login 
> screen as normal.
> > Is there a special time to hit the Ctrl-A in minicom?  
> Should the kernel
> > wait for a connection from gdb?
> > 
> > I've tried various combinations of using nsplitd and a 
> serial-split patch I
> > found mentioned on mailing lists and setting the boot flags 
> to com=1H and
> > com=1.  Nothing seems to work.
> > 
> > Is the gdb stub working with this version of the code?
> > 
> > I have checked the serial connection by connecting minicom 
> to the port and
> > from the remote machine doing the command "echo test > 
> /dev/ttyS0" and I
> > receive the text.  I have minicom set for 9600 8n1 and I 
> use the same boot
> > flags set in the grub config file.
> > 
> > What am I missing?
> > 
> > Thanks
> > -matthew
> > 
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@xxxxxxxxxxxxxxxxxxx
> > http://lists.xensource.com/xen-devel
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>