How to use a core dump file

Hi All,

May be it is a stupid question, but, I would like to know what is the advantage using a core dump file at the moment of debugging using gdb.

I know a core dump has information about the state of the application when it crashed, but, what is the difference between debugging using the core dump file and use gdb without it.

Thank you!!

You can backtrace the core file and not wait for ten minutes for the new run of the code to stackdump. You can find the exact line where the fault occurred.

If you are trying to locate an errant out-of-bounds write to a varaible, then use electric fence. IT is linked at run time. You can see the results either in gdb or from the output of a run.

Since I was making a test using only a main function I couldn't realize the advantages. Now, I've made a test using several function calls and I can see the difference of using a core dump file.

Thank you very much!