[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: core files?



Hans-Peter Nilsson wrote:
> 
> > From: Adam Felson <afelson@xxxxxxx.com>
> > Date: Thu, 10 May 2001 08:13:03 -0600
> 
> > The problem is that there's no way to determine where the segfault occurs.
> > Are there compiler/linker options for enabling core dumping?
> 
> Compiler or linker options are not applicable.  I don't know
> what other things apply, like kernel configury.

The file os/linux/include/asm-cris/elf.h has #undef USE_ELF_CORE_DUMP. 
I did some preliminary testing by defining USE_ELF_CORE_DUMP and
possibly some other changes which slip my mind right now, but got a
kernel panic when it dumped the core file.  

Good news was that the core dump was indeed analyzable by gdb, i.e. it
could deduce the location in the program that caused the segfault.  In
case you want to try enabling it yourself, remember to change the core
file size from the default value 0 to something else with the setrlimit
system call.  I don't think ash or sash have ulimit built in.

> You might want to look into using gdb.  I haven't done so
> myself, but there's info at
> <URL:http://developer.axis.com/software/tools/gdb-cris/>.

Yes, running the application under gdbserver + gdb-cris should tell you
exactly where the segfault occurs (and also the function call chain that
led to it).

-- 
Orjan Friberg              E-mail: orjan.friberg@xxxxxxx.com
Axis Communications AB     Phone:  +46 46 272 17 68