This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: pthread_t ids of threads not showed by "thread info"
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