如何获取GDB中所有线程的回溯? [英] How do I get the backtrace for all the threads in GDB?

查看:141
本文介绍了如何获取GDB中所有线程的回溯?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

GDB中是否有与WinDbg的!process 0 7"命令等效的命令?

Is there an equivalent command in GDB to that of WinDbg's "!process 0 7"?

我想提取转储文件中的所有线程以及它们在GDB中的回溯. 信息线程"不输出堆栈跟踪.那么,有没有可以执行的命令?

I want to extract all the threads in a dump file along with their backtraces in GDB. "info threads" doesn't output the stack traces. So, is there a command that does?

推荐答案

通常,使用backtrace获取当前线程的堆栈,但是如果有必要获取所有线程的堆栈跟踪,请使用以下命令.

Generally, the backtrace is used to get the stack of the current thread, but if there is a necessity to get the stack trace of all the threads, use the following command.

thread apply all bt

这篇关于如何获取GDB中所有线程的回溯?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆