Search Path Read-Only Variables
You can include the following read-only variables within the SOURCE_SEARCH_PATH, OBJECT_SEARCH_PATH, and EXECUTABLE_SEARCH_PATH variables. TotalView sets the values for these variables based on information provided by compilers or that you provide when you enter pathnames to TotalView.
COMPILATION_DIRECTORY
The COMPILATION_DIRECTORY variable is the result of TotalView applying the following rules:
-
If COMPILATION_DIRECTORY_COMPONENT is an absolute path, then COMPILATION_DIRECTORY is the same as COMPILATION_DIRECTORY_COMPONENT.
-
If COMPILATION_WORKING_DIRECTORY ends in a slash (/), then COMPILATION_DIRECTORY is as follows:
${COMPILATION_WORKING_DIRECTORY}${COMPILATION_DIRECTORY_COMPONENT}
-
Otherwise, COMPILATION_DIRECTORY is as follows:
${COMPILATION_WORKING_DIRECTORY}/${COMPILATION_DIRECTORY_COMPONENT}
COMPILATION_DIRECTORY_COMPONENT
The COMPILATION_DIRECTORY_COMPONENT variable contains the path component for the file that is named on the compilation command. For example, assume a program compiled in the following way:
cc -g src/test/hello.c
In this example, COMPILATION_DIRECTORY_COMPONENT would be src/test. This variable can be empty because not all compilers add this information to the generated debug information.
COMPILATION_WORKING_DIRECTORY
The COMPILATION_WORKING_DIRECTORY variable contains the full pathname of the directory in which the compiler was invoked. This variable can be empty because not all compilers add this information to the generated debug information.
EXECUTABLE_DIRECTORY
The value of EXECUTABLE_DIRECTORY is the result of TotalView applying the following rules:
-
If EXECUTABLE_DIRECTORY_COMPONENT is an absolute path, then EXECUTABLE_DIRECTORY is the same as EXECUTABLE_DIRECTORY_COMPONENT.
-
If EXECUTABLE_DIRECTORY_COMPONENT is not absolute, then EXECUTABLE_DIRECTORY is EXECUTABLE_WORKING_DIRECTORY joined with EXECUTABLE_DIRECTORY_COMPONENT.
The rules for entering information here are similar to those for entering information for COMPILATION_DIRECTORY. Note that you cannot set these values using dset.
Example
If EXECUTABLE_WORKING_DIRECTORY is /lib and EXECUTABLE_DIRECTORY_COMPONENT is ../bin, the EXECUTABLE_DIRECTORY is as follows:
/lib/../bin
EXECUTABLE_DIRECTORY_COMPONENT
The EXECUTABLE_DIRECTORY_COMPONENT variable contains the executable file’s directory name. This directory name can be either absolute or relative.
You can enter an executable file name in several places. For example, you can enter it on the command line, as an argument to the dload or dattach CLI commands, and in the File > Debug New Program dialog box (and other dialogs that configure new sessions from the File menu).
If the executable file name contains a slash (/) path separator, TotalView does not search for the executable file. Instead, it uses this name, setting EXECUTABLE_DIRECTORY_COMPONENT to the directory portion of the provided name.
If an executable file name does not contain a path separator, TotalView sets EXECUTABLE_DIRECTORY_COMPONENT to the first directory named in the EXECUTABLE_SEARCH_PATH where it finds the executable file.
Example 1
If the executable file is /bin/ls, EXECUTABLE_DIRECTORY_COMPONENT is set to /bin/.
Example 2
If the executable file is ../../bin/a.out, EXECUTABLE_DIRECTORY_COMPONENT is set to ../../bin.
EXECUTABLE_WORKING_DIRECTORY
The EXECUTABLE_WORKING_DIRECTORY variable is the absolute path name of the current working directory; that is, this is the value of pwd of TotalView at the time the executable file is loaded.