Getting stacktrace of all threads without attaching GDB

后端 未结 6 876
甜味超标
甜味超标 2021-02-13 16:24

Is there a way to print stacktrace of all threads without attaching GDB?

Or is there a command which I can use as gdb batch mode to print stacktrace of all threads?

6条回答
  •  忘掉有多难
    2021-02-13 16:45

    I've been using this:

    pidof program | xargs -n1 sudo gdb --batch -ex "thread apply all bt" -p
    

提交回复
热议问题