From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89855 invoked by alias); 28 Sep 2016 15:33:00 -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 89844 invoked by uid 89); 28 Sep 2016 15:32:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=consumers, Hx-languages-length:996 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 Sep 2016 15:32:58 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8399BC05AA72; Wed, 28 Sep 2016 15:32:57 +0000 (UTC) Received: from host1.jankratochvil.net (ovpn-116-55.ams2.redhat.com [10.36.116.55]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8SFWs9X020707 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 28 Sep 2016 11:32:56 -0400 Date: Wed, 28 Sep 2016 15:33:00 -0000 From: Jan Kratochvil To: Nikolay Martyanov Cc: gdb@sourceware.org Subject: Re: Custom core file Message-ID: <20160928153253.GA26040@host1.jankratochvil.net> References: <20160928145850.GA20365@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.0 (2016-08-17) X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00071.txt.bz2 On Wed, 28 Sep 2016 17:18:35 +0200, Nikolay Martyanov wrote: > Idea is very similar to `kdump`, you are right. But instead of Linux kernel > I have a hypervisor running on a bare-metal. So, in some point of view, I > try to implement my own kdump. And it will dump not Linux kernel mem, but > mem of hypervisor. Ah, sorry I forgot you wrote that "bare-metal" there. OK, so core files are not standardized the way executables+shlibs are by the standards of ELF-generic and ELF-x86_64 or ELF-x86 addons. You can either invent your own format (based on ELF or not) or - what I suggest - is to just mimic the Linux kernel process format. In fact /proc/kcore and kdump also create a core file looking as a userland process to make it easier for consumers to read it, despite the content is unrelated to userland processes. I am not aware of official Linux core file documentation, it is best to read sources in its producers (Linux kernel, gdb gcore) + consumers (many) Jan