From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: about gdbserver-xen Date: Mon, 06 Dec 2010 10:24:04 -0800 Message-ID: <4CFD2A44.5050907@goop.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=x-gbk Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: topperxin Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 12/05/2010 10:29 PM, topperxin wrote: > hi all > Anybody who have ever use gdbserver-xen debug the domU kernel? > > from the guide of the gdbserver-xen, the domU must start at first, > then at the dom0 we can do just like this: > gdbserver-xen 127.0.0.1:9999 $dom_id > > and then also at dom0: > > gdb vmlinux > > gdb> target romote 127.0.0.1:9999 > > that's ok. > > my question is when I do as above , my domU will crash. another is > since the domU must start at first, if I want to debug the start stage > of the domU kernel , what should I do? who can give me some advice , > thank you very much. Firstly, "gdbsx" is the preferred command for debugging a domain these days ("gdbsx -a <32|64> "). Secondly, you can start your domain paused ("xl create -p"), attach gdbsx and gdb, set any breakpoints, etc, then start the domain off. J