Run the program from the debugger prompt. Examine the values of program variables. When program execution suspends at the specified breakpoint, examine the values of program variables. If the variables do not provide you with any clues, try setting other breakpoints, executing program statements line by line, or tracing a variable's value during program execution. These give different levels of symbol information and optimization.
Some compilers optimize the object code to reduce the size of the program or to make it run faster.
For example, some optimization techniques eliminate certain variables. In addition to building symbolic information, the -g flag disables optimization of your program so that you an debug it more easily. For detailed information on compiling and linking, see the chapter on your language or your compiler documentation. Ladebug can debug programs with less than complete symbolic information. The following example shows how to compile and link a C program named eightqueens before using the debugger.