From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 84585 invoked by alias); 12 Jan 2016 18:55:44 -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 84561 invoked by uid 89); 12 Jan 2016 18:55:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.7 required=5.0 tests=AWL,BAYES_50,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=gcore, baldwin, Baldwin, fbsdnatc X-Spam-User: qpsmtpd, 2 recipients X-HELO: bigwig.baldwin.cx Received: from bigwig.baldwin.cx (HELO bigwig.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Tue, 12 Jan 2016 18:55:41 +0000 Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4E1FEB946; Tue, 12 Jan 2016 13:55:39 -0500 (EST) From: John Baldwin To: gdb-patches@sourceware.org Cc: binutils@sourceware.org Subject: Re: [PATCH 0/6] Support kernel-backed user threads on FreeBSD Date: Tue, 12 Jan 2016 18:55:00 -0000 Message-ID: <5157941.xsGge3HdBb@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <10958096.fTGshuKdL7@ralph.baldwin.cx> References: <10958096.fTGshuKdL7@ralph.baldwin.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00231.txt.bz2 On Monday, January 11, 2016 10:53:50 AM John Baldwin wrote: > This set of patches adds support for examining kernel-backed user threads on > FreeBSD. There is more history in a comment in fbsd-nat.c, but this target > uses ptrace directly (instead of libthread_db) to support the current > threading library (libthr) on FreeBSD which uses a kernel thread for each > user thread. Support for thread names in both core dumps (via FreeBSD's > OS-specific NT_THRMISC core note) and live is supported as is scheduler > locking. gcore generates register notes for each thread as well. > > The first two patches are to binutils to support FreeBSD-specific core > notes. The last four are to GDB. (Apologies for fubar'ing the threading on the patches in this series.) One other note I forgot to mention is that currently I leave the ptid for single-threaded processes as (pid, 0, 0) (i.e. I only use LWPs in PTIDs when there is more than one thread). What is the best practice? Should I always use LWPs in ptids instead? -- John Baldwin