Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ find_fde_name(3C) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought



EXCEPTION(3C)                                                    EXCEPTION(3C)



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

SYNOPSIS
     #include <exception.h>

     #if (defined(LANGUAGEC) || defined(LANGUAGECPLUSPLUS))
     DwarfFde
     findfde(long pc);

     DwarfFde
     findfdename(long pc, char **name);

     void excunwind(struct sigcontext *scp, DwarfFde fde);

     void excunwindname(struct sigcontext *scp, DwarfFde fde, char **name);

     int excresume(struct sigcontext *scp);

     void excsetjmp(struct sigcontext *scp);

DESCRIPTION
     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 per-
     procedure 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
          cc  main.o -lexc -ldwarf -lelf









































                                                                        Page 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026