运行程序时报错:

During startup program terminated with signal ?, Unknown signal.

解决方法:

新建文件 ~/.gdbinit,添加内容如下:

set startup-with-shell off