的main.cpp
#include <stdexcept>
int main()
{
throw std::runtime_error("AAAA");
}
我生成并运行exe文件:
g++ -g main.cpp
a.exe
我在屏幕上看不到输出。我看不到核心文件。
我也跟着this post,但它没有用。
在cygwin下似乎也不存在ulimit
。
更新
ulimit -a
的输出:
在CMD中:
>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
答案 0 :(得分:0)
刚刚检查过,我完全创建了核心文件。请提供ulimit -a
的输出。除此之外,我不确定你有什么路径,所以,请运行二进制文件./a.exe
以获得它的显式路径。