Guardian Procedure Calls Reference Manual

HIST_ERROR-8
The stack tracing mechanism failed.
HIST_BAD_WORKSPACE-9
The workspace structure has an invalid version identifier. This error can occur if HIST_GETPRIOR_ is called
without first calling the HIST_INIT_ procedure or if the workspace structure has become corrupted.
Considerations
Suppression of a stack frame by HIST_INIT_ or HIST_PRIOR_ is determined by a bit mask in
the field workspace.FrameSuppress. The HIST_INIT_ procedure initializes the field to a
default set of transition frames, or to zero (0) if the HO_NoSuppress option is specified in the
call to HIST_INIT_.
The procedure activations or stack frames to be displayed must exist and remain undisturbed
on the stack. You must therefore use care to ensure that these procedure activations are not
disturbed while the stack trace is taking place. For example, if a stack trace is initiated from
the context of the caller or by using a jump buffer, the procedure that called HIST_INIT_ or
the setjmp() function should not exit before the calls to HIST_GETPRIOR_.
You can call HIST_GETPRIOR_ without calling HIST_FORMAT_ to skip a frame in a stack trace.
For example, a procedure can generate a stack trace starting from its caller (instead of itself)
by calling HIST_INIT_ with the HO_Init_Here option, and then calling HIST_GETPRIOR_ before
the first call to HIST_FORMAT_.
Example
error := HIST_GETPRIOR_ ( hws );
HIST_GETPRIOR_ Procedure 715