[Next] [Previous] [Up] [Top]

3 Using the Cecil Debugger

3.4 print

The print command prints, in a very low-level way, the object contained in any variable visible through lexical scoping from the current stack frame. For example,

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> 

How to Use the Vortex Compiler - 20 JAN 97
[Next] [Previous] [Up] [Top]