DEBUG CALL — MicroVMS 4.4
Calls a procedure which is part of the user program. DEBUG
displays the return value of the procedure.
One common use of CALL is to invoke procedures that dump
debugging information.
Format:
CALL routine-name [ (argument [,argument,...]) ]
Example:
DBG> CALL DUMP(X)
Additional information available:
Parameters
routine-name
Specifies the name or the virtual address of the procedure to be
called.
argument(s)
One or more arguments required by the procedure. These arguments
can be passed by value, by reference, by descriptor, or "by
address" (see the four subtopics for more detail).
Note - the debugger does not know about all the parameter-passing
mechanisms for all languages. You therefore may need to
explicitly tell it how to pass parameters (e.g., "CALL FOO(%VAL
X)" instead of just "CALL FOO(X)") in order to obtain correct
results. Also, subroutines may not always be called correctly if
you are passing complicated parameters such as arrays or records,
so you should use the CALL command in these situations with some
discretion. We hope to address these problems in a future
release of DEBUG.
Additional information available:
%ADDR
CALL SUB ( %ADDR address-expression)
This is the default. DEBUG obtains the result of the address
expression and passes that address into the subroutine. For
simple variables such as X, CALL SUB (%ADDR X) corresponds
exactly to how FORTRAN implements SUB(X), i.e., the address of X
is passed into the subroutine SUB. So for named variables, this
corresponds to call by reference in FORTRAN. For other
expressions, %REF is the way to achieve call by reference.
%DESCR
CALL SUB ( %DESCR lang-expression)
DEBUG evaluates the language expression and builds a VAX-standard
descriptor to describe the value. The descriptor is passed to
the subroutine. This is how you would pass strings to FORTRAN
subroutines.
%REF
CALL SUB ( %REF lang-expression) ! Call by reference
DEBUG evaluates the expression and passes a pointer to the value
into the called routine. This corresponds to the way FORTRAN
passes the result of expressions. E.g., on CALL SUB (%REF 1) a
pointer to a memory location containing 1 is passed into the
subroutine.
%VAL
CALL SUB ( %VAL lang-expression) ! Call by value
DEBUG evaluates the language expression and passes the value
directly into the called routine.
Qualifiers
You can specify whether you want ASTs enabled during the call.
If you don't specify /AST or /NOAST, then the AST enable flag is
unchanged; that is, ASTs will be enabled in the called subroutine
if and only if they are enabled at the time of the call.
/AST - ASTs are enabled (can be delivered) during execution of your
called subroutine.
/NOAST - ASTs are disabled (cannot be delivered) during execution of
your called subroutine.