home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
dumptool.zip
/
SAMPLRPN.ZIP
/
traptid.rpn
< prev
next >
Wrap
Text File
|
1997-01-27
|
1KB
|
46 lines
;trapdump by Pid & Tid number
;Take a dump when a trap raises an exception for the user in a particular process
;
major=255
hmte=6 ;os2krnl
;
minor=1
opcode=0x55 ;push
object=0xf ;GA Merlin 9.023 ALLSTRICT Kernel
offset=0x46daf ; _XCPTBuildR3DispatcherStack segment:offset
;
push w,0xa0 ;Intercept traps in PID 0xa0 (got this from PSTAT)
push w,0x30 ;Segment of TASKAREA (PTDA_InfoSeg)
push w,0xffca ;Offset of curent Pid in TASKAREA (PTDA_InfoSeg)
push wis ;pid now a DWORD on rpn stack
sub ;compare
jmp zn,chktid ;go check tid if pid matches
abort
;
chktid:
push w,0x01 ;Inercept traps in tid 0x01
push w,0x30 ; Segment of TASKAREA
push w,0xffd0 ;Offset of curent Tid in TASKAREA (PTDA_InfoSeg)
push wis ;tid now a DWORD on rpn stack
sub ;compare
jmp zn,dump ;go dump if tid matches
abort
;
; Note:
;
;
;dump: sysdump ; remove semi-colon to acivate dump
;
;
; the following code dumps the parameters on entry to _XcptbuildR3DispatcherStack
; this is for debugging this trace program. Comment out to activate the dump.
;
dump:push eax
push w,8
push ss
push esp
push w,4
add
log mrs