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 Thursday 2010-04-22 18:59:24 +0200, Jan Kratochvil wrote:
> On Thu, 22 Apr 2010 17:44:04 +0200, Stefano Sabatini wrote:
> > 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.
> 
> Yes, IIRC GDB does not use linux-thread-db.c (libthread_db) for core files.
> `info threads' displays LWPs (and not real threads) in such case.
> 
> 
> > May be possible that it is not possible to extract the pthread_t
> > info from a core file?
> 
> LWPs do not have associated pthread_t.
> 
> > Can you explain why?
> 
> IIRC I tried once to add linux-thread-db.c for core files but for some reason
> it was not completely trivial and I rather debugged the specific case by hand
> iterating some pthread_t structures for that crash.

Could you elaborate on that? I mean are you saying that it is possible
but currently unimplemented?

I'm in a situation where I need that feature (having a core with a
deadlock, I know which are the pthread_t of the involved threads but I
cannot associate them with the corresponding gdb threads), so I'll file
a feature-request or maybe will try myself to implement the feature.

> Regards,

Thanks, regards.


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