home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dumptool.zip / SAMPLRPN.ZIP / samplrpn.doc < prev    next >
Text File  |  1997-04-29  |  6KB  |  168 lines

  1. Author: Richard Moore
  2. Date: 29 April 1997
  3. Version: 1.0
  4.  
  5. The SAMPLRPN.ZIP file contains sample trace program files for use with 
  6. DTRACE.
  7.  
  8. The following samples are included. A full description of each one is 
  9. given below:
  10.  
  11.  
  12. 1) TRAPPID.RPN - TRAPDUMP by PID
  13. 2) TRAPANY.RPN - TRAPDUMP for any exception.
  14. 3) TRAPSLOT.RPN - TRAPDUMP by Thread Slot Number
  15. 4) TRAPTID.RPN - TRAPDUMP by TID
  16. 5) TRAPXCPT.RPN - TRAPDUMP by Exception Number
  17. 6) LOGXCPT.RPN - Log any exception, recoverable or not.
  18.  
  19.  
  20.  
  21. Sample Descriptions:
  22.  
  23.  
  24. 1) TRAPPID.RPN - TRAPDUMP by PID
  25.  
  26. This RPN file sets a tracepoint at _XCPTBuildR3DispatcherStack in the 
  27. kernel. This is the routine through which all ring 2 and ring 3 
  28. exceptions pass. The RPN trace program checks against a specific PID,
  29. if a match is found then a system dump is taken. 
  30.  
  31. TRAPDUMP=ON should NOT be specified since all fatal exceptions will
  32. result in a dump.
  33.  
  34. The desired PID may be customised by editing TRAPPID.RPN.
  35.  
  36. For testing purposes, the SYSDUMP command is commented out and replaced
  37. by commands that log the exception. TRAPTRAP.TSF may be compiled using
  38. TRCUST to allows these trace records to be formatted.
  39.  
  40. The RPN file specified _XCPTBuildR3DispatcherStack for the Warp V4 GA
  41. ALLSTRICT kernel.  For other kernel versions OBJECT and OFFSET must be
  42. changed appropriately. See below for a selection.
  43.  
  44.  
  45. 2) TRAPANY.RPN - TRAPDUMP for any exception.
  46.  
  47. This RPN file sets a tracepoint at _XCPTBuildR3DispatcherStack in the 
  48. kernel. This is the routine through which all ring 2 and ring 3 
  49. exceptions pass. When the tracepoint is hit, a system dump is taken.
  50. This technique will allow all exceptions to be intercepted regardless 
  51. of whether they are recoverable. The dump is taken before any exception
  52. handler is able to run.
  53.  
  54. TRAPDUMP=ON need NOT be specified.
  55.  
  56. For testing purposes, the SYSDUMP command is commented out and replaced
  57. by commands that log the exception. TRAPTRAP.TSF may be compiled using
  58. TRCUST to allows these trace records to be formatted.
  59.  
  60. The RPN file specified _XCPTBuildR3DispatcherStack for the Warp V4 GA
  61. ALLSTRICT kernel.  For other kernel versions OBJECT and OFFSET must be
  62. changed appropriately. See below for a selection.
  63.  
  64.  
  65.  
  66. 3) TRAPSLOT.RPN - TRAPDUMP by Thread Slot Number
  67.  
  68. This RPN file sets a tracepoint at _XCPTBuildR3DispatcherStack in the 
  69. kernel. This is the routine through which all ring 2 and ring 3 
  70. exceptions pass. The RPN trace program checks against a specific 
  71. thread slot number, if a match is found then a system dump is taken. 
  72.  
  73. TRAPDUMP=ON should NOT be specified since all fatal exceptions will
  74. result in a dump.
  75.  
  76. The desired Slot may be customised by editing TRAPSLOT.RPN.
  77.  
  78. For testing purposes, the SYSDUMP command is commented out and replaced
  79. by commands that log the exception. TRAPTRAP.TSF may be compiled using
  80. TRCUST to allows these trace records to be formatted.
  81.  
  82. The RPN file specified _XCPTBuildR3DispatcherStack for the Warp V4 GA
  83. ALLSTRICT kernel.  For other kernel versions OBJECT and OFFSET must be
  84. changed appropriately. See below for a selection.
  85.  
  86.  
  87. 4) TRAPTID.RPN - TRAPDUMP by TID
  88.  
  89. This RPN file sets a tracepoint at _XCPTBuildR3DispatcherStack in the 
  90. kernel. This is the routine through which all ring 2 and ring 3 
  91. exceptions pass.  The RPN trace program checks against a specific TID 
  92. and PID, if a match is found then a system dump is taken.
  93.  
  94. TRAPDUMP=ON should NOT be specified since all fatal exceptions will
  95. result in a dump.
  96.  
  97. The desired PID & TID may be customised by editing TRAPSLOT.RPN.
  98.  
  99. For testing purposes, the SYSDUMP command is commented out and replaced
  100. by commands that log the exception. TRAPTRAP.TSF may be compiled using
  101. TRCUST to allows these trace records to be formatted.
  102.  
  103. The RPN file specified _XCPTBuildR3DispatcherStack for the Warp V4 GA
  104. ALLSTRICT kernel.  For other kernel versions OBJECT and OFFSET must be
  105. changed appropriately. See below for a selection.
  106.  
  107.  
  108. 5) TRAPXCPT.RPN - TRAPDUMP by Exception Number
  109.  
  110. This RPN file sets a tracepoint at _XCPTBuildR3DispatcherStack in the 
  111. kernel. This is the routine through which all ring 2 and ring 3 
  112. exceptions pass.  The RPN trace program checks against a specific 
  113. software exception number, if a match is found then a system dump is 
  114. taken.
  115.  
  116. TRAPDUMP=ON should NOT be specified since all fatal exceptions will
  117. result in a dump.
  118.  
  119. The desired exception number may be customised by editing TRAPSLOT.RPN.
  120.  
  121. For testing purposes, the SYSDUMP command is commented out and replaced
  122. by commands that log the exception. TRAPTRAP.TSF may be compiled using
  123. TRCUST to allows these trace records to be formatted.
  124.  
  125. The RPN file specified _XCPTBuildR3DispatcherStack for the Warp V4 GA
  126. ALLSTRICT kernel.  For other kernel versions OBJECT and OFFSET must be
  127. changed appropriately. See below for a selection.
  128.  
  129.  
  130. 6) LOGXCPT.RPN - Log any exception, recoverable or not.
  131.  
  132. This RPN file sets a tracepoint at _XCPTBuildR3DispatcherStack in the 
  133. kernel. This is the routine through which all ring 2 and ring 3 
  134. exceptions pass.  The RPN trace program logs the Client Register 
  135. information (CRI) and the Client Register Stack Frame (CRSF) for the 
  136. current thread. The CRI gives the size and offset into the CRSF for 
  137. each client register.
  138.  
  139. LOGXCPT.TSF may be compiled using TRCUST to allows these trace records
  140. to be formatted.
  141.  
  142. The RPN file specified _XCPTBuildR3DispatcherStack for the Warp V4 GA
  143. ALLSTRICT kernel.  For other kernel versions OBJECT and OFFSET must be
  144. changed appropriately. See below for a selection.
  145.  
  146.  
  147.  
  148.  
  149. _XCPTBuildR3DispatcherStack objects and offsets for various kernels
  150.  
  151. Object:Offset  Kernel Version
  152.  
  153. 000D:0003788B  V4 GA   RETAIL
  154. 000F:00038f93  V4 GA   HSTRICT 
  155. 000F:00046DAF  V4 GA   ALLSTRICT
  156. 000D:000378cB  V4 FP00 RETAIL
  157. 000F:00038fcb  V4 FP00 HSTRICT
  158. 000F:000471ab  V4 FP00 ALLSTRICT
  159. 000d:000378d3  V4 FP01 RETAIL 
  160. 000F:00038fd3  V4 FP01 HSTRICT
  161. 000F:000471ab  V4 FP01 ALLSTRICT 
  162. 000D:00039C23  V3 FP29 RETAIL
  163. 000F:0003b3f7  V3 FP29 HSTRICT
  164. 000F:00048E23  V3 FP29 ALLSTRICT
  165. 000D:00036703  V3 FP24 RETAIL
  166.  
  167.  
  168.