Changeset 3341
- Timestamp:
- Sep 27, 2012 11:17:26 PM (8 months ago)
- File:
-
- 1 edited
-
forth/lib/debug.fth (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
forth/lib/debug.fth
r3329 r3341 38 38 variable res 39 39 headers 40 false value redisplay? 40 41 -1 value displayed-xt 42 : force-redisplay ( -- ) -1 to displayed-xt ; 41 43 42 44 : (debug) (s low-adr hi-adr -- ) … … 47 49 then 48 50 step? on 49 true is redisplay? 50 ; 51 force-redisplay 52 ; 53 51 54 headerless 52 55 : 'unnest (s pfa -- pfa' ) … … 189 192 0 value the-ip 190 193 0 value the-rp 194 : redisplay? ( -- flag ) displayed-xt the-ip find-cfa <> ; 195 191 196 : (.rs ( -- ) 192 197 show-rstack @ 0= if exit then … … 211 216 ." Stack: " #out @ #line @ to full-stack-xy cr \ For stack 212 217 the-ip debug-see 218 the-ip find-cfa to displayed-xt 213 219 cr 214 220 \ Display the initial stack on the cursor line … … 225 231 then 226 232 0 show-rstack ! 227 false is redisplay?228 233 then 229 234 ; … … 270 275 ascii C of \ Continue 271 276 step? @ 0= step? ! 272 step? @ 0= if true to scrolling-debug? true to redisplay?then277 step? @ 0= if true to scrolling-debug? force-redisplay then 273 278 true 274 279 endof … … 291 296 ascii \ of show-rstack @ 0= show-rstack ! false endof \ toggle return stack display 292 297 ascii X of hex-stack @ 0= hex-stack ! false endof \ toggle heX stack display 293 ascii L of true to redisplay?false endof \ Redisplay298 ascii L of force-redisplay false endof \ Redisplay 294 299 ascii V of \ toggle Visual (2D) mode 295 300 scrolling-debug? 0= to scrolling-debug? 296 scrolling-debug? 0= if true to redisplay?then false301 scrolling-debug? 0= if force-redisplay then false 297 302 endof 298 303 ( default ) true swap … … 310 315 \ scrolling-debug? 0= if to-result-loc then 311 316 the-ip token@ dup ['] unnest = swap ['] exit = or if 312 cr true is redisplay?317 cr force-redisplay 313 318 then 314 319 slow-next? @ if pnext then … … 326 331 ; 327 332 : debugging ( -- ) ' .debug-short-help dup (debug execute ; 328 : resume (s -- ) true is exit-interact? pnext ;333 : resume (s -- ) true is exit-interact? force-redisplay pnext ; 329 334 : stepping (s -- ) step? on ; 330 335 : tracing (s -- ) step? off ;
Note: See TracChangeset
for help on using the changeset viewer.
