From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12142 invoked by alias); 23 Apr 2010 14:29:25 -0000 Received: (qmail 12111 invoked by uid 22791); 23 Apr 2010 14:29:24 -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-pt3.poste.it (HELO relay-pt3.poste.it) (62.241.4.129) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Apr 2010 14:29:20 +0000 Received: from ssabatini.reitek.com (93.63.174.176) by relay-pt3.poste.it (8.5.121.01) (authenticated as stefano.sabatini-lala@poste.it) id 4BD0D53B0001F0AB for gdb@sources.redhat.com; Fri, 23 Apr 2010 16:29:17 +0200 Received: from stefano by ssabatini.reitek.com with local (Exim 4.71) (envelope-from ) id 1O5JsY-0001ER-Jh for gdb@sources.redhat.com; Fri, 23 Apr 2010 16:29:14 +0200 Date: Fri, 23 Apr 2010 14:29:00 -0000 From: Stefano Sabatini To: gdb Mailing List Subject: Re: pthread_t ids of threads not showed by "thread info" Message-ID: <20100423142914.GA4719@geppetto> Mail-Followup-To: gdb Mailing List References: <20100422151855.GA3128@geppetto> <20100422154404.GB3128@geppetto> <20100422165924.GA1109@host0.dyn.jankratochvil.net> <20100423075135.GA3297@geppetto> <20100423102506.GA21618@host0.dyn.jankratochvil.net> <20100423142115.GA4538@geppetto> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100423142115.GA4538@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/msg00105.txt.bz2 On date Friday 2010-04-23 16:21:15 +0200, Stefano Sabatini wrote: > On Friday 2010-04-23 12:25:06 +0200, Jan Kratochvil wrote: > > On Fri, 23 Apr 2010 09:51:35 +0200, Stefano Sabatini wrote: > > > Could you elaborate on that? I mean are you saying that it is possible > > > but currently unimplemented? > > > > Yes, try this on a core file: > > > > define threads > > set $ofs = (long) &((struct pthread *) 0)->list > > set $list = (void *) &$arg0 > > set $link = (void *) $arg0.next > > while $link != $list > > set $this = (struct pthread *)($link - $ofs) > > p $this > > #p (struct pthread *) $this->header.self > > p $this->pid > > p $this->tid > > #p *$this > > set $link = (void *) $this->list.next > > end > > end > > threads __stack_user > > (gdb) define threads ... > > (gdb) threads __stack_user > No symbol "pthread" in current context. Sorry that was after some modifications from mine, what I got with your code is: (gdb) threads __stack_user No struct type named pthread. Regards