HP Fortran Programmer's Guide (March 2010)
Debugging
Stripping debugging information
Chapter 4124
Stripping debugging information
Programs compiled with HP Fortran include minimal debugging information in the
executable program. This information consists of a symbol table—a list of all the symbols in
your program and their offset addresses. The symbol table provides the information needed to
produce a procedure traceback. It is also used by the debugger and by the CXperf performance
analysis tool.
However, the symbol table is not the same as the debugging information that is added to your
program when you compile with the -g option. The symbol table is added to an executable
even if the program is not compiled with the -g option.
If the size of executable is critical to your application, you can use the +strip option to
remove symbol table information from the production version of your program. If you compile
and link on separate command lines, you must use the +strip option on both command lines.
Instead of recompiling with +strip, you can use the strip utility, which removes all
debugging information, including the symbol table.
If the size of your executable is not important, you may want to retain the symbol table in the
production version of your program. This table can be used by the debugger to provide
minimal debugging. If a program has not been compiled with -g and does not include a
symbol table, it is unusable by the debugger. Also, without the information provided by the
symbol table, a procedure traceback displays virtual addresses only.
The amount of code that the symbol table information that adds to an executable is
considerably less than the amount that compiling with -g adds. For descriptions of the -g and
+strip options, refer to the HP Fortran Programmer’s Reference. For information about the
strip utility, refer to the strip(1) man page.