System Debug Reference Manual (32650-90888)
412 Chapter10
System Debug Standard Functions
func nmaddr
Examples
$nmdebug > wl processstudent
PROG $4d5.5d24
$nmdebug > wl nmaddr("processstudent")
PROG $4d5.5d24
Write the address for the processstudent procedure. The expression evaluator can locate
the procedure since it is an exported universal procedure. The procedure may also be
located by using the NMADDR function. The default
lookupid
PROCEDURES is used.
$nmdebug > wl processstudent.highscore
Expected a number, variable, function, or procedure (error #3720)
undefined operand is: "processstudent"
wl processstudent.highscore
The above example attempts to locate the nested procedure highscore. The expression
evaluator fails. This is due to the fact that a dot "." is used to separate parts of a long
pointer by the expression evaluator. The correct method of locating a nested procedure is
demonstrated in the following example.
$nmdebug > wl nmaddr("processstudent.highscore")
PROG $4d5.5b50
The NMADDR function parses the dot in the nested procedure name and finds it's location.
$nmdebug > wl nmaddr("highscore")
Couldn't translate path to an address. (error #1612)
Error evaluating a predefined function. (error #4240)
function is"nmaddr"
wl nmaddr("highscore")
$nmdebug > wl nmaddr("highscore" "nested")
PROG $4d5.5b50
In the above example an error occurs because the default
lookupid
of PROCEDURES is used.
Since highscore is a nested procedure, NMADDR fails to locate it. When the NESTED
lookupid
parameter is specified, the search succeeds.
$nmdebug > wl nmaddr("input" "data")
PROG $4d5.400003a8
The NMADDR function is also able to look up data symbols. The above example locates the
address for the symbol input. The value returned is the value found in the SOM symbol
table. This function does not perform data symbol location fixups. Only those data symbols
placed into the SOM symbol table by the language compilers are locatable. Most language
compilers do not place the program's variables into this data structure.
$nmdebug > wl average
GRP $4d8.15c88
$nmdebug > wl nmaddr("average")
GRP $4d8.15c88
The above example locates the address for the average procedure. Note that this
procedure resides in the group library.
$nmdebug > wl nmaddr('p heap:P NEW HEAP')