debugging threaded apps. thread ID missing in corefile.

Daniel Jacobowitz drow@false.org
Tue Jun 7 00:09:00 GMT 2005


Please don't reply to unrelated messages to post to the list.

On Mon, Jun 06, 2005 at 05:33:09PM -0500, Manoj Iyer wrote:
> 
> Regarding debugging threaded apps, gdb does not display the pthread id (ID
> returned by pthread_self() ) when reading information from a corefile.

Yes.  You can find information about this decision in the list
archives.  We need to use libthread_db.so.1 to retrieve thread IDs, and
we do not have a graceful way to use it for only core dumps which
belong to the native system (as opposed to sysrooted or cross core
dumps).

> Where as when debugging the program live it is able to display the pthread
> id (I dont know why the ID is a negative number, could be a bug?).

Not really.  The ID is a pointer above 0x80000000, used by the
implementation.

-- 
Daniel Jacobowitz
CodeSourcery, LLC



More information about the Gdb mailing list