This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pthread_t ids of threads not showed by "thread info"


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.

[...]

Regards.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]