447 Subj : Re: pthreads (linux) questions To : comp.programming.threads From : Joe Seigh Date : Fri Aug 19 2005 08:15 am jacob navia wrote: > Joe Seigh wrote: > > > Threads don't have pids any more. What non standard non portable > >> thing are you trying to do? >> > > I want to print the stack of an application when it crashes. > > I do not care about portability I just want it to run > under linux 64 bit. This programs are never portable anyway. > > Apparently there is no documentation isn't it? > > Again: > Under 32 bits I used those symbols in the pthread library > to get info about the running threads. > I would attach to each thread in turn, and using ptrace I would read > their descriptors, what allowed me to print the state of each > thread at the moment of the crash. > > How do I do that under 64 bits? > gdb on the core file should work. Or you could look into the /proc//tasks/ directory to get the kernel thread ids. -- Joe Seigh When you get lemons, you make lemonade. When you get hardware, you make software. . 0