From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24366 invoked by alias); 1 Mar 2016 17:37:00 -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 24343 invoked by uid 89); 1 Mar 2016 17:36:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=chop, cgit X-HELO: mail-wm0-f46.google.com Received: from mail-wm0-f46.google.com (HELO mail-wm0-f46.google.com) (74.125.82.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 01 Mar 2016 17:36:57 +0000 Received: by mail-wm0-f46.google.com with SMTP id l68so46104735wml.0 for ; Tue, 01 Mar 2016 09:36:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=XPDxYZSEFFhLgI8H+oICFQrmburvQtdKrG7FTbyYhcg=; b=i4rqAsWRXA3n9JSUN8EsmQd1pxYk31ntsjXitcfCs0nG/hljsC38bIRJ6ocT6ogR79 tWKPs1anZTJugjFbRsKh1nb7rfPZ0b2a3VYxLdlgnF0yZ9MphyLe5UtNBmnQAcCQE+FD gKi6clQmQ8CuoK5u3FO8JombFk+o056rBi7o3lGt2ZfuQ9z2pOqQ6VuNddBNzlzFFaQv IA7ANmYMckwBq/2uazsI0qTiZBD2DnL/rerLzJ+efkEJ+dcBa9HM6JdikqDDvahQHnEJ 9Tho6Y140joaaeKFwS9QxgAFLiAjI6U31Qc9zrL0Q1RksrxKVQOeU8HIC6Bhb+/yZuPV onag== X-Gm-Message-State: AD7BkJKVuXoX+mhroT4nw4I4kygbKYSYI5Yh/iNK0VpMMEaQwSICB5Tbv6rb8lKDB3pOZTy8 X-Received: by 10.194.246.35 with SMTP id xt3mr24082391wjc.57.1456853814992; Tue, 01 Mar 2016 09:36:54 -0800 (PST) Received: from [192.168.0.10] (cpc87017-aztw30-2-0-cust65.18-1.cable.virginm.net. [92.232.232.66]) by smtp.gmail.com with ESMTPSA id z65sm872818wmg.1.2016.03.01.09.36.53 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 01 Mar 2016 09:36:54 -0800 (PST) Subject: Re: [PATCH 3/4] gdb/lkd: Add Linux Kernel Awareness target To: Yao Qi References: <1456427706-30077-1-git-send-email-kieran.bingham@linaro.org> <1456427706-30077-4-git-send-email-kieran.bingham@linaro.org> <86io169kho.fsf@gmail.com> Cc: gdb-patches@sourceware.org, arnez@linux.vnet.ibm.com, jeffm@suse.com, peter.griffin@linaro.org, lee.jones@linaro.org, russell.wayman@linaro.org, kernel@stlinux.com From: Kieran Bingham Message-ID: <56D5D335.7040700@linaro.org> Date: Tue, 01 Mar 2016 17:37:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <86io169kho.fsf@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-03/txt/msg00020.txt.bz2 On 01/03/16 17:27, Yao Qi wrote: > Kieran Bingham writes: > >> Provide infrastructure and thread awareness for the Linux Kernel >> This functionality is heavily derived from the functionality created >> by ST Microelectronics which provides a greater feature set. > > In some file headers, there is such claimer > > Copyright 2011-2013 STMicroelectronics. > > the copyright should be associated to the FSF. See other GDB source > file headers. Yes, of course - Sorry - I'll update these. My aim was to get the code out to review the overall implementation. > > Looks ST Microelectronics has already had signed copyright paper > > GDB/INSIGHT STMicroelectronics 2004-12-09 > Assigns past and future changes. Excellent - I was worried about this :) > >> >> This specific implementation is stripped down to provide thread >> awareness only. Other functionality that can already be provided by python >> infrastructure such as information gathering tools specific to linux >> have been submitted to the linux kernel project separately. > > This patch includes too many things... could you split it so that the > patch only include the very basic and simple kernel awareness feature. > It may have bugs or may not handle some cases very well, but GDB can > show the kernel threads. The following patches can fix these bugs and > do improvements. For example, some commands added by this patch isn't > necessary, nor the code for logging levels. They can be split to > separated patches. Ok, I can go further in the chop. At this level, I was hoping for a review of the method of implementation through a target layer. >> >> Kernel module support is also already working and available through the >> python extensions provided by the linux kernel and has been removed from >> this submission. > > I don't know how kernel module support is done through python > extensions. I thought linux kernel module can be handled as shared > library under the solib infrastructure. See files solib*.c. The module list is parsed through a python command, which then searches for the ko objects, and adds them to GDB as symbol files. See: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/scripts/gdb/linux/modules.py and in particular: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/scripts/gdb/linux/symbols.py Regards Kieran