This document contains tips for debugging various types of scripts or programs.
Debugging C Programs
Debugging Core Files
A core file is a copy of memory a program was using when it terminated abnormally. This information is used to "debug" problems with the program as the user can examine the state of the program when it crashed. To find out what program the core file came from type:
% file core
Once you have determined the source of the core file you can remove it. If you get frequent core dumps from a specific system program please send email to firstname.lastname@example.org
to report the problem. If you are developing a program and you wish to debug it using a core file you can use one of two programs, gdb and dbx. One of the following will work:
% gdb PROGRAM -core core % dbx PROGRAM
Both of these debuggers have "on-line" help. You may only obtain limited debugging information from your program and it's core files unless you compile your program with debugging information using the "-g" option. See the page on compiling for more information.
Debugging Perl Scripts
Debugging CGI Scripts
See Web Info: How to Debug CGI Programs.