From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13185 invoked by alias); 19 Jun 2017 15:44:04 -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 12625 invoked by uid 89); 19 Jun 2017 15:44:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,KHOP_DYNAMIC,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=Hx-languages-length:2071, his X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Jun 2017 15:44:02 +0000 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v5JFg6Aw093720 for ; Mon, 19 Jun 2017 11:44:05 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0b-001b2d01.pphosted.com with ESMTP id 2b64r2ugp1-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 19 Jun 2017 11:44:05 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 19 Jun 2017 16:44:04 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 19 Jun 2017 16:44:01 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v5JFi1Q526869766; Mon, 19 Jun 2017 15:44:01 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7CF6D11C050; Mon, 19 Jun 2017 16:41:58 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4031311C04C; Mon, 19 Jun 2017 16:41:58 +0100 (BST) Received: from ThinkPad (unknown [9.152.212.148]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 19 Jun 2017 16:41:58 +0100 (BST) Date: Mon, 19 Jun 2017 15:44:00 -0000 From: Philipp Rudo To: Yao Qi Cc: gdb-patches@sourceware.org, omair.javaid@linaro.org, yao.qi@linaro.org, peter.griffin@linaro.org, arnez@linux.vnet.ibm.com Subject: Re: [RFC v4 3/9] Add basic Linux kernel support In-Reply-To: <8637awpanu.fsf@gmail.com> References: <20170612170836.25174-1-prudo@linux.vnet.ibm.com> <20170612170836.25174-4-prudo@linux.vnet.ibm.com> <86vanxtguc.fsf@gmail.com> <20170616121026.024f664b@ThinkPad> <8637awpanu.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17061915-0016-0000-0000-000004C0CCE2 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17061915-0017-0000-0000-000027F29EAE Message-Id: <20170619174359.07ae4243@ThinkPad> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-06-19_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706190262 X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00518.txt.bz2 On Mon, 19 Jun 2017 10:52:05 +0100 Yao Qi wrote: > Philipp Rudo writes: > > >> Sorry, I don't understand this design. Can you elaborate? > > > > The target beneath reports us a "pid" it thinks is right. For example in a > > core file the register sections are usually named > > > > .reg/XXX > > > > where XXX names the thread these registers belong to. In user space this is > > typically the pid of the thread but for kernel dumps it usually is a cpu-id > > (this needn't be the logical cpu-id used in the kernel). Because of that > > the kernel ptid, we generate from task_struct, usually has a different lwp > > than the same thread reported from the target beneath. Nevertheless we > > need the target beneath to give us information for running tasks. That's > > why we need to introduce a mapping between the ptid of the target beneath > > and the kernel ptid. > > > > In short, this represents two different thread views (hardware vs. software > > threads). > > > > Did that answer your question? Or did you mean something different? > > > > Can we use thread_info.priv to store these information rather than using > ptid_t? We cannot use thread_info.priv because the remote target already uses it. This was the main reason why Peter abandoned his patch. > >> > + > >> > +/* Private data struct to map between our and the target beneath PTID. > >> > */ + > >> > +struct lk_ptid_map > >> > +{ > >> > + struct lk_ptid_map *next; > >> > >> Can you use C++ stl list instead? > > > > As I already wrote Omair, my ptid_map was only meant to "somehow work" but > > never to be permanent. Managing the ptid map will be the main task for live > > debugging. That's why I think it is best when Omair changes this bit to > > whatever he needs. > > The lk_ptid_map is a list, and this patch still iterates it. We need to > use C++ stl list, rather than leave it to someone else who does the > related work later. With respect to Omairs mail I think this is obsolete. Philipp