通过cygwin生成核心转储
generate core dump via cygwin
main.cpp
#include <stdexcept>
int main()
{
throw std::runtime_error("AAAA");
}
我生成并运行exe文件:
g++ -g main.cpp
a.exe
我在屏幕上看不到任何输出。我看不到核心文件。
我也关注了这个帖子,但它没有起作用。
似乎ulimit
在cygwin下也不存在。
更新
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
刚刚检查过,我认为核心文件已经完美创建。请提供ulimit -a
的输出。除此之外,我不确定你有什么路径,所以,请以./a.exe
的形式运行二进制文件,以获得它的显式路径。
相关文章:
- 如何找出GDB的SIGTRAP核心转储的根本原因
- C++映射分割错误(核心转储)
- 在c++中初始化矩阵时出现分段错误(核心转储)
- 在c++中键入向量中的所有值后,得到分段错误(核心转储)
- 浮点异常(核心转储)#694457
- 分段错误(核心转储)但无法弄清楚
- 链接到libkcapi时没有核心转储
- 分段错误(核心转储) - 使用 SavedModel 的 Tensorflow C++ API 进行推断
- 在基数排序中,我得到 munmap_chunk():无效指针和中止(核心转储).为什么?
- C++指针无法在函数外部传递值和分段错误(核心转储)错误
- 合并排序:分段错误核心转储
- C++:分段错误(核心转储)
- 从 pybind11 构建导入模块时出现"分段错误(核心转储)"
- 如何使用 lldb 在曼扎罗中调试 lz4 文件格式的核心转储?
- qt C++命令行代码中的分段错误(核心转储)
- 从文件中读取的数据,但发生核心转储错误
- googletest:测试基类具有纯虚拟方法的派生类时的核心转储
- C++ atof - 分段错误(核心转储)
- Linux C 只禁止我的程序使用核心转储
- 为什么我的代码包含错误分段错误(核心转储)?