>Your core dump is most likely caused by you writing or accessing memory,
>probably with a pointer, that does not belong to your process.
>The easiest way to debug this, IMHO, is to sprinkle printfs throughout
>the code followed by getchar's to pause the code until you press a key.
It depends. There are some cases when this works, and there are some
cases where it doesn't. Generally, things like this can be solved
with the use of gdb (or any other source de*; I mention gdb
because if it's not the only one on the Linux platform, it's by far
the most widely used), and you don't want to build herds of printfs
until you reach a situation where gdb just doesn't work (the program
being too big for gdb[1], gdb not having enough smarts to look for
what you need to find, or the existance of the debugging code
getting rid of the bug.)
____
david parsons \bi/ Printf is awfully intrusive for debugging.
\/
[1 I tried to debug a bizarre i/o crash in a quantum chemistry
program with gdb. this crash would only happen after pushing
several gigabytes to and from a fortran unit, and I managed to
track it down to corruption in the file descriptor table in
the fortran library. So then I set a watchpoint on the table
and started to run the program. Bad Idea; I only had 64mb of
real memory and 256mb of swap, and gdb et every last byte of
it and hung the system up like a drum.]