next up previous contents
Next: Following are possible causes Up: Debugging tools Previous: Debugging tools

Debugging the core dumps:

Core dump is the abnormal termination of the program due to malicious memory handling, due to a bug in the program. When a core dump occurs during the execution of a program, a file named core is created containing some information about the abnormalities. dbx uses this file to extract the information about the location of the core dump. We do not have to control anything because generation of the core file, is automatic.

To get the name of the function which caused the problem, we issue the command trace or simply t. This gives us the list of functions in their calling sequence with the most recently called function listed first, this function itself is the cause of the core dump.

The next logical step is to actually go inside the function by setting the break point and single step to determine the actual location of the problem. To facilitate the debugging the normal functions should not be more than 30 lines.



Sushil Prasad
Fri Oct 9 10:28:36 EDT 1998