From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20409 invoked by alias); 12 Jan 2016 19:06:19 -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 20390 invoked by uid 89); 12 Jan 2016 19:06:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_50,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=gcore, baldwin, Baldwin, jhbfreebsdorg X-Spam-User: qpsmtpd, 2 recipients X-HELO: sibelius.xs4all.nl Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 12 Jan 2016 19:06:17 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by sibelius.xs4all.nl (8.14.5/8.14.5) with ESMTP id u0CJ64Jf018927; Tue, 12 Jan 2016 20:06:04 +0100 (CET) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id u0CJ64G3023083; Tue, 12 Jan 2016 20:06:04 +0100 (CET) Date: Tue, 12 Jan 2016 19:06:00 -0000 Message-Id: <201601121906.u0CJ64G3023083@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: jhb@freebsd.org CC: gdb-patches@sourceware.org, binutils@sourceware.org In-reply-to: <5157941.xsGge3HdBb@ralph.baldwin.cx> (message from John Baldwin on Tue, 12 Jan 2016 10:55:34 -0800) Subject: Re: [PATCH 0/6] Support kernel-backed user threads on FreeBSD References: <10958096.fTGshuKdL7@ralph.baldwin.cx> <5157941.xsGge3HdBb@ralph.baldwin.cx> X-SW-Source: 2016-01/txt/msg00232.txt.bz2 > From: John Baldwin > Date: Tue, 12 Jan 2016 10:55:34 -0800 > > 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? I think that is the best approach.