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 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
threads stack_used
> or maybe will try myself to implement the feature.
That would be great.
Thanks,
Jan