[OCLUG-devel] ICFP Contest 2004

Stephen Crane scrane at cornerkitchenpeddler.com
Wed Jun 9 16:11:12 PDT 2004


On Wednesday, June 09, 2004 03:53 pm, you wrote:
> On Wed, 2004-06-09 at 15:40, Stephen Crane wrote:
> > I'm not familiar with ulimit. What is it? I'm kinda new to *nix
> > programming, so sorry if this is a dumb question.
>
> Ah, then you probably are not familiar with core files (you are going to
> love those!). First of all, when in doubt, check the man page. Of course
> in this case the ulimit man page will only be somewhat enlightening.
> What you really want is the "bash" man page (search for ulimit).
>
> ulimit allows you to set limits on processes/users. If you do "ulimit
> -a" it displays all the settings. One of them is "maximum core files".
> Since core files are normally only a concern to developers, most distros
> these days set the limit on core file size to 0, effectively removing
> them. You'll want to change this.
>
> In the Unix world, when a process dies for an odd reason, it dumps the
> contents of it's memory to the filesystem, so that a developer can
> basically look at a snapshot of the process at the time it crashed. This
> comes in real handy for post-mortem debugging.
>
> To load up a core file in gdb, you typicall invoke it with the following
> syntax:
>
> gdb <executable name> <core file name>

Very cool. What would you suggest for my max core file size? Is unlimited the 
best for debugging? And where do I find these dumps? I looked at the bash man 
page and found the section on ulimit, I just can't find much on core dumps in 
there ;-)

Thanks for the tip,
Stephen



More information about the OCLUG-devel mailing list