如何在gdb中禁用新线程/退出线程的消息?


70

我正在调试应用程序,并且收到很多这样的消息:

[New Thread 0x7fffde152700 (LWP 11142)]
[Thread 0x7fffde152700 (LWP 11142) exited]
[New Thread 0x7fff967fa700 (LWP 11143)]
[Thread 0x7fff967fa700 (LWP 11143) exited]
[New Thread 0x7fff967fa700 (LWP 11144)]
[Thread 0x7fff967fa700 (LWP 11144) exited]
[New Thread 0x7fff967fa700 (LWP 11145)]
[Thread 0x7fff967fa700 (LWP 11145) exited]
[New Thread 0x7fffde152700 (LWP 11146)]
[Thread 0x7fffde152700 (LWP 11146) exited]
[New Thread 0x7fffde152700 (LWP 11147)]
[Thread 0x7fffde152700 (LWP 11147) exited]
[New Thread 0x7fffde152700 (LWP 11148)]
[Thread 0x7fffde152700 (LWP 11148) exited]
[New Thread 0x7fffde152700 (LWP 11149)]
[Thread 0x7fffde152700 (LWP 11149) exited]
[New Thread 0x7fffde152700 (LWP 11150)]
[Thread 0x7fffde152700 (LWP 11150) exited]
[New Thread 0x7fffde152700 (LWP 11151)]
[Thread 0x7fffde152700 (LWP 11151) exited]
[New Thread 0x7fffde152700 (LWP 11152)]
[Thread 0x7fffde152700 (LWP 11152) exited]
[New Thread 0x7fffde152700 (LWP 11153)]
[Thread 0x7fffde152700 (LWP 11153) exited]
[New Thread 0x7fffde152700 (LWP 11154)]
[Thread 0x7fffde152700 (LWP 11154) exited]
[New Thread 0x7fff967fa700 (LWP 11155)]
[Thread 0x7fff967fa700 (LWP 11155) exited]
[New Thread 0x7fffde152700 (LWP 11156)]
[Thread 0x7fffde152700 (LWP 11156) exited]
[New Thread 0x7fffde152700 (LWP 11157)]
[Thread 0x7fffde152700 (LWP 11157) exited]

我几乎对这则消息不感兴趣。它们使读取其余输出变得更加困难。它们可以更改程序的计时行为,从而难以重现和调试种族危险。如何禁用这些消息?

Answers:


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.