From owner-freebsd-threads@FreeBSD.ORG Sat Jan 29 18:47:54 2005 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 058C316A4CE; Sat, 29 Jan 2005 18:47:54 +0000 (GMT) Received: from bute.st-andrews.ac.uk (bute.st-and.ac.uk [138.251.12.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id C0F5C43D39; Sat, 29 Jan 2005 18:47:52 +0000 (GMT) (envelope-from s_sourceforge@nedprod.com) Received: from kate (res04-ned6.res.st-and.ac.uk [138.251.234.67]) by bute.st-andrews.ac.uk (8.9.1a/8.9.1) with SMTP id SAA26947; Sat, 29 Jan 2005 18:44:50 GMT From: "Niall Douglas" To: Daniel Eischen Date: Sat, 29 Jan 2005 18:47:11 -0000 MIME-Version: 1.0 Message-ID: <41FBDA2F.9191.49B0FC18@localhost> Priority: normal In-reply-to: References: <200501291719.j0THJRKr033945@www.freebsd.org> X-mailer: Pegasus Mail for Windows (4.21c) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Content-Transfer-Encoding: 7BIT cc: freebsd-gnats-submit@freebsd.org cc: freebsd-threads@freebsd.org 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 List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jan 2005 18:47:54 -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