From: KV Pavuram <kvpavuram@yahoo.co.in>
To: linux-kernel@vger.kernel.org
Subject: Pthreadid, pid
Date: Thu, 30 Jun 2005 14:14:19 +0100 (BST) [thread overview]
Message-ID: <20050630131419.43354.qmail@web8409.mail.in.yahoo.com> (raw)
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
next reply other threads:[~2005-06-30 13:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-30 13:14 KV Pavuram [this message]
[not found] <200506302001.j5UK1L7w008821@cichlid.com>
2005-07-01 5:02 ` KV Pavuram
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050630131419.43354.qmail@web8409.mail.in.yahoo.com \
--to=kvpavuram@yahoo.co.in \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®