From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 728 invoked by alias); 22 May 2017 10:18:12 -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 338 invoked by uid 89); 22 May 2017 10:18:12 -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,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=beneath, Hx-languages-length:1925, baldwin, Baldwin X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 22 May 2017 10:18:11 +0000 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v4MA8o62141381 for ; Mon, 22 May 2017 06:18:13 -0400 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 2akwwdgm9d-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 22 May 2017 06:18:12 -0400 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 22 May 2017 11:18:10 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 22 May 2017 11:18:08 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v4MAI7iE15925566; Mon, 22 May 2017 10:18:07 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4EEDC4C044; Mon, 22 May 2017 11:16:46 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1D8F94C046; Mon, 22 May 2017 11:16:46 +0100 (BST) Received: from oc1027705133.ibm.com (unknown [9.152.212.109]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 22 May 2017 11:16:46 +0100 (BST) From: Andreas Arnez To: John Baldwin Cc: gdb-patches@sourceware.org, Yao Qi , Philipp Rudo , Omair Javaid , Yao Qi , Peter Griffin Subject: Re: [RFC v3 3/8] Add basic Linux kernel support References: <20170316165739.88524-1-prudo@linux.vnet.ibm.com> <1715558.PXQs4KAMWY@ralph.baldwin.cx> <62347400.WPoiX4QSWM@ralph.baldwin.cx> Date: Mon, 22 May 2017 10:18:00 -0000 In-Reply-To: <62347400.WPoiX4QSWM@ralph.baldwin.cx> (John Baldwin's message of "Fri, 19 May 2017 10:21:36 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 x-cbid: 17052210-0040-0000-0000-00000392FB1A X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17052210-0041-0000-0000-00002578CA7E Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-05-22_08:,, 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-1705220054 X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00488.txt.bz2 On Fri, May 19 2017, John Baldwin wrote: > On Friday, May 19, 2017 07:05:47 PM Andreas Arnez wrote: >> On Fri, May 19 2017, John Baldwin wrote: >> >> > FreeBSD's kernel GDB bits (which I maintain) have a similar issue, though for >> > now we only export kernel threads as threads in GDB and don't support CPUs as >> > a GDB-visible thing. In some ways the model I would personally like would be >> > to have conceptual "layers" that you can bounce up and down between kind of >> > like a stack, but in this case a stack of thread targets, so that I could do >> > a kind of 'thread_down' and now 'info threads' would only show me CPUs, allow >> > me to select CPUs, etc. but then have a 'thread_up' to pop back up to the >> > kernel thread layer. >> >> Exactly! Note that GDB already has a stack of "layers" -- the target >> stack. Thus I'm considering commands like "target up/down" for this >> purpose. Of course this requires per-target thread lists. > > Yes, a target up/down might work. Right now you can push/pop targets so in > theory you can do this today with "target push kthread" and then "target pop". > I hadn't played with this enough to know if that would be sufficient or not > or if we wanted the targets to be more persistent to avoid having to recreate > the thread list during each push. One thing I wanted to look at in more > detail is how this interaction worked for the older M:N threading targets. > FreeBSD used to use M:N threading in userland but abandoned that a while ago. > The old thread target for that used libthread_db and you only had the one > thread list, never a way to pop back down to the LWP view. Right, it might be interesting how that interaction worked. If you gain any insight, please share. From a quick glance at these targets I had the impression that they didn't work at all with the remote target beneath them. -- Andreas