next up previous contents
Next: Multiple Source Code Directories Up: Code Debugging Previous: Code Debugging   Contents

Code Re-compilation

Any section of PSI3 code that needs to be debugged must first be re-compiled with the ``-g'' flag turned on. This flag is set in the MakeVars file in the directory above each module or library's source code directory. For example, to turn on debugging in the cscf program, one would first clean the existing object code out of the $prefix/src/bin/cscf directory using make clean. Then edit $prefix/src/bin/MakeVars, one directory above the cscf source code: set CDBG = -g and, optionally COPT = to turn off optimization flags. (For modules using C++, the analogous variables are CXXDBG and CXXOPT. Then re-compile the module. If debugging information is needed for a library routine as well, then follow this same procedure for the library in question. Technically, only the routines of interest need to be re-compiled, though it is frequently more convenient to simply re-compile the entire library or module.



psi 2003-01-07