From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4675 invoked by alias); 22 Apr 2010 15:44:23 -0000 Received: (qmail 4636 invoked by uid 22791); 22 Apr 2010 15:44:17 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from relay-pt2.poste.it (HELO relay-pt2.poste.it) (62.241.5.253) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Apr 2010 15:44:10 +0000 Received: from ssabatini.reitek.com (93.63.174.176) by relay-pt2.poste.it (8.5.121.01) (authenticated as stefano.sabatini-lala@poste.it) id 4BCF83F20001EEBC for gdb@sources.redhat.com; Thu, 22 Apr 2010 17:44:07 +0200 Received: from stefano by ssabatini.reitek.com with local (Exim 4.71) (envelope-from ) id 1O4yZQ-0000ye-5H for gdb@sources.redhat.com; Thu, 22 Apr 2010 17:44:04 +0200 Date: Thu, 22 Apr 2010 15:44:00 -0000 From: Stefano Sabatini To: gdb Mailing List Subject: Re: pthread_t ids of threads not showed by "thread info" Message-ID: <20100422154404.GB3128@geppetto> Mail-Followup-To: gdb Mailing List References: <20100422151855.GA3128@geppetto> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100422151855.GA3128@geppetto> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00080.txt.bz2 On date Thursday 2010-04-22 17:18:55 +0200, Stefano Sabatini wrote: > Hi all, > > $ gdb --version > GNU gdb (GDB) 7.1 > > (gdb) info threads > * 9 Thread 25919 0x0040cc7d in PSafeObject::LockReadOnly (this=0xb6d3d1d8) > at ../common/safecoll.cxx:144 > 8 Thread 25920 0x00885402 in __kernel_vsyscall () > 7 Thread 25921 0x00885402 in __kernel_vsyscall () > 6 Thread 25922 0x00885402 in __kernel_vsyscall () > 5 Thread 25927 0x00885402 in __kernel_vsyscall () > 4 Thread 25928 0x00885402 in __kernel_vsyscall () > 3 Thread 16215 0x00885402 in __kernel_vsyscall () > 2 Thread 16216 0x00885402 in __kernel_vsyscall () > 1 Thread 25917 0x00885402 in __kernel_vsyscall () > (gdb) help info thread > IDs of currently known threads. > > This shows the gdb thread number, the process ID and I don't know > what's contained in the fourth column, but that's for sure cannot be > the same as the pthread_t id as it is the same for all the threads. > > On another machine I get this output: > 3 Thread 0xb7642b70 (LWP 3334) (running) > 2 Thread 0xb7e43b70 (LWP 3333) (running) > * 1 Thread 0xb7e446c0 (LWP 3327) 0xb7fe1424 in __kernel_vsyscall () > > Can you explain the differences, and why are there in the first place? > > Also in the first scenario I cannot get the pthread_t information, which > is shown in the third column of the second scenario. The difference between the first and the second scenario is that the first output was issued debugging a core, the second one by running a process through gdb run. May be possible that it is not possible to extract the pthread_t info from a core file? Can you explain why? [...] Regards.