From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19967 invoked by alias); 28 Sep 2016 14:28:24 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 19807 invoked by uid 89); 28 Sep 2016 14:28:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=UD:delorie.com X-HELO: p3plsmtpa06-01.prod.phx3.secureserver.net Received: from p3plsmtpa06-01.prod.phx3.secureserver.net (HELO p3plsmtpa06-01.prod.phx3.secureserver.net) (173.201.192.102) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 Sep 2016 14:28:13 +0000 Received: from [10.0.0.101] ([172.14.36.47]) by :SMTPAUTH: with SMTP id pFpkbDL1CI7YUpFplb6D9V; Wed, 28 Sep 2016 07:27:41 -0700 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Subject: Re: Custom core file From: Duane Ellis In-Reply-To: Date: Wed, 28 Sep 2016 14:28:00 -0000 Cc: gdb@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Nikolay Martyanov X-CMAE-Envelope: MS4wfGpB0rBUVaJpwg3JCeg8UUF9jmWG8zRlRkzaJ+MQFOp2m2uEQtAjFirvKgTj2PyjIYiEZjWBT3HK0zrTaGEgNGeiBXkbP7TNNS04fBTMIV+P2rcYGhoR Gof1j0Beq5xn4EBBH4616g4wD36IpoPEpuEfFBQ6FQt8SuQlqJViJEu+9YF6shA5IlF1oe6gL3gcFR/uIX5wylTIQeDMoR8mhvE= X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00066.txt.bz2 > I have a self-written bare-metal hypervisor for x86 arch and I'd like to = perform postmortem debugging of it's core (not VM, hypervisor itself!). > So the idea is to save physical memory state and later use GDB to interpr= et it. [snip] > Or may be there are any other ways to feed a raw physical memory to GDB? here=E2=80=99s a method GDB has a built in Python interpreter. GDB has commands such as =E2=80=9Cdump=E2=80=9D and =E2=80=9Crestore=E2=80= =9D that allow you to copy a binary file into memory. Thus - you can use a bit of python to extract your custom core dump For example you might use Python to unpack your custom core file into vario= us temp binary files Then in the same python script execute dump/restore commands to load these = into memory http://www.delorie.com/gnu/docs/gdb/gdb_69.html See: restore FILENAME binary =E2=80=A6..