From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60230) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaiUR-0005bR-6E for qemu-devel@nongnu.org; Mon, 28 Oct 2013 04:48:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VaiUM-0001pg-Ct for qemu-devel@nongnu.org; Mon, 28 Oct 2013 04:47:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31704) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaiUM-0001pX-4k for qemu-devel@nongnu.org; Mon, 28 Oct 2013 04:47:54 -0400 Message-ID: <526E255C.2030302@redhat.com> Date: Mon, 28 Oct 2013 09:50:36 +0100 From: Laszlo Ersek MIME-Version: 1.0 References: <1379015193-16931-1-git-send-email-lersek@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Python-lang gdb script to extract x86_64 guest vmcore from qemu coredump List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Cc: Stefan Hajnoczi On 10/11/13 19:54, Stefan Hajnoczi wrote: > On Thu, Sep 12, 2013 at 9:46 PM, Laszlo Ersek wrote: >> When qemu dies unexpectedly, for example in response to an explicit >> abort() call, or (more importantly) when an external signal is delivered >> to it that results in a coredump, sometimes it is useful to extract the >> guest vmcore from the qemu process' memory image. The guest vmcore might >> help understand an emulation problem in qemu, or help debug the guest. >> >> This script reimplements (and cuts many features of) the >> qmp_dump_guest_memory() command in gdb/Python, >> >> https://sourceware.org/gdb/current/onlinedocs/gdb/Python-API.html >> >> working off the saved memory image of the qemu process. The docstring in >> the patch (serving as gdb help text) describes the limitations relative to >> the QMP command. >> >> Dependencies of qmp_dump_guest_memory() have been reimplemented as needed. >> I sought to follow the general structure, sticking to original function >> names where possible. However, keeping it simple prevailed in some places. >> >> The patch has been tested with a 4 VCPU, 768 MB, RHEL-6.4 >> (2.6.32-358.el6.x86_64) guest: > > I tried this out with qemu-kvm-1.1.2 and it worked after a few minor > tweaks due to memory data structure changes. I did hit a problem with > crash since the vmlinux was 32-bit and the guest dump was 64-bit. But > from what I can tell dump-guest-memory works as advertised. > > Reviewed-by: Stefan Hajnoczi Could someone please pick up the patch? Thanks! Laszlo