summaryrefslogtreecommitdiff
path: root/libguile/debug.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@red-bean.com>1996-12-19 07:55:42 +0000
committerJim Blandy <jimb@red-bean.com>1996-12-19 07:55:42 +0000
commitc0ab1b8d03f17d858321cc86899e5905760f40ac (patch)
tree37f440dd657c4016bae473e41f680e82e3166a07 /libguile/debug.c
parent96963166857cb2b78054c1fb982a6de599bbd74f (diff)
downloadguile-c0ab1b8d03f17d858321cc86899e5905760f40ac.tar.gz
Don't use GCC extensions to allocate space for debugging frames.
(Here he goes again! Why do we put up with this?!) * debug.h (scm_debug_frame): Make the 'vect' member a pointer to an scm_debug_info structure, not an in-line array of them. Add 'info' member, to say how many vect elements we've used, for eval frames. * eval.c (SCM_CEVAL): Use alloca to allocate space for vect. Use a new variable debug_info_end to mark the end of vect, instead of the address of the 'info' pointer itself. [DEVAL] (ENTER_APPLY, SCM_CEVAL, SCM_APPLY): Remove casts of &debug to scm_debug_frame *; debug is a real scm_debug_frame now. (SCM_APPLY): Explicitly allocate space for debug.vect. * debug.c (scm_m_start_stack): Same, for vframe.vect. * stacks.c: Adjusted for new debug frame structure. (RELOC_INFO, RELOC_FRAME): New macros. (stack_depth, read_frames): Use them, and new scm_debug_frame element 'info', instead of magically knowing that eval frames have an info pointer sitting after vect. (scm_make_stack, scm_stack_id, scm_last_stack_frame): Use RELOC_FRAME. (scm_init_stacks): Formatting tweaks.
Diffstat (limited to 'libguile/debug.c')
-rw-r--r--libguile/debug.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libguile/debug.c b/libguile/debug.c
index b989d2d65..ac65c723c 100644
--- a/libguile/debug.c
+++ b/libguile/debug.c
@@ -316,6 +316,7 @@ scm_m_start_stack (exp, env)
{
SCM answer;
scm_debug_frame vframe;
+ scm_debug_info vframe_vect_body;
exp = SCM_CDR (exp);
SCM_ASSERT (SCM_NIMP (exp)
&& SCM_ECONSP (exp)
@@ -327,6 +328,7 @@ scm_m_start_stack (exp, env)
s_start_stack);
vframe.prev = scm_last_debug_frame;
vframe.status = SCM_VOIDFRAME;
+ vframe.vect = &vframe_vect_body;
vframe.vect[0].id = scm_eval_car (exp, env);
scm_last_debug_frame = &vframe;
answer = scm_eval_car (SCM_CDR (exp), env);