|
|
HP/DDE Debugger User's Guide: HP 9000 Series 700/800 Computers > Chapter 2 Compiling, Loading, and Executing
the Target Program Preparing the Target Program |
|
To prepare a target program for debugging, compile the program using the compiler's option for debugging, usually -g. A compiler's debugging option causes it to add information needed by the debugger to the program's object file. For example:
You can find average.c, a sample program that you can practice on, in the directory /opt/langtools/dde/examples. In that directory, you can also find sources for average in FORTRAN, C++, and Pascal. If you attempt to debug a program that was compiled without the debugging option, the debugger displays a message similar to the following:
Some of the limitations on debugging code compiled without the -g option are:
Shared libraries, which are often compiled without -g, are a special case. See “Debugging Shared Libraries ” for more information. |
|