Displays the value of a language expression in the current
language (by default, the language of the module containing the
main program).
Format
EVALUATE language-expression[, . . . ]
1 – Parameters
language-expression
Specifies any valid expression in the current language.
2 – Qualifiers
2.1 /BINARY
Specifies that the result be displayed in binary radix.
2.2 /CONDITION_VALUE
Specifies that the expression be interpreted as a condition
value (the kind of condition value you would specify using the
condition-handling mechanism). The message text corresponding to
that condition value is then displayed. The specified value must
be an integer value.
2.3 /DECIMAL
Specifies that the result be displayed in decimal radix.
2.4 /HEXADECIMAL
Specifies that the result be displayed in hexadecimal radix.
2.5 /OCTAL
Specifies that the result be displayed in octal radix.
3 – Description
The debugger interprets the expression specified in an EVALUATE
command as a language expression, evaluates it in the syntax of
the current language and in the current radix, and displays its
value as a literal (for example, an integer value) in the current
language.
The current language is the language last established with
the SET LANGUAGE command. If you did not enter a SET LANGUAGE
command, the current language is, by default, the language of the
module containing the main program.
If an expression contains symbols with different compiler-
generated types, the debugger uses the type-conversion rules
of the current language to evaluate the expression.
The debugger can interpret and display integer data in any one
of four radixes: binary, decimal, hexadecimal, and octal. The
current radix is the radix last established with the SET RADIX
command.
If you did not enter a SET RADIX command, the default radix for
both data entry and display is decimal for most languages. The
exceptions are BLISS and MACRO, which have a default radix of
hexadecimal.
You can use a radix qualifier (/BINARY, /OCTAL, and so on) to
display integer data in another radix. These qualifiers do not
affect how the debugger interprets the data you specify; they
override the current output radix, but not the input radix.
The EVALUATE command sets the current value of built-in symbols
%CURVAL and backslash (\) to the value denoted by the specified
expression.
You cannot evaluate a language expression that includes a
function call. For example, if PRODUCT is a function that
multiplies two integers, you cannot use the command EVALUATE
PRODUCT(3,5). If your program assigns the returned value
of a function to a variable, you can examine the resulting
value of that variable. On Alpha processors, the command
EVALUATE procedure-name displays the procedure descriptor address
(not the code address) of a specified routine, entry point, or
Ada package.
For more information about debugger support for language-specific
operators and constructs, see the Language_Support Help topic.
Related commands:
EVALUATE/ADDRESS
MONITOR
(SET,SHOW) LANGUAGE
(SET,SHOW,CANCEL) RADIX
(SET,SHOW) TYPE
4 – Examples
1.DBG> EVALUATE 100.34 * (14.2 + 7.9)
2217.514
DBG>
This command uses the debugger as a calculator by multiplying
100.34 by (14.2 + 7.9).
2.DBG> EVALUATE/OCTAL X
00000001512
DBG>
This command evaluates the symbol X and displays the result in
octal radix.
3.DBG> EVALUATE TOTAL + CURR_AMOUNT
8247.20
DBG>
This command evaluates the sum of the values of two real
variables, TOTAL and CURR_AMOUNT.
4.DBG> DEPOSIT WILLING = TRUE
DBG> DEPOSIT ABLE = FALSE
DBG> EVALUATE WILLING AND ABLE
False
DBG>
In this example, the EVALUATE command evaluates the logical
AND of the current values of two Boolean variables, WILLING and
ABLE.
5.DBG> EVALUATE COLOR'FIRST
RED
DBG>
In this Ada example, this command evaluates the first element
of the enumeration type COLOR.
5 /ADDRESS
Evaluates an address expression and displays the result as a
memory address or a register name.
Format
EVALUATE/ADDRESS address-expression[, . . . ]
5.1 – Parameters
address-expression
Specifies an address expression of any valid form (for example, a
routine name, variable name, label, line number, and so on).
5.2 – Qualifiers
5.2.1 /BINARY
Displays the memory address in binary radix.
5.2.2 /DECIMAL
Displays the memory address in decimal radix.
5.2.3 /HEXADECIMAL
Displays the memory address in hexadecimal radix.
5.2.4 /OCTAL
Displays the memory address in octal radix.
5.3 – Description
The EVALUATE/ADDRESS command enables you to determine the memory
address or register associated with an address expression.
The debugger can interpret and display integer data in any one of
four radixes: binary, decimal, hexadecimal, and octal.
The default radix for both data entry and display is decimal for
most languages. The exceptions are BLISS and MACRO, which have a
default radix of hexadecimal.
You can use a radix qualifier (/BINARY, /OCTAL, and so on) to
display address values in another radix. These qualifiers do not
affect how the debugger interprets the data you specify; that is,
they override the current output radix, but not the input radix.
If the value of a variable is currently stored in a register
instead of memory, the EVALUATE/ADDRESS command identifies the
register. The radix qualifiers have no effect in that case.
The EVALUATE/ADDRESS command sets the current entity built-in
symbols %CURLOC and period (.) to the location denoted by the
address expression specified. Logical predecessors (%PREVLOC
or the circumflex character (^)) and successors (%NEXTLOC) are
based on the value of the current entity.
On Alpha processors, the command EVALUATE/ADDRESS procedure-name
displays the procedure descriptor address (not the code address)
of a specified routine, entry point, or Ada package.
Related commands:
EVALUATE
(SET,SHOW,CANCEL) RADIX
SHOW SYMBOL/ADDRESS
SYMBOLIZE
Routine names in debugger expressions have different meanings on
Integrity server and Alpha systems.
On Alpha systems, the command EVALUATE/ADDRESS RTN-NAME evaluates
to the address of the procedure descriptor.
5.4 – Examples
1.DBG> EVALUATE/ADDRESS RTN-NAME
On Integrity server systems, instead of displaying the address
of the official function descriptor, the debugger just displays
the code address. For example, on Alpha systems, you can enter
the following command and then set a breakpoint when a variable
contains the address, FOO:
2.DBG> SET BREAK .PC WHEN (.SOME_VARIABLE EQLA FOO)
The breakpoint occurs when the variable contains the address
of the procedure descriptor. However, when you enter the same
command on Integrity server systems, the breakpoint is never
reached because, although the user variable might contain the
address of the function descriptor for FOO, the "EQLA FOO" in
the WHEN clause compares it to the code address for FOO. As
a result, the user variable never contains the code address
of FOO. However, the first quadword of an Integrity server
function descriptor contains the code address, you can write it
as:
3.DBG> SET BREAK .PC WHEN (..SOME_VARIABLE EQLA FOO)
NOTE
On Integrity server systems, you cannot copy the following
line from your BLISS code: IF .SOME_VARIABLE EQLA FOO THEN
do-something;
4. DBG> EVALUATE/ADDRESS MODNAME\%LINE 110
3942
DBG>
This command displays the memory address denoted by the address
expression MODNAME\%LINE 110.
5.DBG> EVALUATE/ADDRESS/HEX A,B,C
000004A4
000004AC
000004A0
DBG>
This command displays the memory addresses denoted by the
address expressions A, B, and C in hexadecimal radix.
6.DBG> EVALUATE/ADDRESS X
MOD3\%R1
DBG>
This command indicates that variable X is associated with
register R1. X is a nonstatic (register) variable.