Diff for /gforth/debug.fs between versions 1.3 and 1.6

version 1.3, 1995/11/02 14:20:52 version 1.6, 1997/05/21 20:39:22
Line 1 Line 1
 \ DEBUG.FS     Debugger                                12jun93jaw  \ DEBUG.FS     Debugger                                12jun93jaw
   
   \ Copyright (C) 1995 Free Software Foundation, Inc.
   
   \ This file is part of Gforth.
   
   \ Gforth is free software; you can redistribute it and/or
   \ modify it under the terms of the GNU General Public License
   \ as published by the Free Software Foundation; either version 2
   \ of the License, or (at your option) any later version.
   
   \ This program is distributed in the hope that it will be useful,
   \ but WITHOUT ANY WARRANTY; without even the implied warranty of
   \ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   \ GNU General Public License for more details.
   
   \ You should have received a copy of the GNU General Public License
   \ along with this program; if not, write to the Free Software
   \ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   
 decimal  decimal
   
 VARIABLE IP     \ istruction pointer for debugger  VARIABLE IP     \ istruction pointer for debugger
Line 206  VARIABLE Body Line 224  VARIABLE Body
   
 : NestXT        ( xt -- true | body false )  : NestXT        ( xt -- true | body false )
                 DebugMode c-pass ! C-Output off                  DebugMode c-pass ! C-Output off
                 xtc C-Output on                  xt-see C-Output on
                 c-pass @ DebugMode = dup                  c-pass @ DebugMode = dup
                 IF      ." Cannot debug" cr                  IF      ." Cannot debug" cr
                 THEN ;                           THEN ;         
Line 258  VARIABLE Unnest Line 276  VARIABLE Unnest
                 Nesting @ 0= ?EXIT                  Nesting @ 0= ?EXIT
                 -1 Nesting +! r>                  -1 Nesting +! r>
                 ELSE                  ELSE
                 IP @ >r 1 Nesting +!                  IP @ 1 cells + >r 1 Nesting +!
                 THEN                  THEN
         AGAIN ;          AGAIN ;
   
 : dbg   ' NestXT ?EXIT (debug) Leave-D ;  : dbg   ' NestXT ?EXIT (debug) Leave-D ;
   
 \ : test 1 2 4 swap dup . ;  : TRACE:
           r> (debug) ;
   
   : (TRACE")
           cr
           ." BREAK AT: " type cr
           r> (debug) ;
   
   : TRACE"
           postpone s"
           postpone (TRACE") ; immediate

Removed from v.1.3  
changed lines
  Added in v.1.6


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>