User guide
142 CHAPTER 7. THE DEBUGGER
At this point the fi rs t instruction of rdargs is about to be executed. Its return address
is in P1, so a breakpoint can be set to catch the return, as follows:
* p1b8
* c
!! BPT 8: 24243
A= createc B= 1 24243: JNE0 24254
*
A breakpoint can be set at the start of sys, as follows:
* g3b1 Set b re ak point 1
* b Display the currently set of b re ak points
1: sys
8: 24243
9: clihook
* 0b8 0b9 Unset breakpoints 8 and 9
* b Display the remaining breakpoint
1: sys
*
The next three calls of sys will be to write the characters ABC. The following example
steps through these and di spl ays the state of the runtime stack just before the third
call, before leaving the debugger.
* c
!! BPT 1: sys
A= 11 B= 65 21188: SYS
* c
A
!! BPT 1: sys
A= 11 B= 66 21188: SYS
* c
B
!! BPT 1: sys
A= 11 B= 67 21188: SYS
* . 42844: Active coroutine clihook Size 20000 Hwm 127
43284: sys 11 67 312 43228
* , 43268: cnslwrf 37772
* , 43248: wrch 67 32
* , 43228: writes 42915 67
* , 42888: start 42904 42912 0 4407873
* , 42872: clihook 0
* , Base of stack
* 0b1c Clear breakp oi nt 1 and resume
C
210>
The following debugging commands allow the coroutine structure to be explored.