SET DIRECTORY

Add a directory to the list of search paths for source files.

Syntax

SET DIRECTORY "directory"

SET DIRECTORY @var

SET DIRECTORY /SUBSTITUTE="directory" "replacement"

Parameters

directory

Directory path string.

@var

A debugger variable.

/SUBSTITUTE="directory" "replacement"

Adds a rule to the list of source path substitution rules. These rules are used to replace source file path information specified by the symbol file.

The parameter directory specifies the path string to be replaced.

The parameter replacement specifies the substitute path string.

Description

This command adds the name directory or the contents of the debugger variable @var to the list of search paths for source files. These are used if a source file cannot be found under the path name stored within the debug information of the program. You can also use environment variables with this command.

Example

SET DIRECTORY "/usr/src/local"
SET DIRECTORY "$DUA0:[user.src.local]"
SET DIRECTORY "c:\usr\src\local"
SET DIRECTORY /SUBSTITUTE="c:\program files" "d:"
SET DIRECTORY /SUBSTITUTE="/users/source/main.cpp" "g:\source\main.cpp"

When using debugger variables, the SET DIRECTORY command works as follows:

PRINT /DBVAR=var "c:/tmp"
SET DIRECTORY @var

See Also

For more complete information about compiler optimizations, see our Optimization Notice.