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

  1. ;trapdump by Pid number
  2. ;Take a dump when a trap raises an exception for the user in a particular process
  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,0x8b         ;Intercept traps in PID 0x8b (got this from PSTAT)
  13. push w,0x30         ;Segment of TASKAREA (PTDA_InfoSeg)
  14. push w,0xffca       ;Offset of curent Pid in TASKAREA (PTDA_InfoSeg) 
  15. push wis            ;pid now a DWORD on rpn stack 
  16. sub                 ;compare
  17. jmp zn,dump
  18. abort
  19. ;
  20. ; Note:
  21. ;
  22. ;
  23. ;dump: sysdump      ; remove semi-colon to acivate dump
  24. ;
  25. ;
  26. ;    the following code dumps the parameters on entry to _XcptbuildR3DispatcherStack
  27. ;    this is for debugging this trace program. Comment out to activate the dump.
  28. ;    
  29. dump:
  30. push w,8
  31. push ss
  32. push esp
  33. push w,4
  34. add
  35. log mrs
  36.