0

在 cgdb 中运行一个多线程应用程序(在调度程序锁定(关闭)、不间断(关闭)等方面使用 gdb 默认值),我得到了这些奇怪的“无提示”提示,如下所示:

[New Thread 0x7ffff0bfb700 (LWP 16513)]                                                                                                                                                      [1964/1964]
[Thread 0x7ffff0bfb700 (LWP 16513) exited]
[Thread 0x7fffefbf9700 (LWP 16510) exited]
[Thread 0x7ffff13fc700 (LWP 16512) exited]
Start it from the beginning? (y or n)
[New Thread 0x7fffe4d55700 (LWP 16623)]
[Thread 0x7fffe4d55700 (LWP 16623) exited]
[New Thread 0x7fffe4d55700 (LWP 16624)]
[Thread 0x7fffe4d55700 (LWP 16624) exited]
[New Thread 0x7fffe4d55700 (LWP 16625)]
[New Thread 0x7ffff13fc700 (LWP 16626)]
[New Thread 0x7fffefbf9700 (LWP 16627)]
[New Thread 0x7ffff0bfb700 (LWP 16628)]
[Thread 0x7ffff0bfb700 (LWP 16628) exited]
[Thread 0x7fffe4d55700 (LWP 16625) exited]
[Thread 0x7fffefbf9700 (LWP 16627) exited]
Start it from the beginning? (y or n) y
The program being debugged has been started already.

该程序具有相当广泛的日志记录,并且肯定不会重新启动。似乎运行正常。

不响应提示似乎很好。程序继续运行。响应提示(在程序运行时应该不可能)产生最后一行奇怪的输出,这应该是第一个提示的前导。

有任何想法吗?作为参考,我的完整 .gdbinit:

handle SIGPIPE nostop
set print object on
set print pretty on
set print asm-demangle on
set print symbol on
set pagination off
set history filename ~/.gdb_history
set history save on
set history expansion on
set history size 10000

不确定 cgdb 是否是这里的一个因素。

4

0 回答 0