While in the Kernel Debugger, there is a structure that
can be searched that gives the address of the trace buffer and first
device handle. For DIAGEX, this structure is diag_cntl. For
PDIAGEX, it is pdiag_cntl. Use the map command to get
the address of the structure.
Note: The following examples are based on a particular debugger.
The concepts shown can be applied using the debugger available to
you.
For instance, for PDIAGEX:
>0> map pdiag_cntl
pdiag_cntl:0x0123F220, type:CSECT Definition
- Use that address and display 100 words:
>0> d 123F220 100
0123F220 FFFFFFFF FFFFFFFF 05C8A400 00000764 |...............d|
0123F230 64677874 72616365 544F5021 21212100 |dgxtraceTOP!!!!.|
0123F240 72775F61 00000004 00000000 00000000 |rw_a............|
0123F250 67697042 00000018 00000004 2FF3B270 |gipB......../..p|
0123F260 67697064 000000C0 00000000 3D7FF018 |gipd........=...|
0123F270 67697045 00000000 3D7FF018 00000000 |gipE....=.......|
0123F280 72775F62 00000001 00000001 00000001 |rw_b............|
0123F290 72775F45 00000000 00000000 00000000 |rw_E............|
0123F2A0 52656445 00000000 20001111 00000000 |RedE.... .......|
0123F2B0 57727442 05C8A200 00000004 00000014 |WrtB............|
0123F2C0 5772742B 14000000 00000001 00000001 |Wrt+............|
0123F2D0 5772742B 00000001 0000007B 00000000 |Wrt+.......{....|
0123F2E0 72775F42 05C8A200 00000001 00000001 |rw_B............|
0123F2F0 72775F2B 00000004 00000014 00000001 |rw_+............|
0123F300 72775F2B 0000007B 14000000 00000001 |rw_+...{........|
0123F310 66685F42 05C8A200 05C8A200 00000000 |fh_B............|
- The first and second words, FFFFFFFF, are locks. Ignore
them.
- The third word (in bold) is a pointer to the linked list of device
handles.
- The fourth word is the start of the internal trace table.
- dgxtraceTOP! defines the TOP of the trace table.
- dgxtraceBOT! defines the end of the trace table.
- The current pointer can be found by searching from this
point for dgxtraceCUR!:
>0> find dgxtraceCUR 123F220
01240FC0 64677874 72616365 43555221 21212121 |dgxtraceCUR!!!!!|
Work backwards from this point to see exactly what
events have taken place to this point.
- As far as the device handles are concerned, display 100
words to see the data associated with the device at that address (the
third word from 2.b above):
>0> d 05C8A400 100
05C8A400 00000000 012438B8 00040040 0000000D |.....$8....@....|
05C8A410 00000003 000000C0 0000002C 00000000 |...........,....|
05C8A420 011759FC 05F1D000 00000000 60054335 |..Y.........`.C5|
05C8A430 00000000 00000000 00000070 000000C0 70 is slot#, C0 is bus id#
05C8A440 00000004 007FF800 00000100 00000000 4 is bus type 7ff800 is io
05C8A450 00000100 00000000 00000000 00000000 address of the bus
The 8th word is a pointer to the next device in
the linked list. In this case the 8th word is 00000000, indicating
this is the only device.