From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38825 invoked by alias); 4 Jun 2015 16:32:41 -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 38813 invoked by uid 89); 4 Jun 2015 16:32:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-oi0-f47.google.com Received: from mail-oi0-f47.google.com (HELO mail-oi0-f47.google.com) (209.85.218.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 04 Jun 2015 16:32:39 +0000 Received: by oifu123 with SMTP id u123so35294210oif.1 for ; Thu, 04 Jun 2015 09:32:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=WI1N3JY6Bq0SQ8Q/SDYyUugi2UDtK4BUtuMX4B+rak4=; b=G9j3VsWuXzTVAkmfItgUOF96aau6HYA1r31GADbp8KDGlBp60Gbq7qu461ktH9R9rA yYTJml9DRtBoKJfia78HsZXSIZoN7ctjmU88xYdQRg3f+0VZR+5JElteqKlqR8TfDRAU 3jOksWFjQpaWHLE3XfpkXhbjCs25GfaYLABHcflzKzO1jxb+KEcWuIV4gGrFN/d7pd7+ fTR7pXMUd5msnYX3vVAGp1QjCOJ5hPJGcwVkEzv30xJ+lThQ/ddRppead5FEXD2+WqRK 1DlqVYlvx2fCtfPXu+wn5UgSC6/X99owGI+LykKxLqeLzSZoKcc+fwutJnM94Y6nyxzY VmWQ== X-Gm-Message-State: ALoCoQlhsN4SxsLU+UGNNj647vP/OHjBHju6E1ccU1bdFe0rpBGdZx7eKzCnlf2IZUDJHKISKKoq MIME-Version: 1.0 X-Received: by 10.202.88.66 with SMTP id m63mr31693636oib.47.1433435557420; Thu, 04 Jun 2015 09:32:37 -0700 (PDT) Received: by 10.182.89.99 with HTTP; Thu, 4 Jun 2015 09:32:37 -0700 (PDT) In-Reply-To: <20150603142858.GA19370@griffinp-ThinkPad-X1-Carbon-2nd> References: <20150603142858.GA19370@griffinp-ThinkPad-X1-Carbon-2nd> Date: Thu, 04 Jun 2015 16:32:00 -0000 Message-ID: Subject: Re: RFC GDB Linux Awareness analysis From: Doug Evans To: Peter Griffin Cc: gdb-patches , lee.jones@linaro.org Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00071.txt.bz2 On Wed, Jun 3, 2015 at 7:28 AM, Peter Griffin wrote: > Hi GDB community, > > Overview > ======== > > The purpose of this email is to describe a useful feature which has been developed > by STMicroelectronics inside of GDB for debugging Linux kernels. I will cover at > a high level some of the implementation details and what I see as the advantages > / disadvantages of the implementation. I will also cover some other alternative > approaches that I'm aware of. > > The purpose is to facilitate discussion with the GDB experts on this > mailing list as to what the "correct" way to implement this functionality would > be. > > The end goal is to have an upstream implementation of this functionality. > > ... Hi. > > Questions > - Do GDB community mind Linux specific custom commands being added to GDB code base? In principal, no. But the devil is in the details of course. gdb already has "info proc foo" to dump bits of /proc. Plus obviously we encode various linux-specific bits needed to debug userland apps. > My current opinion is that helper commands which can be, should be migrated from C code > into Python, and merged into the kernel source tree (and then retired from the LKD patchset). I can't speak to what, if anything, "should" live in the kernel tree (as opposed to somewhere else, but not necessarily in gdb). Encoding application-specific knowledge in gdb is obviously not ideal, but then again the kernel is not your average app. > If you got here, thanks for reading this far! Like I said at the beginning, the purpose of > this email is to stimulate some discussion on what you folks consider the 'correct' way to > implement this OS awareness functionality is. If we can put most/all this in python, awesome. I wouldn't be opposed to extending gdb's python API to support this (where appropriate). Can we proceed by making "do it in python" the default choice, and then address each issue as needed?