Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #13920

Re: Why not more 'advanced' tools?

Newsgroups comp.lang.forth
From Albert van der Horst <albert@spenarnc.xs4all.nl>
Subject Re: Why not more 'advanced' tools?
Date 2012-07-13 01:52 +0000
Message-ID <m72t7b.9zj@spenarnc.xs4all.nl> (permalink)
Organization Dutch Forth Workshop
References <2ea8a4ce-4bd0-4fd6-a19f-81f0f073dd18@re8g2000pbc.googlegroups.com> <wqidnUmPZPsEjmPSnZ2dnUVZ_oWdnZ2d@supernews.com> <661fbd4d-553c-41a2-aab4-6d63b4d91246@googlegroups.com> <be40a4aa-5802-40b7-92b8-836501ba2a60@qq9g2000pbb.googlegroups.com>

Show all headers | View raw


In article <be40a4aa-5802-40b7-92b8-836501ba2a60@qq9g2000pbb.googlegroups.com>,
Hugh Aguilar  <hughaguilar96@yahoo.com> wrote:
>On Jul 11, 7:41=A0pm, Jason Damisch <jasondami...@yahoo.com> wrote:
>> > The Open Firmware debugger let you insert a command to stop the program
>> > and remember extensive state info, leaving you in interactive Forth so
>> > you can type things (examine memory, stack, variables, even change
>> > things, etc.) and return to execution right where it left off. IMO that
>> > was a debugging tool that was well-designed for Forth.
>>
>> I just insert a QUIT when I want to halt the program to examine what it i=
>s doing at a particular point.
>>
>> Jason
>
>In Forth-83 I had this word:
>
>: QI  query interpret ;
>
>This allows you to interactively execute some code to look at the
>stack, look at variables, etc. If you want to get another shot, just
>type QI at the end of the line before you hit the <return> key. If you
>are done, then don't type QI but just hit the <return> key --- the
>program will continue from where you interrupted it. If you want to
>end the program (usually because you found the bug and need to fix it
>in the source), then type QUIT and the program is terminated.
>
>Something similar can be done in ANS-Forth, although I haven't written
>it yet so I'm not sure off hand how to write it. If you know what you
>are doing, then you don't need QI any more than you need a debugger
>--- nowadays my code pretty much works the first time, and I don't
>really struggle much with bugs.

What you can do in most any ANS-Forth is copy the code of QUIT
and leave out the part where the return stack is reset.
If QUIT ends on a ^D , that is all you need to have a BREAK
command that will allow you to inspect and go on, and even
inspect a return stack trace.

Groetjes Albert

--
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Why not more 'advanced' tools? Jason Damisch <jasondamisch@yahoo.com> - 2012-07-11 11:10 -0700
  Re: Why not more 'advanced' tools? mhx@iae.nl - 2012-07-11 15:45 -0700
    Re: Why not more 'advanced' tools? "Elizabeth D. Rather" <erather@forth.com> - 2012-07-11 13:08 -1000
      Re: Why not more 'advanced' tools? mhx@iae.nl - 2012-07-11 16:39 -0700
        Re: Why not more 'advanced' tools? "Elizabeth D. Rather" <erather@forth.com> - 2012-07-11 14:00 -1000
          Re: Why not more 'advanced' tools? Jason Damisch <jasondamisch@yahoo.com> - 2012-07-11 19:41 -0700
            Re: Why not more 'advanced' tools? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-07-11 22:22 -0700
              Re: Why not more 'advanced' tools? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-12 01:31 -0700
              Re: Why not more 'advanced' tools? Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-13 01:52 +0000
            Re: Why not more 'advanced' tools? "Elizabeth D. Rather" <erather@forth.com> - 2012-07-11 20:43 -1000
              Re: Why not more 'advanced' tools? Roelf Toxopeus <rt4all@notthis.hetnet.nl> - 2012-07-12 12:05 +0200
                Re: Why not more 'advanced' tools? Coos Haak <chforth@hccnet.nl> - 2012-07-12 16:25 +0200
        Re: Why not more 'advanced' tools? Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-12 23:50 +0200
          Re: Why not more 'advanced' tools? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-13 13:43 +0000
    Re: Why not more 'advanced' tools? vandys@vsta.org - 2012-07-12 00:29 +0000
  Re: Why not more 'advanced' tools? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-07-11 22:13 -0700
    Re: Why not more 'advanced' tools? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-12 01:29 -0700
      Re: Why not more 'advanced' tools? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-07-12 02:09 -0700
  Re: Why not more 'advanced' tools? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-12 07:17 -0500
    Re: Why not more 'advanced' tools? Fanzo <cristianof6@gmail.com> - 2012-07-12 20:19 +0200
      Re: Why not more 'advanced' tools? "Elizabeth D. Rather" <erather@forth.com> - 2012-07-12 08:45 -1000
      Re: Why not more 'advanced' tools? stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-12 19:47 +0000
      Re: Why not more 'advanced' tools? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-07-12 14:54 -0700

csiph-web