System Debug Reference Manual (32650-90888)

42 Chapter2
User Interface
Procedure Name: Symbols
$nmdebug > wl FOPEN
SYS $a.345498
$nmdebug >
In the above example, since no System Debug variable named FOPEN was found, the
expression evaluator searched for the symbol in the currently loaded program file and
libraries, finding it in NL.PUB.SYS.
Procedure name symbols stand for slightly different locations depending on the mode of
System Debug. In CM, they stand for the starting address of the code bodies that they
name. In NM, they stand for the entry address. Since compilers may emit constants before
executable instructions in System Object Modules, breakpoints should always be set at
entry addresses. To find the entry address of a CM procedure, the procedure symbol name
should be prefixed by the question mark (?), as explained below.
When searching program files and libraries for procedure symbols, System Debug behaves
differently depending on its mode. In NM, procedure names are case sensitive, and the
program file and libraries are searched in the following order:
NM search order: first... PROG, GRP, PUB, USERs, SYS ...last
In CM, procedure names are case insensitive, and the following search order is used:
CM search order: first... PROG, GRP, PUB, LGRP, LPUB, SYS ...last
Each of the above search orders, which visit all currently loaded files, is known as a full
search path. Note that this order is the same as that used by the CM and NM loaders in
satisfying external references in program files and libraries, as specified in the LIB= and
LIBLIST= parameters of the RUN command.
Variations of certain commands, such as BREAK, DISPLAY,
MODIFY, TRANSLATE, FREEZE, and UNFREEZE, restrict the search path for procedure name
symbols in their parameters to a single loaded code file. In addition, certain coercion
functions (PROG, GRP, PUB, LGRP, LPUB, SYS) also restrict the search path for
procedure name symbols in their parameters to a single loaded code file. This allows
references to procedure symbols in a particular library, that would otherwise be
inaccessible if they were redefined in preceding libraries on the full search path.
Two symbol tables are present in NM executable libraries and program files. The first
symbol table is called the Loader Symbol Table (LST) and is utilized by the native mode
loader. It contains only exported level 1 procedure names, which are hashed to support fast
symbol name lookups.
The second symbol table is called the System Object Module (SOM) symbol table. This
symbol table contains all compiler-generated symbols (procedure, data, internal labels,
try/recover, and so on), which are maintained in no particular order. Any lookup attempt
must be made sequentially through the symbols.
If the SOM symbols are being searched and an ambiguous name is entered, the first
symbol that matches the name found during the sequential search of the symbol table is
used.
The symbol table used by the expression evaluator for symbol lookups is based on the
environment variable LOOKUP_ID. The variable may take on any of the following values.
(The default setting is LSTPROC.)