From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,e162e642f571aa0 X-Google-Attributes: gidfee84,public From: Jeff Denham Subject: Re: Thread IDs Date: 1999/10/11 Message-ID: <38025047.7CE5276C@allaire.com>#1/1 X-Deja-AN: 535539150 Content-Transfer-Encoding: 7bit References: <7ti733$ler$1@nnrp1.deja.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@digex.net X-Trace: dca1-nnrp1.news.digex.net 939675791 207.86.119.34 (Mon, 11 Oct 1999 17:03:11 EDT) Organization: Allaire Corporation MIME-Version: 1.0 NNTP-Posting-Date: Mon, 11 Oct 1999 17:03:11 EDT Newsgroups: comp.unix.osf.osf1 karthik@cdotd.ernet.in wrote: > I need to know the following > > 1. Why is the value in 'tid' different from the value returned by > pthread_getsequence_np()? Is there any diff between the two? The 'tid' in the core file header is kernel thread ID of the faulting thread. Those values you're getting back from getsequence are IDs internal to the threads library. There's no connection between the two kinds of IDs. > 2. Is there any way to interpret the core file and find out the > location where it dumps core. In HP-UX, I start the debugger and pass > the name of the core file as a extra parameter. It automatically reaches > the location when the core dump occured. I tried the same ploy using > dxladebug. It did a $load and stopped. Didn't proceed ahead. That's not a 'ploy' -- it's how you debug core files with gdb, ladebug, and dbx. Both ladebug and dbx (assuming you have up-to-date versions that are know to work with the versions of the kernel and pthreads library that created the core file), are thread-smart to greater or lesser extents. Dbx only really knows about kernel threads (i.e., that TID in the file header), but will should a good stack trace for the faulting thread. But it won't know anything about the other user threads in the program that we're running at the time of the core dump. Ladebug, on the other hand, is much smarter about those other threads. It is fully integrated with the pthreads library can show you stack traces for every thread in existence at the time of the core dump. All, that said as way of background, it's impossible to say why ladebug isn't showing you *anything*. Was the program built with any debug symbols enabled, say -g3 at the least? Can you runt he program "live" under ladebug? __________________________________________________ Jeff Denham (jdenham@allaire.com) Allaire Corp: Resource-management software for building and managing fast, reliable web sites See us at http://www.allaire.com and http://www.brighttiger.com 125 Nagog Park Acton, MA 01720 Phone: (978) 263-5455 x177 Fax: (978) 263-5547