mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Pthreadid, pid
@ 2005-06-30 13:14 KV Pavuram
  0 siblings, 0 replies; 2+ messages in thread
From: KV Pavuram @ 2005-06-30 13:14 UTC (permalink / raw)
  To: linux-kernel

Hello,

When i run a multi-threaded program from gdb, gdb
shows "New Thread XXXXXXXX (LWP LLLL)" for each new
thread created by the application.

However, when I run ps -aelfm, the output shows each
thread of this application but with a different PID.

And, getpid () in each thread inside the application
always retreives the same PID.

What is the relation between LWP is given by GDB, PID
shown by ps call and the PID returned by getpid ().

Is there any system call to obtain one from the
other??

The problem occurs when i run strace on one the
threads using PID given by ps command. I cant run
application through GDB for strace to work. So i am
not able to match the strace output to a particular
thread in my application. 

Thanks.
Pav.


		
__________________________________________________________
How much free photo storage do you get? Store your friends 'n family snaps for FREE with Yahoo! Photos http://in.photos.yahoo.com

^ permalink raw reply	[flat|nested] 2+ messages in thread
[parent not found: <200506302001.j5UK1L7w008821@cichlid.com>]

end of thread, other threads:[~2005-07-01  5:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-30 13:14 Pthreadid, pid KV Pavuram
     [not found] <200506302001.j5UK1L7w008821@cichlid.com>
2005-07-01  5:02 ` KV Pavuram

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®