home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dumptool.zip / SAMPLRPN.ZIP / trapslot.rpn < prev    next >
Text File  |  1997-01-27  |  934b  |  37 lines

  1. ;trapdump by Thread Slot number
  2. ;Take a dump when a trap raises an exception for the user in a particular thead slot
  3. ;
  4. major=255
  5. hmte=6 ;os2krnl
  6. ;
  7. minor=1
  8. opcode=0x55         ;push
  9. object=0xf          ;GA Merlin 9.023 ALLSTRICT Kernel
  10. offset=0x46daf      ;   _XCPTBuildR3DispatcherStack segment:offset
  11. ;
  12. push w,0x75         ;Intercept traps in Slot 0x75 (got this from the KDB)
  13. push w,0x150b       ;curent TIB selector
  14. push w,0x14         ;Offset of slot no. in TIB
  15. push wis            ;slot now a DWORD on rpn stack 
  16. sub                 ;compare
  17. jmp zn,dump         ;go dump if slot matches
  18. abort
  19.  
  20. ;
  21. ; Note:
  22. ;
  23. ;
  24. ;dump: sysdump      ; remove semi-colon to acivate dump
  25. ;
  26. ;
  27. ;    the following code dumps the parameters on entry to _XcptbuildR3DispatcherStack
  28. ;    this is for debugging this trace program. Comment out to activate the dump.
  29. ;    
  30. dump:
  31. push w,8
  32. push ss
  33. push esp
  34. push w,4
  35. add
  36. log mrs
  37.