From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933477AbcATMIS (ORCPT ); Wed, 20 Jan 2016 07:08:18 -0500 Received: from david.siemens.de ([192.35.17.14]:33280 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933399AbcATMIN (ORCPT ); Wed, 20 Jan 2016 07:08:13 -0500 Subject: Re: [PATCH 4/5] scripts/gdb: Add mount point list command To: Kieran Bingham References: <1453288550-4706-1-git-send-email-kieran.bingham@linaro.org> <1453288550-4706-5-git-send-email-kieran.bingham@linaro.org> <569F7288.1080107@siemens.com> <569F74C1.7000209@linaro.org> Cc: linux-kernel@vger.kernel.org, maxime.coquelin@st.com, peter.griffin@linaro.org, lee.jones@linaro.org From: Jan Kiszka Message-ID: <569F78A8.90209@siemens.com> Date: Wed, 20 Jan 2016 13:08:08 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: <569F74C1.7000209@linaro.org> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016-01-20 12:51, Kieran Bingham wrote: > Hi Jan, > > On 20/01/16 11:42, Jan Kiszka wrote: >> Hi Kieran, >> >> just a couple of quick comments: >> >> On 2016-01-20 12:15, Kieran Bingham wrote: >>> lx-mounts will identify current mount points based on the 'init_task' >>> namespace by default, as we do not yet have a kernel thread list >>> implementation to select the current running thread. >> >> current_task? See LxCurrentFunc, could be factored out if usable. Or >> what are you looking for? > > LxCurrentFunc relies on gdb.parse_and_eval("¤t_task") which is not > available on ARM. Good point, not only affecting ARM. Needs to be fixed - lx-current() is an important service. > > Although that is not what I was referring to in the comment. My meaning > was that once we have gdb-thread objects created, (my next phase of > work) then this command would operate on the thread currently selected > in gdb, based on the inferior_ptid. I see. However, to have thread selection run with reasonable defaults, we will need current() support as well. > > >>> >>> Optionally, a user can specify a PID to list from that process' >>> namespace >>> >>> This is somewhat limited vs the /proc/mounts file, as that calls into >>> vfs hooks through the s_op functions to obtain extra information. >>> >>> Signed-off-by: Kieran Bingham >>> --- >>> >>> >>> In this patch, I'm interested in your opinions on coding styles. >>> Would you prefer to see the function helpers, (dentry_name, info_opts) where >>> they are, or inside the command as class members? Or perhaps defined in utils? >> >> Need to look into this. >> >>> >>> This also shows where I need to take constant information from the kernel. >>> In this case, they are simple numerical bitflags, and unlikely to change but >>> I didn't want to duplicate their values. >> >> Maybe we can generate python files with the required constants from the >> C headers during build? Similar to asm-offsets.c stuff. >> > > > Yes, this is what I've implemented in [PATCH 1/5] ? Perhaps the mails > have reached you out-of-order. > No, they were only processed in random order. Perfect! Jan -- Siemens AG, Corporate Technology, CT RDA ITP SES-DE Corporate Competence Center Embedded Linux