Re: Debugging core file?



On 2007-11-03, Zach <netrek@xxxxxxxxx> wrote:
I compiled a game client and it crashed (segmentation fault) resulting
[...]
zu22@netrek:~/netrek/cow/build$ gdb ./netrek core
[...]
warning: Can't read pathname for load map: Input/output error.

Could it be that gdb can't find the sources for the program? For example
you are running it on different computer, or you have removed the
sources.

[...]
(gdb) bt
#0 0x0805cc99 in map ()
#1 0x08083757 in redraw ()
[...]

If sources were available, then you could display exact line that caused
the crash and even look at the variables. Maybe that could give you a
hint on what is going on.


I used cscope to check map() and it's a pretty big function with
[...]

cscope can't protect you against memory abuse errors.

--
Minds, like parachutes, function best when open
.