libexc(3)

trace_back_stack, trace_back_stack_and_print - Calls stack trace library

As shipped in IRIX 6.5.7. Last changed in IRIX 6.5.5.

NAME
     trace_back_stack, trace_back_stack_and_print - Calls stack trace
     library

SYNOPSIS
     #include <libexc.h>

     int trace_back_stack(int, __uint64_t *, char **,
     int trace_back_stack_and_print();
     void exc_dladdr(__uint64_t, char *, int,

IMPLEMENTATION
     IRIX systems

DESCRIPTION
     The libexc library provides the functionality for user-level call
     stack unwind.

     trace_back_stack is used to unwind the call stack at the time it is
     called.  The first argument sets the number of stack frames to be
     unwound.  If set to zero, the unwind continues up to main or up to
     _nsproc/_fork for child processes.  The second argument is the array
     that contains the addresses of the callers in the stack after the
     unwind is completed.  The third argument contains the names of the
     functions in the stack after the unwind is completed. If this argument
     is set to NULL, it disables procedure name extraction. The fourth
     argument is the size of the array of callers, and the fifth argument
     is the size of the procedure name strings.

     trace_back_stack_and_print unwinds the call stack (up to main or up to
     _nsproc/_fork for child processes) and prints it to the standard
     output.  First, the pid of the process and the number of frames in the
     stack are printed and then, for each frame, the program counter and
     the function name are printed.

     exc_dladdr maps a text address to the procedure that includes it.  The
     first argument is the address to be mapped.  The second argument will
     contain the procedure name upon return, and the third argument is the
     size of the procedure name string.  The fourth argument will contain
     the procedure entry address upon return.

ENVIRONMENT VARIABLES
     _LIBEXC_CACHE
          Enables dwarf information caching (N32/64 ABIs only).

     _LIBEXC_NO_PROC_NAME
          Disables procedure name extraction (N32/64 ABIs only).

     _LIBEXC_INIT
          Forces some dwarf information loading at the time of the first
          call to the libexc functions (N32/64 ABIs only).  Alternatively,
          a call to exc_init() would have the same effect of forced pre-
          intialization.

NOTES
     Executables complying to the O32 ABI have to be explicitly linked with
     libexc.

DIAGNOSTICS
     Upon successful completion, both functions return the number of call
     stack frames that were unwound.  In the event of failure, a zero value
     is returned.

SEE ALSO
     speedshop(1)

     exception(3C), libexc(3F)

     This man page is available only online.