From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19065 invoked by alias); 1 Feb 2016 14:32:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 19047 invoked by uid 89); 1 Feb 2016 14:32:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=fallen, 2016-2-1, 201621, images X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Mon, 01 Feb 2016 14:32:30 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 13C91AABB; Mon, 1 Feb 2016 14:32:27 +0000 (UTC) Date: Mon, 01 Feb 2016 14:32:00 -0000 From: Ales Novak To: Kieran Bingham cc: gdb-patches@sourceware.org, jeffm@suse.com Subject: Re: Enable gdb to open Linux kernel dumps In-Reply-To: <56AF46C0.7000104@linaro.org> Message-ID: References: <1454276692-7119-1-git-send-email-alnovak@suse.cz> <56AF4109.4070904@linaro.org> <56AF46C0.7000104@linaro.org> User-Agent: Alpine 2.03 (LSU 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-IsSubscribed: yes X-SW-Source: 2016-02/txt/msg00012.txt.bz2 On 2016-2-1 12:51, Kieran Bingham wrote: > > On 01/02/16 11:27, Kieran Bingham wrote: >> Hi Ales, >> >> I'm just checking out your tree now to try locally. >> >> It sounds like there is a high level of cross over in our work, but I >> believe our work can complement each other's if we work together. Yes. Our primary intention is to open kdumps (i.e. dead images of the fallen kernels), but what can be shared between live and dead kernel debugging, should be shared... >> On 31/01/16 21:44, Ales Novak wrote: >>> Following patches are adding basic ability to access Linux kernel >>> dumps using the libkdumpfile library. They're creating new target >>> "kdump", so all one has to do is to provide appropriate debuginfo and >>> then run "target kdump /path/to/vmcore". >>> >>> The tasks of the dumped kernel are mapped to threads in gdb. >>> >>> Except for that, there's a code adding understanding of Linux SLAB >>> memory allocator, which means we can tell for the given address to >>> which SLAB does it belong, or list objects for give SLAB name - and >>> more. >>> >>> Patches are against "gdb-7.10-release" (but will apply elsewhere). >>> >>> Note: registers of task are fetched accordingly - either from the dump >>> metadata (the active tasks) or from their stacks. It should be noted >>> that as this mechanism varies amongst the kernel versions and >>> configurations, my naive implementation currently covers only the >>> dumps I encounter, handling of different kernel versions is to be >>> added. >> In the work that I am doing, I had expected this to be done in python >> for exactly this reason. The kernel version specifics, (and architecture >> specifics) can then live alongside their respective trees. >>> In the near future, our plan is to remove the clumsy C-code handling >>> this and reimplement it in Python - only the binding to certain gdb >>> structures (e.g. thread, regcache) has to be added. A colleague of >>> mine is already working on that. >> This sounds exactly like the work I am doing right now. >> Could you pass on my details to your colleague so we can discuss? > > Aha, or is your colleague Andreas Arnez? I'm just about to reply to his > mail over on gbd@ next. No, it's Jeff Mahoney. His current efforts, which include Python binding to threads' regcaches and more, are at: https://jeffm.io/git/cgit.cgi/gnu/binutils-gdb/log/ And yes, you're right I've incorrectly removed autorship from some of his older patches (which in fact are not necessary for the current gdb-kdump to work, they are extending the Python binding). And as you've already found, his older patches are at: https://github.com/jeffmahoney/py-crash > > > >> >> I recently made a posting on gdb@ suggesting the addition of a >> gdb.Target object to work towards implementing this, and I have been >> liasing with Jan Kiszka to manage the Linux/scripts/gdb/ integration. >> >> >> >>> The github home of these patches is at: >>> >>> https://github.com/alesax/gdb-kdump/tree/for-next >>> >>> libkdumpfile lives at: >>> >>> https://github.com/ptesarik/libkdumpfile >>> >>> Fork adding the SLAB support lives at: >>> >>> https://github.com/tehcaster/gdb-kdump/tree/slab-support >>> >>> >> Regards >> >> Kieran Bingham >> > -- Ales Novak