*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> ftn/libexc (3)              
Title
Content
Arch
Section
 

Contents


LIBEXC(3)							     LIBEXC(3)


NAME    [Toc]    [Back]

     trace_back_stack, trace_back_stack_and_print - call stack trace library

SYNOPSIS    [Toc]    [Back]

     #include <libexc.h>

     int trace_back_stack(int, __uint64_t *, char **,
					int, int);

     int trace_back_stack_and_print();

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

DESCRIPTION    [Toc]    [Back]

     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's
     called.  The first	argument sets the number of stack frames to be
     unwound.  If it's 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.

     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    [Toc]    [Back]

     _LIBEXC_CACHE when	set enables dwarf information caching (N32/N64 ABI's
     only).

     _LIBEXC_NO_PROC_NAME when set disables procedure name extraction (N32/N64
     ABI's only).

     _LIBEXC_INIT when set forces some dwarf information loading at the	time
     of	the first call to the libexc functions (N32/N64	ABI's only).





									Page 1






LIBEXC(3)							     LIBEXC(3)


SEE ALSO    [Toc]    [Back]

      
      
     speedshop(1), libexc(3F)

DIAGNOSTICS    [Toc]    [Back]

     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.

NOTES    [Toc]    [Back]

     Executables complying to the o32 ABI have to be explicitly	linked with
     libexc.
LIBEXC(3F)							    LIBEXC(3F)


NAME    [Toc]    [Back]

     trace_back_stack, trace_back_stack_and_print - call stack trace library
     for Fortran applications

SYNOPSIS    [Toc]    [Back]

     integer*4 trace_back_stack
     integer*4 i
     integer*8 addrs(100)
     character*100 names(100)
     i = trace_back_stack(0, addrs, names,
				   100,	100)

     call trace_back_stack_and_print()

     integer*8 addr, entry
     character*100 name
     call exc_dladdr(addr, name, 100, entry)

DESCRIPTION    [Toc]    [Back]

     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's
     called.  The first	argument sets the number of stack frames to be
     unwound.  If it's 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.

     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    [Toc]    [Back]

     _LIBEXC_CACHE when	set enables dwarf information caching (N32/N64 ABI's
     only).

     _LIBEXC_NO_PROC_NAME when set disables procedure name extraction (N32/N64
     ABI's only).




									Page 1






LIBEXC(3F)							    LIBEXC(3F)



     _LIBEXC_INIT when set forces some dwarf information loading at the	time
     of	the first call to the libexc functions (N32/N64	ABI's only).

SEE ALSO    [Toc]    [Back]

      
      
     speedshop(1), libexc(3)

DIAGNOSTICS    [Toc]    [Back]

     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.

NOTES    [Toc]    [Back]

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


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
rpc IRIX Remote Procedure Call (RPC) library routines
omp_threads IRIX Runtime library procedures used to set, call or return numbers of threads
plock HP-UX lock process, text, data, stack, or shared library in memory
unwind HP-UX overview of stack unwind library entry points and convenience macros
authsys_create NetBSD library routines for client side remote procedure call authentication
svcerr_auth FreeBSD library routines for server side remote procedure call errors
authsys_create_default NetBSD library routines for client side remote procedure call authentication
authsys_create_default FreeBSD library routines for client side remote procedure call authentication
svcerr_noproc FreeBSD library routines for server side remote procedure call errors
svcerr_noprog FreeBSD library routines for server side remote procedure call errors
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service