From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VN3rj-0008Ig-8j for qemu-devel@nongnu.org; Fri, 20 Sep 2013 12:47:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VN3re-0005TM-Dn for qemu-devel@nongnu.org; Fri, 20 Sep 2013 12:47:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VN3re-0005TF-6l for qemu-devel@nongnu.org; Fri, 20 Sep 2013 12:47:30 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8KGlSgS024105 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 20 Sep 2013 12:47:29 -0400 Received: from lacos-laptop.usersys.redhat.com (vpn1-6-137.ams2.redhat.com [10.36.6.137]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r8KGlRxK015389 for ; Fri, 20 Sep 2013 12:47:28 -0400 Message-ID: <523C7CB7.8000109@redhat.com> Date: Fri, 20 Sep 2013 18:49:59 +0200 From: Laszlo Ersek MIME-Version: 1.0 References: <1379015193-16931-1-git-send-email-lersek@redhat.com> In-Reply-To: <1379015193-16931-1-git-send-email-lersek@redhat.com> 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@nongnu.org On 09/12/13 21:46, 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. Ping. I'd like to get this upstream because that would help with keeping it in sync with the memory API / internals. Boring as hell to review (you'd have to follow through most of the dump-guest-memory implementation, down to the memory internals; and probably read the gdb python API docs). OTOH it can't hurt anything (separate python file in the scripts directory), so maybe it could go in just with an Acked-by from someone. Thanks Laszlo