【发布时间】:2010-11-10 01:38:11
【问题描述】:
我正在开发一个多线程应用程序,我想使用 GDB 对其进行调试。
问题是,我的一个线程不断因消息而死:
pure virtual method called
terminate called without an active exception
Abort
我知道该消息的原因,但我不知道它出现在我的线程中的哪个位置。回溯真的很有帮助。
当我在 GDB 中运行我的应用程序时,它会在每次暂停或恢复线程时暂停。我希望我的应用程序继续正常运行,直到其中一个线程因该异常而死亡,此时一切都应该停止,以便我可以获得回溯。
【问题讨论】:
-
GDB 暂停时报告什么信号?您应该能够运行类似
handle SIGUSR1 pass noprint nostop的命令
标签: c++ debugging gdb polymorphism multicore