Inspect Manual

High-Level Inspect Commands
Inspect Manual429164-006
6-15
ADD SOURCE ASSIGN
new-name
specifies the name of the volume, subvolume, or file where you want Inspect to
look for source code when it would normally look in original-name. Note that
volume is required.
new-name must be qualified down to the same level as original-name. That
is, if original-name is a volume, new-name must be a volume; if original-
name is a subvolume, new-name must be a subvolume; if original-name is a
file or process, new-name must be a file. If original-name is omitted, new-
name must be fully qualified.
Usage Considerations
How Inspect Applies Source Assignments
After Inspect retrieves a compilation name, it scans the source assignment list for
original names that match the compilation name. Inspect matches names from left
to right, and tests for both partial and complete matches. If, for example, the
compilation name is $vol.svol.file, Inspect matches it with these source
assignments:
ADD SOURCE ASSIGN $vol, $vol1
ADD SOURCE ASSIGN $vol.svol, $vol2.subvol2
ADD SOURCE ASSIGN $vol.svol.file, $vol3.subvol3.file3
When more than one original name matches a source assignment, Inspect
chooses the one that matches the source file to the greatest length. Using the
preceding assignments, this table lists the selection and effect of various
assignments:
The final example in this table demonstrates that Inspect does not match on a
character-by-character basis; instead, it matches on a name-by-name basis. The
original name of the third assignment ($vol.svol.file) is a character match of the
source assignment $vol.svol.filename, but Inspect does not use it because the two
filenames (“file” and “filename”) do not match. Instead, Inspect uses the second
assignment because its original name ($vol.svol) is an exact name match of the
original name down to the subvolume level.
Name Qualification of Compilation Names
Compilation names in the symbol region are qualified up to the system level. As a
result, all source assign references to such compilation names must include the
system name as well. For example, if the compilation name is
Compilation Name
Assignment
Applied Resulting Current Name
$vol.test.file first $vol.test.file
$vol.svol.oldfile second $vol2.subvol2.oldfile
$vol.svol.file third $vol3.subvol3.file3
$vol.svol.filename second $vol2.subvol2.filename