[net.lang.forth] Step Ladder Wanted

liberte@uiucdcs.UUCP (04/30/84)

#N:uiucdcs:30900006:000:1729
uiucdcs!liberte    Apr 29 16:49:00 1984

  One of the many reasons I stopped using Forth is the lack of debugging
facillities, at least in the version I had.  But I have not heard of 
any version with stepping capabilities:

  I would like to be able to step through any given program, one word
at a time, with the ability to examine the stacks, or run any other
words and then resume stepping, or turn off stepping.  The effect of
stepping is to breakpoint at every word.  

  It would be acceptable to have to compile a word in a special way to
activate stepping, but it would be preferable to activate stepping
with a command like "step prog" for the already compiled word "prog". 

  I tried to implement stepping but ran into the difficulty of stopping
a word once it started.  The code to start the next word within a word 
is found at the end of the previous word's definition in ;S, I believe.
One possiblity is to link from the ;S code to your own code that checks
whether stepping is activated for a given word. Too complicated.

  Another possibility is to replace the CFA link in the word to be stepped
through (which refers to the do : code) to refer to a stepping executor.
Each step would load up the next word to be executed and execute it, but
then when it returns, it would return to the next word in the stepping
executor.  This is also complicated, but gives more control.

  Anyone up to the challange of implementing just this stepping feature.
I think it would sell well if it were within a comprehensive debugging
package that could be applied to any fig-Forth implementation without
system hacking.  I would have bought one.

Daniel LaLiberte,  U of Illinois, Urbana-Champaign, Computer Science
{moderation in all things - including moderation}