主要.cpp
#include <stdexcept>
int main()
{
throw std::runtime_error("AAAA");
}
我生成并运行 exe 文件:
g++ -g main.cpp
a.exe
我在屏幕上看不到任何输出。我看不到核心文件。
我关注了this post也没有用。
看来ulimit
在cygwin下也不存在。
更新
ulimit -a
的输出:
在命令行中:
>ulimit -a
'ulimit' is not recognized as an internal or external command,
operable program or batch file.
在 bash 中:
$ ulimit -a
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
open files (-n) 256
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) 2032
cpu time (seconds, -t) unlimited
max user processes (-u) 256
virtual memory (kbytes, -v) unlimited
最佳答案
刚刚检查了一下,核心文件是我完美创建的。请提供 ulimit -a
的输出。除此之外,我不确定你有什么路径,所以,请以 ./a.exe
运行二进制文件以获得它的显式路径。
关于c++ - 通过 cygwin 生成核心转储,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34737162/