Just to throw my two cents into the ring... I worked on an Interlisp system many years ago. It had a break and trace package written in Lisp. It's at https://github.com/blakemcbride/LISPF4 in case it is helpful.
--blake
On Sun, Aug 2, 2020 at 6:50 PM Alan Ruttenberg alanruttenberg@gmail.com wrote:
I've wanted this too for a while, but it hasn't reached the top, so I'm very happy to hear you are interested in this. I believe I thought the starting point should be in src/org/armedbear/Lisp.java which hosts what looks like an evaluator. Look for
public static final LispObject eval(final LispObject obj, final Environment env, final LispThread thread)
For instance at "else if (obj instanceof Cons)" it is handling evaluation of a cons, with the first section handling the case where the first element is a symbol and checking for whether it names a function, macro, or special form. Below that it handles the case where there's a lambda in the function position. There's a hook for profiling that counts function calls - presumably that would be one place to hook. You'll need to follow it to see how special forms are processed, etc.
If, in slime you execute e.g. (defun foo (a b &optional c) (and c (+ a b))) and (inspect #'foo), you'll see how ABCL represents evaluated functions.
Alan
On Sun, Aug 2, 2020 at 8:35 AM loveleague loveleague@protonmail.com wrote:
Hello,
While reading through the release manual, I came across the realization -- from section 1.1.2 -- that ABCL still needs an implementation of the STEP function.
I would like to look into the details of the hurdles one might need to overcome to bring STEP functionality to ABCL. I imagine there may be some additional challenges from dealing with the JVM, but I'm not well versed as of yet on the topic of debuggers or JVM internals.
If it would be possible to share some details on where one would get started in trying to approach this, that would be appreciated.
- Luke