From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28955 invoked by alias); 12 Jun 2005 00:47:02 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 28910 invoked by uid 22791); 12 Jun 2005 00:46:58 -0000 Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sun, 12 Jun 2005 00:46:58 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id j5C0kfhj007893; Sun, 12 Jun 2005 02:46:41 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.4/8.13.3) with ESMTP id j5C0keP2017919; Sun, 12 Jun 2005 02:46:40 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.4/8.13.4/Submit) id j5C0kaOW019775; Sun, 12 Jun 2005 02:46:36 +0200 (CEST) Date: Sun, 12 Jun 2005 00:47:00 -0000 Message-Id: <200506120046.j5C0kaOW019775@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: eliz@gnu.org, gdb@sources.redhat.com In-reply-to: <20050607131022.GA30174@nevyn.them.org> (message from Daniel Jacobowitz on Tue, 7 Jun 2005 09:10:22 -0400) Subject: Re: debugging threaded apps. thread ID missing in corefile. References: <200506061929.47871.abeach@deepvision.ca> <20050607000944.GA13192@nevyn.them.org> <20050607131022.GA30174@nevyn.them.org> X-SW-Source: 2005-06/txt/msg00108.txt.bz2 Date: Tue, 7 Jun 2005 09:10:22 -0400 From: Daniel Jacobowitz > > Not really. The ID is a pointer above 0x80000000, used by the > > implementation. > > Well, then perhaps we should display the thread ID in hex? Hmm. I wouldn't object to this. The number is opaque to the user code; for LinuxThreads it is an encoded index into an array (usually between 0 and 64k; the first few threads are numbered around 32k and 16k). That looks plausible in hex or in decimal. For NPTL they are pointers and would look more plausible in hex. The number isn't really opaque to the user. The numbers have type `pthread_t' and can be printed by the user when debugging his program. It's the pthread_t type that is opaque. Ideally we'd use the the `pthread_t' type for the formatting of these values. But AFAIC hex is a good default. Mark