next up previous contents
Next: Documentation Up: Code Debugging Previous: Code Re-compilation   Contents

Multiple Source Code Directories

The most difficult problem of debugging PSI3 code is that object code and source code generally reside in separate directories to allow storage of objects for several achitectures simultaneously. In addition, library codes are kept separate from binary (module) codes. If the code is compliled with gcc/g++, then this separation of source and object code is of no consequence because the compiler builds the full path to the source file directly into the object code. However, for non-gcc compilations, one must know how to tell the debugger where to find the sources.

Most interactive debuggers allow the programmer to specify multiple source code search directories using simple command-line options. For example, if one were debugging the cscf program and needed access to the libciomr.a library source code in addition to that of cscf, one could use gdb's ``dir'' command to search several source code directories:

dir \$PSI/src/lib/libciomr
Additionally, such commands can be placed in the user's $HOME/.gdbinit file. In dbx, the ``use'' command specifies multiple source directories.


next up previous contents
Next: Documentation Up: Code Debugging Previous: Code Re-compilation   Contents
psi 2003-01-07