Hello bhupendra_saini,
>we can see where that main thread is stuck or where it is right now
launch gdb ... on gdb prompt, use attach command
attach <pid>
Where pid is the pid of your process.
Regards,
sunnycoder
Main Topics
Browse All TopicsHi,
My code is in C++ on sun solaris server.
Code is in multi threaded.
what problem we are facing that it seems lik main thread hang somewhere.
So we just want to know is there any command in gdb or any other by which
we can see where that main thread is stuck or where it is right now.
bash-2.05$ ps -eaf|grep ipcl
mca 5646 5643 0 12:11:01 pts/29 0:51 ./ipcl
ipcl is process name
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: Infinity08Posted on 2008-07-31 at 01:29:24ID: 22127835
where ;)
gdb your_application
(gdb) run
now wait until it is blocked, then :
(gdb) where