guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PLEASE: debugging embedded guile code


From: Bruce Korb
Subject: Re: PLEASE: debugging embedded guile code
Date: Fri, 16 May 2003 14:56:46 -0700

Rob Browning wrote:

> I think perhaps this:
> 
> >>    SCM str = gh_str02scm( "...whatever..." );
> >>    SCM proc = scm_c_lookup( "eval-client-input" );
> >>    scm_call_1(proc, str);
> 
> Should be
> 
>   SCM str = gh_str02scm( "...whatever..." );
>   SCM proc_var = scm_c_lookup( "eval-client-input" );
>   scm_call_1(SCM_VARIABLE_REF(proc), str);
> 
> I believe scm_c_lookup returns variables rather than values.

Better!  But:

../agen5/autogen -L ../autoopts -Taginfo -bcolumns -DLEVEL=section \
        ../columns/opts.def
ERROR: Unbound variable: stack-catch
ABEND-ing in LOAD_TPL state
Failing Guile command:  = = = = =
(setenv "SHELL" "/bin/sh")
* * * * * * * * * * * * * * * * *

What is the "stack-catch" thing?
Should it be pre-defined by Guile?  Is it obsolete?
Thanks!! - Bruce

P.S.  Here's the definition for eval-client-input
that was suggested to me:

(define (eval-client-input str)
  (stack-catch #t
    (lambda ()
      (call-with-input-string str
        (lambda (p)
          (set-port-filename! p (tpl-file))
          (set-port-line! p (string->number (tpl-file-line "%2$d")))
          (list (primitive-eval (read p))))))
    (lambda (key . args)
      (apply display-error
         (fluid-ref the-last-stack)
         (current-error-port)
         args)
      (set! stack-saved? #f)
      #f
) ) )




reply via email to

[Prev in Thread] Current Thread [Next in Thread]