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

  man pages->IRIX man pages -> standard/exception (3)              
Title
Content
Arch
Section
 

Contents


EXCEPTION(3C)							 EXCEPTION(3C)


NAME    [Toc]    [Back]

     exc_resume, exc_setjmp, find_fde, find_fde_name, exc_unwind,
     exc_unwind_name - exception handling facility

SYNOPSIS    [Toc]    [Back]

     #include <exception.h>

     #if (defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS))
     Dwarf_Fde
     find_fde(long pc);

     Dwarf_Fde    [Toc]    [Back]
     find_fde_name(long	pc, char **name);

     void exc_unwind(struct sigcontext *scp, Dwarf_Fde fde);

     void exc_unwind_name(struct sigcontext *scp, Dwarf_Fde fde, char **name);

     int exc_resume(struct sigcontext *scp);

     void exc_setjmp(struct sigcontext *scp);

DESCRIPTION    [Toc]    [Back]

     NOTE:  this version (4.0) of exception handling facility is totally
     different from the	(3.xx) versions.  This version extracts	information
     from the .debug_frame section instead of the runtime procedure table as
     in	the prior releases.  All the old functions -- exception_dispatcher,
     find_rpd, set_unhandled_exception and unwind -- are no longer supported.

     To	handle exceptions from UNIX signals and	to minimize the	cost at
     runtime until an exception	is encountered,	the loader collects perprocedure
 exception information and frame information so that the stack
     unwinds easily at the point of exception.

     The data structure	Dwarf_Fde is specified in the (.debug_frame) section.
     Please refer to the DWARF Debugging Information Format for	more details.

     At	runtime	the following procedures will be provided in libexc.so:

     find_fde will return the Frame Description	Entry(FDE) specified by	the pc
     argument, if there	is one,	otherwise it will return NULL.

     find_fde_name does	the same thing as find_fde but in addition returns the
     name of the procedure through the parameter name.

     exc_unwind	will take the sigcontext scp argument and virtually unwind by
     changing the fields to reflect the	next frame on the stack.  A sigreturn
     call can be called	with this scp upon return and will return to the frame
     unwind set	up.  The fde argument is used as the Frame Description Entry
     argument.	If it is NULL, exc_unwind will call find_fde on	scp->sc_pc to
     get it.  If exc_unwind is unable to unwind	the stack, it will set the
     sc_pc field of the	scp parameter to 1, indicating invalid address.



									Page 1






EXCEPTION(3C)							 EXCEPTION(3C)



     exc_unwind_name does the same thing as exc_unwind but in addition returns
     the name of the procedure of the current sigcontext through the parameter
     name.

     exc_setjmp	is like	setjmp,	except that it saves V0	and also sets a
     special magic number so that exc_resume can tell which degree of
     restoration is required.

     exc_resume	is like	longjmp, except	that it	restores the v0	that
     exc_setjmp	saved and performs one of the three different degress of
     restoration, according to the magic number	in the sigcontext.

USAGE    [Toc]    [Back]

	  cc  main.o -lexc -ldwarf -lelf


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
fenv Linux C99 floating point rounding and exception handling
excpt Tru64 Data structures and prototypes for exception handling support
c_excpt Tru64 Header file defining structured exception handling keywords, intrinsics, and structures for the C la...
get_ieee_exceptions IRIX floating-point exception status
exception_intro Tru64 an overview of exception support supplied in libexc.a
libexc Tru64 an overview of exception support supplied in libexc.a
sigfpe IRIX floating-point exception handler package
fsigfpe IRIX floating-point exception handler package
clear_ieee_exception IRIX Clears floating-point exception indicator
set_ieee_exception IRIX Sets floating-point exception indicator
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service