Reputation: 2923
I'm working with threads and one (or more) of my thread(s) is/are stuck and never ends. The problem is that I can't find which one.
So I'd like to know if there is a way to find it's ID
, the same ID that is shown in PS
Linux command. If there isn't a way, how could I find which thread is stuck ??
Obs: Already checked the pthread_self()
and it's not what I'm looking for.
Upvotes: 3
Views: 3637
Reputation: 94
Using GDB debugger we can find out which thread is in blocking state.
gdb your_file_executable
info threads
" info threads " will give information about the threads which is spawned/running . w
Upvotes: 5