126.96.36.199 Tracebacks From Anywhere in a Program
It is possible to get a symbolic stack traceback
from anywhere in a program, just as for non-symbolic tracebacks.
The first step is to obtain a non-symbolic
traceback, and then call
Symbolic_Traceback to compute the symbolic
information. Here is an example:
procedure STB is
procedure P1 is
TB : Tracebacks_Array (1 .. 10);
-- We are asking for a maximum of 10 stack frames.
Len : Natural;
-- Len will receive the actual number of stack frames returned.
Call_Chain (TB, Len);
Text_IO.Put_Line (Symbolic_Traceback (TB (1 .. Len)));
procedure P2 is