From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126386 invoked by alias); 18 Sep 2017 20:17:50 -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 125889 invoked by uid 89); 18 Sep 2017 20:17:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=concerns, Hx-languages-length:2200, his X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 18 Sep 2017 20:17:48 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id v8IKHesu017423 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 18 Sep 2017 16:17:45 -0400 Received: by simark.ca (Postfix, from userid 112) id 5F1A31ECF0; Mon, 18 Sep 2017 16:17:40 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 98AC51E5B9; Mon, 18 Sep 2017 16:17:38 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 18 Sep 2017 20:17:00 -0000 From: Simon Marchi To: Kevin Buettner Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v4 0/7] Thread handle to thread info mapping In-Reply-To: <20170816092542.6d2deb00@pinnacle.lan> References: <20170816092542.6d2deb00@pinnacle.lan> Message-ID: <7126931916df05d6d7aa73c346a1a223@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 18 Sep 2017 20:17:40 +0000 X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00456.txt.bz2 On 2017-08-16 18:25, Kevin Buettner wrote: > This patch set introduces support for mapping thread handles to the > thread_info structs which GDB uses to keep track of threads in the > inferiors which it's debugging. I need this in order to find the GDB > thread which corresponds to a saved thread handle (e.g. pthread_t) > within an implementation of a thread library built atop pthreads. The > mechanism is general enough however to support other thread handle > representations as well. > > Simon reviewed the non-documentation parts of the v3 version of this > patch set. I think I have addressed all of his concerns from that > review. > > Eli approved the two documentation patches. There have been no > changes from v3 to v4, but I'm including them here for completeness. > > Part 1 introduces a target method which maps a thread handle to > the corresponding internal GDB thread object, i.e. something of type > `struct thread_info *'. An implementation of this new method is > provided for the Linux thread target. > > Part 2 adds a python interface for the mechanism introduced in part 1. > > Part 3 is a documentation patch. As noted above, Eli has already > approved this patch which is unchanged from the v3 patch set. > > Part 4 adds a test case. I've incorporated all of Simon's suggestions > from his review of the v3 patch. I've also added three new tests > which check the behavior of thread_from_thread_handle when passing > a bad thread handle. After making this change, I found a problem > in part 6. > > Part 5 is a bug fix for a problem discovered while working on part 6. > > Part 6 adds support for remote targets. In addition to making several > v3 changes requested by Simon, I adjusted > remote_thread_handle_to_thread_info > so that would throw an exception (via a call to error()) when the > handle > sizes are mismatched. > > Part 7 is a documentation patch for the remote protocol changes that > were implemented in part 6. This patch is unchanged from the v3 > version > and has already been approved by Eli. > > Kevin My previous comments were mostly nits. I took a quick look, and it LGTM. Thanks! Simon