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) | Rearranges code to optimize your program’s execution. Some compilers won’t let you use the -O option and the -g option at the same time. Even if your compiler lets you use the -O option, don’t use it when debugging your program, since strange results often occur. | After you finish debugging your program. |
multi-process programming library (usually dbfork) | Linking with dbfork defines TotalView-specific symbols that direct the debugger to follow fork() and vfork() system calls. In some cases, you need to use the -lpthread option. For more information about dbfork, see “Linking with the dbfork Library” contained in the “Compilers and Platforms” Chapter of the TotalView for HPC Reference Guide. | Before debugging a multi-process program that explicitly calls fork() or vfork() and for which you want TotalView to always attach to the child processes. |
Compilers and platforms | |
The dbfork library | |
Controlling TotalView’s behavior for fork, vfork and execve handling | |
Assembler code |