Following question describe for windows How to create minidump for my process when it crashes?
But how can I create mini crash text dump on linux ?
You need to write a signal handler.
Here is a slide deck on how to do it:
http://www.scribd.com/doc/3726406/Crash-N-Burn-Writing-Linux-application-fault-handlers
Here is the code form the slide deck: