4 May 2007 01:37
Re: Empty Stack Trace
Shiro Kawai <shiro <at> lava.net>
2007-05-03 23:37:44 GMT
2007-05-03 23:37:44 GMT
The gosh interpreter has been broken last few releases in
a way that it doesn't show stack traces when invoked in the
script mode. It is due to my oversight of the API change,
and the fundamental fix will take some time. Meanwhile,
the following is a quick patch against 0.8.10 src/main.c
that effectively reverts to the old API behavior.
--shiro
=====================
--- main.c.orig 2007-04-11 17:26:55.000000000 -1000
+++ main.c 2007-05-03 13:16:21.000000000 -1000
<at> <at> -473,6 +473,7 <at> <at>
mainproc = Scm_SymbolValue(Scm_UserModule(),
SCM_SYMBOL(SCM_INTERN("main")));
if (SCM_PROCEDUREP(mainproc)) {
+#if 0
int r = Scm_Apply(mainproc, SCM_LIST1(av), &epak);
if (r > 0) {
ScmObj res = epak.results[0];
<at> <at> -482,6 +483,11 <at> <at>
Scm_ReportError(epak.exception);
exit_code = 70; /* EX_SOFTWARE, see SRFI-22. */
}
+#else
+ ScmObj r = Scm_ApplyRec(mainproc, SCM_LIST1(av));
+ if (SCM_INTP(r)) exit_code = SCM_INT_VALUE(r);
+ else exit_code = 70;
+#endif
}
(Continue reading)
RSS Feed