DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(guile.info.gz) Capturing the Stack or Innermost Stack Frame

Info Catalog (guile.info.gz) Using Traps (guile.info.gz) Debugging (guile.info.gz) Examining the Stack
 
 35.3 Capturing the Stack or Innermost Stack Frame
 =================================================
 
 When an error occurs in a running program, or the program hits a
 breakpoint, its state at that point can be represented by a "stack" of
 all the evaluations and procedure applications that are logically in
 progress at that time, each of which is known as a "frame".  The
 programmer can learn more about the program's state at the point of
 interruption or error by inspecting the stack and its frames.
 
  -- Scheme Procedure: make-stack obj . args
  -- C Function: scm_make_stack (obj, args)
      Create a new stack. If OBJ is `#t', the current evaluation stack
      is used for creating the stack frames, otherwise the frames are
      taken from OBJ (which must be either a debug object or a
      continuation).
 
      ARGS should be a list containing any combination of integer,
      procedure and `#t' values.
 
      These values specify various ways of cutting away uninteresting
      stack frames from the top and bottom of the stack that
      `make-stack' returns.  They come in pairs like this: `(INNER_CUT_1
      OUTER_CUT_1 INNER_CUT_2 OUTER_CUT_2 ...)'.
 
      Each INNER_CUT_N can be `#t', an integer, or a procedure.  `#t'
      means to cut away all frames up to but excluding the first user
      module frame.  An integer means to cut away exactly that number of
      frames.  A procedure means to cut away all frames up to but
      excluding the application frame whose procedure matches the
      specified one.
 
      Each OUTER_CUT_N can be an integer or a procedure.  An integer
      means to cut away that number of frames.  A procedure means to cut
      away frames down to but excluding the application frame whose
      procedure matches the specified one.
 
      If the OUTER_CUT_N of the last pair is missing, it is taken as 0.
 
  -- Scheme Procedure: last-stack-frame obj
  -- C Function: scm_last_stack_frame (obj)
      Return a stack which consists of a single frame, which is the last
      stack frame for OBJ. OBJ must be either a debug object or a
      continuation.
 
Info Catalog (guile.info.gz) Using Traps (guile.info.gz) Debugging (guile.info.gz) Examining the Stack
automatically generated byinfo2html