From: Mukesh Rathor Subject: Re: How to debug Xen? Date: Wed, 28 Oct 2009 18:26:21 -0700 Message-ID: <20091028182621.17dcd670@mantra.us.oracle.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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: Jun Zhu Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Sat, 24 Oct 2009 13:32:57 +0800 Jun Zhu wrote: > Hi, friends > How to debug Xen? Sometimes, I am confused with sudden hardware > restart or halt. I can not see any output to analyze the problems. > Can you introduce some debug methods adopted in the Xen development? I don't know what state gdb is in xen, but I wrote up a built in debugger in xen, called kdb. It is an assembly level debugger. If you are dealing with crash, system will just break into kdb. if hang, you can break into it via ctrl+\. If it's badly hung with interrupts disabled, you can NMI the system, and it would break into kdb. See kdb/README in http://xenbits.xensource.com/ext/debuggers.hg for command details, edit kdb_cmds.c and find f_{cmd}. I'll update README soon with usage for each command. thanks mukesh PS: If the community is interested, I can send patch.