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] Catch crashing domains with GDB

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Catch crashing domains with GDB
From: Simon Kagstrom <simon.kagstrom@xxxxxx>
Date: Wed, 16 Nov 2005 12:30:44 +0100
Delivery-date: Wed, 16 Nov 2005 11:30:53 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <A95E2296287EAD4EB592B5DEEFCE0E9D32E9FC@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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: <A95E2296287EAD4EB592B5DEEFCE0E9D32E9FC@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On 2005-11-16, 10:42, Ian Pratt wrote:
> > I'm using Xen-unstable updated a few days ago, and I'm trying 
> > to debug an OS which I'm porting to Xen. I'm using the 
> > gdbserver to debug domU, and while this works fine I'm 
> > wondering if it is possible to have the debugger catch the 
> > domain crashes, i.e., if I crash the domain it would be nice 
> > if I could check the backtrace etc from within GDB.
> > 
> > Is this possible?
> 
> "on_crash = preserve" should keep the domain hanging around -- I'd
> imagine you'd be able to get gdb to give you a backtrace from there.

Ah, I see. However, I tried adding that to the domain config, and the crashed
domain is preserved:

  [ska@cb mini-os]$ sudo xm list
  Name                              ID Mem(MiB) VCPUs State  Time(s)
  Domain-0                           0       64     1 r-----  1121.3
  test                              56       32     1 --p-c-     0.1

and I can also attach the gdbserver to the domain (with gdbserver-xen
localhost:9999 --attach 56), but when I try to attach to the gdbserver with
GDB I only get

  (gdb) target remote localhost:9999 
  Remote debugging using localhost:9999
  Couldn't establish connection to remote target
  Remote communication error: Connection reset by peer.

and the gdbserver then exits with

  Remote debugging from host 127.0.0.1
  Child exited with status 0
  GDBserver exiting

. Debugging works fine if I attach with the domain paused on startup. I've
tried both gdb 6.2.1 and Debian Sarge's 6.3 version and both exhibit the same
behaviour.

--
// Simon

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