Merge commit '53d81399bef1d9396665e79fb6b9c25eb8e2a6ad' into vm-check
[bpt/guile.git] / libguile / debug.h
index 81e1fb3..4e94b3c 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef SCM_DEBUG_H
 #define SCM_DEBUG_H
 
-/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2004
+/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2004,2008
  * Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
@@ -18,7 +18,7 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 \f
 /* scm_debug_opts is  defined in eval.c.
  */
 
-SCM_API scm_t_option scm_debug_opts[];
-
-#define SCM_CHEAPTRAPS_P       scm_debug_opts[0].val
-#define SCM_BREAKPOINTS_P      scm_debug_opts[1].val
-#define SCM_TRACE_P            scm_debug_opts[2].val
-#define SCM_REC_PROCNAMES_P    scm_debug_opts[3].val
-#define SCM_BACKWARDS_P                scm_debug_opts[4].val
-#define SCM_BACKTRACE_WIDTH    scm_debug_opts[5].val
-#define SCM_BACKTRACE_INDENT           scm_debug_opts[6].val
-#define SCM_N_FRAMES           scm_debug_opts[7].val
-#define SCM_BACKTRACE_MAXDEPTH scm_debug_opts[8].val
-#define SCM_BACKTRACE_DEPTH    scm_debug_opts[9].val
-#define SCM_BACKTRACE_P                scm_debug_opts[10].val
-#define SCM_DEVAL_P            scm_debug_opts[11].val
-#define SCM_STACK_LIMIT                scm_debug_opts[12].val
-#define SCM_SHOW_FILE_NAME     scm_debug_opts[13].val
-#define SCM_N_DEBUG_OPTIONS 14
+
 
 SCM_API int scm_debug_mode_p;
 SCM_API int scm_check_entry_p;
 SCM_API int scm_check_apply_p;
 SCM_API int scm_check_exit_p;
+SCM_API int scm_check_memoize_p;
 
 #define SCM_RESET_DEBUG_MODE \
 do {\
@@ -73,8 +58,10 @@ do {\
     && scm_is_true (SCM_APPLY_FRAME_HDLR);\
   scm_check_exit_p = (SCM_EXIT_FRAME_P || SCM_TRACE_P)\
     && scm_is_true (SCM_EXIT_FRAME_HDLR);\
+  scm_check_memoize_p = (SCM_MEMOIZE_P)\
+    && scm_is_true (SCM_MEMOIZE_HDLR);\
   scm_debug_mode_p = SCM_DEVAL_P\
-    || scm_check_entry_p || scm_check_apply_p || scm_check_exit_p;\
+    || scm_check_memoize_p || scm_check_entry_p || scm_check_apply_p || scm_check_exit_p;\
 } while (0)
 
 /* {Evaluator}
@@ -151,7 +138,7 @@ SCM_API scm_t_bits scm_tc16_memoized;
 SCM_API SCM scm_debug_object_p (SCM obj);
 SCM_API SCM scm_local_eval (SCM exp, SCM env);
 SCM_API SCM scm_reverse_lookup (SCM env, SCM data);
-SCM_API SCM scm_start_stack (SCM info_id, SCM exp, SCM env);
+SCM_API SCM scm_sys_start_stack (SCM info_id, SCM thunk);
 SCM_API SCM scm_procedure_environment (SCM proc);
 SCM_API SCM scm_procedure_source (SCM proc);
 SCM_API SCM scm_procedure_name (SCM proc);
@@ -163,8 +150,8 @@ SCM_API SCM scm_evaluator_traps (SCM setting);
 SCM_API SCM scm_debug_options (SCM setting);
 SCM_API SCM scm_make_debugobj (scm_t_debug_frame *debug);
 
-SCM_API SCM scm_i_unmemoize_expr (SCM memoized);
-SCM_API void scm_init_debug (void);
+SCM_INTERNAL SCM scm_i_unmemoize_expr (SCM memoized);
+SCM_INTERNAL void scm_init_debug (void);
 
 #ifdef GUILE_DEBUG
 SCM_API SCM scm_memcons (SCM car, SCM cdr, SCM env);