Thanks for the very clear test program!  I'll check it
out.  Two things that might help you debug these sorts
of bugs: there's a macro SHOW_EVAL_OPS in s7.c -- if
it is 1, s7 prints out a ton of detail about what it's
doing; and there's a function s7_show_stack that is
not static, but also not in s7.h -- if you add its
declaration to catch-test.c and call it in your
print_statck_top function, it will show the scheme
stack. The end of the printout for catch-test.c is:

TEST
catch (513), code: #<catch>
eval_done (510), code: #<unused>
TOP 1
stack:
s7_call_with_catch[50584]: push eval_done
s7_call_with_catch[50586]
TEST
TOP 3
stack:
  catch
  eval_done
s7_call_with_catch[50586]
TEST
TOP 4
stack:
  catch
  catch
  eval_done
s7_call_with_catch[50586]
TEST
TOP 5
stack:
  catch
  catch
  catch
  eval_done
stack_reset[7747]: push eval_done
s7_quit[52367]: push eval_done

_______________________________________________
Cmdist mailing list
[email protected]
https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Reply via email to