tty*_*ty6 4 c++ linux debugging qt multithreading
我正在从 gdb 运行我的 Qt 应用程序,并且我想在新线程创建时停止。(当 gdb 打印消息时[New Thread address (LPW number)].
我已经设置了断点b __pthread_create_2_1。这使我能够捕捉到大部分新线程的打印。但我仍然有一些未捕获的新线程。我还能做什么来捕捉他们的创作?
小智 7
可能您想要的是
catch syscall clone(请参阅此处https://sourceware.org/gdb/onlinedocs/gdb/Set-Catchpoints.html)
另外,默认情况下,如果发生断点或捕获点事件,gdb 会让其他线程继续执行。所以也许您想看看 All-Stop 模式(https://sourceware.org/gdb/onlinedocs/gdb/Thread-Stops.html)
| 归档时间: |
|
| 查看次数: |
1387 次 |
| 最近记录: |