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

  1. ;trapdump by trap number
  2. ;Take a dump when a particular trap raises an exception for the user
  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 d,0xe          ;<=== intercept a trap E. Change this for other traps.
  13. ;
  14. push ss
  15. push esp
  16. push w,4            ;stack +4 = trap number
  17. add
  18. push sis           
  19. cnvrt sxd           ;trap number now a DWORD on rpn stack
  20. sub                 ;compare
  21. jmp zn,dump
  22. abort
  23. ;
  24. ; Note:
  25. ;
  26. ;
  27. ;dump: sysdump      ; remove semi-colon to acivate dump
  28. ;
  29. ;
  30. ;    the following code dumps the parameters on entry to _XcptbuildR3DispatcherStack
  31. ;    this is for debugging this trace program. Comment out to activate the dump.
  32. ;    
  33. dump:push eax
  34. push w,8
  35. push ss
  36. push esp
  37. push w,4
  38. add
  39. log mrs
  40.