3 Using the Cecil Debugger
debug> goto 0
# 0 run (t: <anon/DeviceTaskRec/: 0x183f55>,
/Packet/: 0x15e859>), richards.cecil:153
debug> print t
<anon/DeviceTaskRec/: 0x183f55>
map: CecilMap 0x119978, id: 203 (anon/DeviceTaskRec/)
8 fields:
packetPending@TaskState, offset 0: false
taskWaiting@TaskState, offset 1: false
taskHolding@TaskState, offset 2: false
link@TaskControlBlock, offset 3: <anon/DeviceTaskRec/: 0x183f79>
ident@TaskControlBlock, offset 4: 6
priority@TaskControlBlock, offset 5: 5000
input@TaskControlBlock, offset 6: 0
pending@DeviceTaskRec, offset 7: 0
It is also possible to print the object addressed by any of the hex numbers printed out by a stack dump or a print command (other than the address of the internal CecilMap data structure). Note that if there is not an object that starts at the requested address, the debugger is likely to crash. This second usage of print can be used to trace through data structures. For example, we can look at the object stored in the link field of the t formal parameter:
debug> print 0x183f79
<anon/DeviceTaskRec/: 0x183f79>
map: CecilMap 0x119978, id: 203 (anon/DeviceTaskRec/)
8 fields:
packetPending@TaskState, offset 0: true
taskWaiting@TaskState, offset 1: false
taskHolding@TaskState, offset 2: true
link@TaskControlBlock, offset 3: <anon/HandlerTaskRec/: 0x17b5f1>
ident@TaskControlBlock, offset 4: 5
priority@TaskControlBlock, offset 5: 4000
input@TaskControlBlock, offset 6: <anon/Packet/: 0x15e8e9>
pending@DeviceTaskRec, offset 7: <anon/Packet/: 0x15e8b9>
debug>
Generated with Harlequin WebMaker