From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kip Macy Subject: Re: gdbserver-xen / gdb crashing domU Date: Tue, 27 Sep 2005 18:59:24 -0700 Message-ID: References: <4339CC62.4040102@cmu.edu> Reply-To: Kip Macy Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1341502133==" Return-path: In-Reply-To: <4339CC62.4040102@cmu.edu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Jonathan M. McCune" Cc: bparno@ece.cmu.edu, xen-devel@lists.xensource.com, Arvind Seshadri List-Id: xen-devel@lists.xenproject.org --===============1341502133== Content-Type: multipart/alternative; boundary="----=_Part_8449_9380159.1127872764992" ------=_Part_8449_9380159.1127872764992 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline domu_debug must be enabled in xen's Rules.mk , otherwise the int3 gets passed onto the OS which will cause it to crash as it isn't expecting to see a debug trap in ring 0 (unless of course you have a debugger compiled into the kernel itself). Just re-compile and then pass -p (pause) to xm create followed by an attach with gdbserver-xen. -Kip On 9/27/05, Jonathan M. McCune wrote: > > Hello, > > I'm trying to use gdb and gdbserver-xen to walk through the instructions > executed when starting up a domU kernel. We are using the current > xen-unstable (linux-2.6.12-xenU). I have followed the instructions in > tools/debugger/gdb/ and I am able to successfully attach to a running > domU kernel. I have compiled the domU kernel with debug options as > described in tools/debugger/gdb/README. After attaching to the running > domU kernel, I observe the following behavior: > > Issuing the gdb commands 'step', 'stepi', 'next', and 'nexti' when the > domU kernel is initially paused all crash the domU kernel silently > (i.e., the state of said domU goes to 'c' if you issue an `xm list` in > dom0). 'continue' causes the domU kernel to boot up correctly. > > All the breakpoints I've tried setting so far (setting the breakpoints > before issuing the 'continue' in gdb) cause the domU kernel to panic > when the function at which the breakpoint is set gets run. Functions > I've tried setting breakpoints for include dup_task_struct, queue_work, > scheduler_tick, and activate_task. > > Is it possible to step through the domU kernel code as it is booted in > Xen? > > Thanks, > -Jon > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > > > > ------=_Part_8449_9380159.1127872764992 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline domu_debug must be enabled in xen's Rules.mk, otherwise the int3 gets passed onto the OS which will cause it to crash as it isn't expecting to see a debug trap in ring 0 (unless of course you have a  debugger compiled into the kernel itself).

Just re-compile and then pass -p (pause) to xm create followed by an attach= with gdbserver-xen.

       -Kip

On 9/27/05, Jonathan M. McCune <jonmccu= ne@cmu.edu> wrote:
Hello,

I'm trying to use gdb and gdbserver-xen to walk through the i= nstructions
executed when starting up a domU kernel.  We are u= sing the current
xen-unstable (linux-2.6.12-xenU).  I have fol= lowed the instructions in
tools/debugger/gdb/ and I am able to successfully attach to a runningdomU kernel.  I have compiled the domU kernel with debug option= s as
described in tools/debugger/gdb/README.  After attaching = to the running
domU kernel, I observe the following behavior:

Issuing the gdb comma= nds 'step', 'stepi', 'next', and 'nexti' when the
domU kernel is initial= ly paused all crash the domU kernel silently
(i.e., the state of said do= mU goes to 'c' if you issue an `xm list` in
dom0).  'continue' causes the domU kernel to boot up correctl= y.

All the breakpoints I've tried setting so far (setting the breakp= oints
before issuing the 'continue' in gdb) cause the domU kernel to pan= ic
when the function at which the breakpoint is set gets run.  Funct= ions
I've tried setting breakpoints for include dup_task_struct, queue_w= ork,
scheduler_tick, and activate_task.

Is it possible to step th= rough the domU kernel code as it is booted in Xen?

Thanks,
-Jon



____________________________________= ___________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel



=
------=_Part_8449_9380159.1127872764992-- --===============1341502133== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1341502133==--