dir ~/psi3_dist/src/bin/cscf ~/psi3_dist/src/lib/libciomrAdditionally, such commands can be placed in the user's .gdbinit file. In dbx the ``use'' command specifies multiple source directories. More recent versions of the gdb debugger can determine the full path name of each source file compiled with a -g flag. This is very convenient and makes gdb the preferred debugger in general.
Psi 3 Fortran modules can be significantly more difficult to debug. This is
because the Fortran source code (.F suffix) must be preprocessed by
psipp before it is passed to the compiler (see section
).
Additionally, the preprocessed files (.f suffix) are usually
automatically deleted when the compilation stops due to the make
program's defaults (all such intermediate files are deleted). So, if the
programmer tries to use the unprocessed code with the debugger, line
numbers won't match and basically he or she will be wasting his or her
time! To keep the preprocessed source files, tt make must be told that
they are important; add the following line to the Makefile in the
Fortran module's object code directory:
.PRECIOUS: %.fThis is a GNU make directive which prevents deletion of all intermediate .f files when the compilation stops. Then add the current directory to the debugger's source directory search path, and plow ahead. Note, however, that any changes made to .f files must be duplicated the corresponding unprocessed source file to be permanent.