Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

1 Answer
Ankith Reddy

A process dumps core when it is terminated by the operating system due to a fault in the program. The most typical reason this occurs is that the program accessed an invalid pointer value like NULL or some value out of its memory area. As part of that process, the operating system tries to write our information to a file to allow us to analyze what happened.

This core can be used as follows to diagnose and debug our program:

The core is dumped to the /proc/sys/kernel directory by default. To debug a core, th program must be compiled with the -g option. Once you have the core run gdb:

$ gdb  nameOfExecutable core

This will open the core in gdb and now you can proceed with your debugging. If you don't know how to use gdb, you can use this link to learn more: https://www.ibm.com/developerworks/library/l-gdb/

Advertisements

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.