Re: Core files

From: Rob Stewart (ao134@freenet.toronto.on.ca)
Date: 06/07/96


On Fri, 7 Jun 1996, Melen wrote:

> I've got a problem... My mud has been extremely modified and I seem to 
> have developed a bug in the group code, specifically when the group kills 
> the mob the mud crashes. Now, this would be easy to pinpoint if my mud 
> wrote core files when it crashed. My question is, then... How do I get 
> linux to write core files when a program seg faults?
> Or some other way to trace the bug down. My version of linux has NEVER 
> written core files for some reason and research it as I have, I still 
> haven't found an answer. So...
> 1) How can I make circle output a core file (I run Linux Kernel 1.2.8 (I 
> know old;))
> or
> 2) What other way can I use to pinpoint the exact function or maybe even 
> line of code causing the crash?
> 

	Well, since your running linux, and having the same problems I 
was having I'm assuming your using bash.  Switch to tcsh and create a 
file .cshrc, which contains the line limit coredumpsize unlimited.  From 
there, a core file will generate in yourcircledir/lib/core, and you type 
gdb ./bin/circle ./lib/core, and that will enter a debugger.  From there, 
it should show you a line of code that crashed it, (type list to see more 
of the code, and back will list the functions up to the crash).. 



This archive was generated by hypermail 2b30 : 12/18/00 PST