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] help on debugging kernel module in Xen

To: ushuanglily@xxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] help on debugging kernel module in Xen
From: "Lily Huang" <ushuanglily@xxxxxxxxx>
Date: Fri, 12 Jan 2007 16:10:12 -0500
Delivery-date: Fri, 12 Jan 2007 13:09:48 -0800
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=SOx8YjnO3iadiGFNUI1KDyjJSVH2Suj5pdbQMYR90NYqqNH0Iu9+oq9cHfL1j4LmksAlq/oc6Qzauj4Bxty4pHYvu+ZtIfZrmGsY28DWwvhtz133vbxEeU8xFeGT8ItV0ZU7Aoz+yyK7VsgT/UUH7dXNYumv/MldGo7gkAsK8BU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4d616cca0701121307p67b8235bxb16689093b791976@xxxxxxxxxxxxxx>
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>
References: <4d616cca0701121041n62b8ad05k7996ffe125c43043@xxxxxxxxxxxxxx> <20070112192049.GA4982@xxxxxxxxxxxxxxxxx> <4d616cca0701121225p1018056ar24541c3a27c57518@xxxxxxxxxxxxxx> <20070112205358.GC4982@xxxxxxxxxxxxxxxxx> <4d616cca0701121307p67b8235bxb16689093b791976@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Oh. I found that gdbserver printed out some error messages:

unsupported xc_ptrace request PTRACE_SETFPXREGS
unsupported xc_ptrace request PTRACE_SETFPREGS

Are they the reason why the breakpoint does not work?

lily

On 1/12/07, Lily Huang <ushuanglily@xxxxxxxxx> wrote:
Many thanks for your help!

I tried the command "target remote 127.0.0.1:9999", and got the response:

/******************************************************************************/
Remote debugging using 127.0.0.1:9999
[New Thread 0]
[Switching to Thread 0]
0xc01013a7 in hypercall_page ()
warning: shared library handler failed to enable breakpoint  <------------------ this could be a problem
/******************************************************************************/

then, I did "br filp_open", and then "cont".

But no matter what file I opened in domU, the breakpoint is never encountered. It appears that the breakpoint is not activate.

I googled but cannot find answer so far.

Did you run into similar problems?

Thanks,
lily

On 1/12/07, Brendan Cully < brendan@xxxxxxxxx > wrote:
On Friday, 12 January 2007 at 15:25, Lily Huang wrote:
> Thanks, Brendan.
>
> I followed the README instruction and did follows:
>
> 1. start a domU
> 2. in Dom0, run "gdbserver-xen 127.0.0.1:9999 --attach 5", where 5 is the
> domain id of the domU
> 3. I got the response:
> /*******************************/
> Attached; pid = 5
> Listening on port 9999
> /*******************************/
> And then, I lost connection with the domU, I tried both network and console,
> neither works for me.

when the debugger attaches, it pauses the guest.

> 4. I run "gdb /boot/vmlinux-syms-2.6.16.33-xenU" in dom0, hoping to
> reactivate domU with debug command.
>
> the response is as follows:
>
> /*******************************/
> GNU gdb Red Hat Linux (6.3.0.0-1.84rh)
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db
> library "/lib/libthread_db.so.1".
> /*******************************/
>
> when I typed "cont" command in the gdb, I got "The program is not being
> run."
>
> Am I doing something wrong? Any further help will be highly appreciated.

you need to attach to the domain from within gdb:

target remote localhost:9999


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