如何使程序倾倒在Linux的核心是什么? [英] How to enable program to dump core on linux?
本文介绍了如何使程序倾倒在Linux的核心是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望程序在转储核心崩溃在Linux上用于调试的目的。我如何启用此功能 - 这是否需要在程序中的任何变化
I want the program to dump core on crash on Linux for debugging purpose. How do I enable this feature - does this require any changes in the program ?
推荐答案
您可以通过这样做能够为自己:
You can either enable it for yourself by doing:
ulimit -c unlimited
如果您希望这是持久其放到〜/ .profile文件
If you want this to be persistent put it in ~/.profile
Alterantively,您可以启用核心转储为系统上的所有用户把下面的行/etc/sercurity/limits.conf(至少在Ubuntu):
Alterantively, you can enable core dumps for all users on the system put the following line in /etc/sercurity/limits.conf (at least on ubuntu):
* 0 core -1
这篇关于如何使程序倾倒在Linux的核心是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文