[Ecls-list] How to debug ecl itself?

Juan Jose Garcia-Ripoll lisp at arrakis.es
Sat Apr 1 03:29:06 UTC 2006


Pascal Costanza dijo:
> Is there a way to get useful backtraces and debug information for the
> code that makes up ecl's implementation? As you probably can guess, I
> am especially interested in CLOS.

To reduce image size and increase speed, ECL is built without backtrace
information. Indeed many of the lisp functions call each other directly,
so that the usual lisp backtrace is absent, and one could only use a C
debugger to see actual function calls.

However, this is not the whole story. The core of ECL is small, most of
the library can also be run in interpreted mode. Again, for matter of
speed, this is not usually done and the ordinary installation does not
store neither the sources nor the smallish interpreter ecl_min.

If you want full debug information from ecl do the following:

1) Configure ECL.
2) Change to the "build" directory.
3) Do "make ecl_min"
4) Invoke the bootstrapping interpreter "ecl_min"
5) A lisp prompt appears. Load the core with (load "bare.lsp")
6) Start the toplevel to be able to catch errors with (si::top-level)

I normally do this from the shell buffer in an emacs session in order to
have command line history.

> I have a first version of Closer to MOP running on my machine, and I
> am currently testing some of the MOP extensions I have written, but
> it is very hard to find bugs that are apparently in the CLOS
> implementation itself (or maybe not, but it's hard to tell).

Wow, already a port of Closer? I assume much of the functionality is
missing. In particular that which has to do with make-method-lambda, etc.

BTW, as soon as I return home I will fix the bugs you pointed out.

Juanjo




More information about the ecl-devel mailing list