Compiling Programs

Before you start to debug a program, you must compile the program with the appropriate options and libraries for your situation. The following table presents some general considerations, but you should check Compilers and Platforms to determine the exact syntax and any other considerations.

Compiler Option or Library
What It Does
When to Use It
Debugging symbols option (usually -g)
Generates debugging information in the symbol table.
Before debugging any program with TotalView.
Optimization option (usually -O)
Moves code to optimize execution of program.

Some compilers do not let you use the -O option with the -g option.
Even if you can, we recommend against it because using the -O option when debugging your program can produce strange results.
After you finish debugging your program with TotalView.
Multiprocess programming library (usually dbfork)
Uses special versions of the fork() and execve() system calls.

Using dbfork is discussed in Linking with the dbfork Library.
Before debugging a multiprocess program that explicitly calls fork() or execve().

Your installation may have its own guidelines for compiling programs. Your site administrator may have made a link to information located on your site.

 
 
 
 
support@etnus.com
Copyright © 2001, Etnus, LLC. All rights reserved.
Version 5.0