On Mon, 2006-07-31 at 10:13 +0300, Volkan YAZICI wrote: > On Jul 29 03:08, Clinton Ebadi wrote: > > You should be able to put something like: > > > > SCM_DEVAL_P = 1; > > SCM_RECORD_POSITIONS_P = 1; > > SCM_BACKTRACE_P = 1; > > SCM_RESET_DEBUG_MODE; > > > > Into your real_main (the one passed to scm_boot_guile). This will give > > you debug output similar to the default debugging repl. > > I tried placing above 4 lines just before calling gh_eval_str_with_catch(), > that's in the main_prog() invocated by gh_enter(). But scm_backtrace() > still complains about "No backtrace available". Any other ideas? > > Also, may anybody suggest an example project that uses guile so I can > take a look at its source code for debugging related stuff.
Hi Volkan, I had to work through this a while back, and the problem I had was that there are two types of error handler callback - one is called before the stack is unwound, the other after. If you only set the error callback for after the unwind there is no stack to do the debugging... I think you can call gh_eval_str_with_stack_saving_handler() or using the scm interface you can call scm_c_catch() which allows you to specify both handlers. cheers, dave _______________________________________________ Guile-user mailing list [email protected] http://lists.gnu.org/mailman/listinfo/guile-user
