From owner-freebsd-threads@FreeBSD.ORG Sat Jan 29 18:50:17 2005 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 33D8016A4CF for ; Sat, 29 Jan 2005 18:50:17 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F13543D31 for ; Sat, 29 Jan 2005 18:50:17 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0TIoGVS096051 for ; Sat, 29 Jan 2005 18:50:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0TIoGrt096050; Sat, 29 Jan 2005 18:50:16 GMT (envelope-from gnats) Date: Sat, 29 Jan 2005 18:50:16 GMT Message-Id: <200501291850.j0TIoGrt096050@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: "Niall Douglas" Subject: Re: threads/76821: Add access to gdb unique thread id X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Niall Douglas List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jan 2005 18:50:17 -0000 The following reply was made to PR threads/76821; it has been noted by GNATS. From: "Niall Douglas" To: Daniel Eischen Cc: freebsd-gnats-submit@freebsd.org, freebsd-threads@freebsd.org Subject: Re: threads/76821: Add access to gdb unique thread id Date: Sat, 29 Jan 2005 18:47:11 -0000 On 29 Jan 2005 at 13:28, Daniel Eischen wrote: > > It would be really handy if a unique integer could be obtained from > > struct > pthread_t so that one can print debug information to stdout like so: > > You can use pthread_getspecific() or TLS. Doesn't help from the point of view of seeing which threads in GDB match which debug output statements. On Linux this is easy as pthread_t is a uint printed by gdb. How about getting gdb to print the pthread_t pointer address instead? I don't care what the number is, so long as I can compare the thread listing in gdb to the debug output and it makes sense! Cheers, Niall