Article View: net.lang.forth
Article #94Step Ladder Wanted - (nf)
From: liberte
Date: Sun, 29 Apr 1984 21:49
Date: Sun, 29 Apr 1984 21:49
35 lines
2413 bytes
2413 bytes
#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}
Technical Details
Message-ID:
<30900006@uiucdcs.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!inuxc!pur-ee!uiucdcs!liberteShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles $Revision: 1.6.2.13 $; site uiucdcs.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!inuxc!pur-ee!uiucdcs!liberte From: liberte@uiucdcs.UUCP Newsgroups: net.lang.forth Subject: Step Ladder Wanted - (nf) Message-ID: <30900006@uiucdcs.UUCP> Date: Sun, 29-Apr-84 17:49:00 EDT Article-I.D.: uiucdcs.30900006 Posted: Sun Apr 29 17:49:00 1984 Date-Received: Thu, 3-May-84 20:00:40 EDT Lines: 35 Nf-ID: #N:uiucdcs:30900006:000:1729 Nf-From: uiucdcs!liberte Apr 29 16:49:00 1984