home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / standard / exception.z / exception
Encoding:
Text File  |  2002-10-03  |  5.5 KB  |  98 lines

  1. EXCEPTION(3C)                                          Last changed: 4-9-99
  2.  
  3.  
  4. NNAAMMEE
  5.      eexxcc__rreessuummee,, eexxcc__sseettjjmmpp,, ffiinndd__ffddee,, ffiinndd__ffddee__nnaammee,, eexxcc__uunnwwiinndd,,
  6.      eexxcc__uunnwwiinndd__nnaammee - Exception handling facility
  7.  
  8. SSYYNNOOPPSSIISS
  9.      ##iinncclluuddee <<eexxcceeppttiioonn..hh>>
  10.  
  11.      ##iiff ((ddeeffiinneedd((__LLAANNGGUUAAGGEE__CC)) |||| ddeeffiinneedd((__LLAANNGGUUAAGGEE__CC__PPLLUUSS__PPLLUUSS))))
  12.  
  13.      ##iiff ((__MMIIPPSS__SSIIMM ==== __MMIIPPSS__SSIIMM__NNAABBII3322))
  14.  
  15.      DDwwaarrff__FFddee ffiinndd__ffddee((lloonngg ppcc));;
  16.  
  17.      DDwwaarrff__FFddee ffiinndd__ffddee((EEllff3322__AAddddrr **ppcc));;
  18.  
  19.      DDwwaarrff__FFddee ffiinndd__ffddee__nnaammee((EEllff3322__AAddddrr **ppcc,, cchhaarr ****nnaammee));;
  20.  
  21.      ##eellssee //** iiff ((__MMIIPPSS__SSIIMM ==== __MMIIPPSS__SSIIMM__AABBII6644)) **//
  22.  
  23.      DDwwaarrff__FFddee ffiinndd__ffddee((EEllff6644__AAddddrr **ppcc));;
  24.  
  25.      DDwwaarrff__FFddee ffiinndd__ffddee__nnaammee((EEllff6644__AAddddrr **ppcc,, cchhaarr ****nnaammee));;
  26.  
  27.      ##eennddiiff
  28.  
  29.      vvooiidd eexxcc__uunnwwiinndd((ssttrruucctt ssiiggccoonntteexxtt **ssccpp,, DDwwaarrff__FFddee ffddee));;
  30.  
  31.      vvooiidd eexxcc__uunnwwiinndd__nnaammee((ssttrruucctt ssiiggccoonntteexxtt **ssccpp,, DDwwaarrff__FFddee ffddee,, cchhaarr
  32.      ****nnaammee));;
  33.  
  34.      iinntt eexxcc__rreessuummee((ssttrruucctt ssiiggccoonntteexxtt **ssccpp));;
  35.  
  36.      vvooiidd eexxcc__sseettjjmmpp((ssttrruucctt ssiiggccoonntteexxtt **ssccpp));;
  37.  
  38. IIMMPPLLEEMMEENNTTAATTIIOONN
  39.      IRIX systems
  40.  
  41. DDEESSCCRRIIPPTTIIOONN
  42.           NOTE:  This version (4.0) of exception handling facility is
  43.           totally different from the (3.xx) versions.  This version
  44.           extracts information from the ..ddeebbuugg__ffrraammee section instead of the
  45.           rruunnttiimmee pprroocceedduurree ttaabbllee as in the prior releases.  The old
  46.           functions (eexxcceeppttiioonn__ddiissppaattcchheerr, ffiinndd__rrppdd,
  47.           sseett__uunnhhaannddlleedd__eexxcceeppttiioonn and uunnwwiinndd) are no longer supported.
  48.  
  49.      To handle exceptions from UNIX signals and to minimize the cost at
  50.      runtime until an exception is encountered, the loader collects per-
  51.      procedure exception information and frame information so that the
  52.      stack unwinds easily at the point of exception.
  53.  
  54.      The data structure DDwwaarrff__FFddee is specified in the (..ddeebbuugg__ffrraammee)
  55.      section.  See the ddwwaarrff(4) man page for additional information.
  56.  
  57.      At runtime the following procedures will be provided in lliibbeexxcc..ssoo:
  58.  
  59.      ffiinndd__ffddee will return the Frame Description Entry(FDE) specified by the
  60.      ppcc argument, if there is one, otherwise it will return NULL.
  61.  
  62.      ffiinndd__ffddee__nnaammee does the same thing as ffiinndd__ffddee but in addition returns
  63.      the name of the procedure through the parameter nnaammee.  Use ffrreeee to
  64.      deallocate the returned strings after they are used.  (See the
  65.      ffrreeee(3C) man page for details on its use.)
  66.  
  67.      eexxcc__uunnwwiinndd will take the ssiiggccoonntteexxtt _s_c_p argument and virtually unwind
  68.      by changing the fields to reflect the next frame on the stack.  A
  69.      ssiiggrreettuurrnn call can be called with this ssccpp upon return and will return
  70.      to the frame unwind set up.  The _f_d_e argument is used as the Frame
  71.      Description Entry argument.  If it is NULL, eexxcc__uunnwwiinndd will call
  72.      ffiinndd__ffddee on ssccpp-->>sscc__ppcc to get it.  If eexxcc__uunnwwiinndd is unable to unwind
  73.      the stack, it will set the _s_c__p_c field of the _s_c_p parameter to 1,
  74.      indicating invalid address.
  75.  
  76.      eexxcc__uunnwwiinndd__nnaammee does the same thing as eexxcc__uunnwwiinndd but in addition
  77.      returns the name of the procedure of the current sigcontext through
  78.      the parameter nnaammee.  Use ffrreeee to deallocate the returned strings after
  79.      they are used.  (See the ffrreeee(3C) man page for details on its use.)
  80.  
  81.      eexxcc__sseettjjmmpp is like sseettjjmmpp, except that it saves V0 and also sets a
  82.      special magic number so that eexxcc__rreessuummee can tell which degree of
  83.      restoration is required.
  84.  
  85.      eexxcc__rreessuummee is like lloonnggjjmmpp, except that it restores the v0 that
  86.      eexxcc__sseettjjmmpp saved and performs one of the three different degress of
  87.      restoration, according to the magic number in the sigcontext.
  88.  
  89. EEXXAAMMPPLLEESS
  90.           cc  main.o -lexc -ldwarf -lelf
  91.  
  92. SSEEEE AALLSSOO
  93.      ffrreeee(3C), lliibbeexxcc(3), mmaalllloocc(3C)
  94.  
  95.      ddwwaarrff(4)
  96.  
  97.      This man page is available only online.
  98.