Changeset 3129
- Timestamp:
- Aug 3, 2012 11:23:39 PM (11 months ago)
- File:
-
- 1 edited
-
forth/lib/debug.fth (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
forth/lib/debug.fth
r3128 r3129 127 127 d# 45 constant stack-column 128 128 \ 0 0 2value result-loc 129 0 0 2value full-stack-xy 129 130 0 value result-line 130 131 0 value result-col 131 132 : to-stack-location ( -- ) stack-column stack-line at-xy kill-line ; 133 : show-full-stack ( -- ) 134 full-stack-xy at-xy kill-line 135 depth 0< if ." Stack Underflow" exit then \ Don't clear stack here 136 depth 0= if ." Empty" exit then 137 depth 7 > if ." .. " then 138 depth depth 7 - 0 max ?do depth i - 1- pick n. loop 139 ; 132 140 : show-partial-stack ( -- ) 141 show-full-stack 142 133 143 to-stack-location 134 144 … … 136 146 depth 0< if ." Stack Underflow" sp0 @ sp! exit then 137 147 depth 0= if ." Empty" exit then 138 depth 4> if ." .. " then139 depth depth 5- 0 max ?do depth i - 1- pick n. loop148 depth 3 > if ." .. " then 149 depth depth 4 - 0 max ?do depth i - 1- pick n. loop 140 150 ; 141 151 … … 192 202 ." Callers: " rp0 @ the-rp na1+ rslist kill-line cr 193 203 d# 40 rmargin ! 204 ." Stack: " #out @ #line @ to full-stack-xy cr \ For stack 194 205 the-ip debug-see 195 206 cr
Note: See TracChangeset
for help on using the changeset viewer.
