home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
sherlock.zip
/
EXCEPT
/
EXCEPT.ZIP
/
EXCEPT.XED
< prev
next >
Wrap
Text File
|
1993-05-19
|
3KB
|
97 lines
/*=======================================================================
* Function : VM Xedit macro to analyse the Stack Dump 16:16
* : application's stack
* Author : Fiammante Marc 02/05/93
*======================================================================*/
say 'Analysing the stack dump .TRP file for 16:16 function calls'
'AUTOSAVE OFF'
'EXTRACT /WRAP/'
'SET WRAP OFF'
'TOP'
'LOCATE /EBP :/'
do i=1 while rc=0
'EXTRACT /CURLINE/'
parse value curline.3 with . . ebp . . eip .
'DOWN 1'
'EXTRACT /CURLINE/'
parse value curline.3 with . . cs . . ss .
ebp=substr(ebp,5,4)
ip=substr(eip,5,4)
/* say '>'EBP'<' */
ssb=x2b(ss)
ssb='000' || substr(ssb,1,length(ssb)-3)
ssn=b2x(ssb)
line=''
'EXTRACT /LINE/'
topline=line.1
dll=''
in=''
'LOCATE /'cs'/'
if rc=0 then do
'LOCATE -/MODULE/'
if rc=0 then do
'EXTRACT /CURLINE/'
parse value curline.3 with . dll .
in='In :'
if pos('.DLL',dll)=0 then do
dll=''
in=''
end
end
end
'BOT'
'INPUT --------------'
'INPUT TRAP number 'i
'INPUT Executing' cs':'ip 'Bp :'ebp in dll
':'line.1
do while rc=0
nextline=ssn || substr(strip(ebp),1,3) || '0'
if line<>nextline then do
'LOCATE /'nextline'/'
if rc<>0 then leave
line=nextline
end
xoffset=substr(ebp,4,1)
offset=x2d(xoffset)
coffset=2*offset
'EXTRACT /CURLINE/'
curline.3=translate(curline.3,' ','>')
curline=space(substr(curline.3,12,39),0)
curline=substr(curline,coffset+1)
if length(curline)<9 then do
'DOWN 1'
'EXTRACT /CURLINE/'
line=substr(curline.3,2,8)
curline.3=translate(curline.3,' ','>')
curline=curline || space(substr(curline.3,12,39),0)
end
ebp=substr(curline,1,4)
ip =substr(curline,5,4)
cs =substr(curline,9,4)
'EXTRACT /LINE/'
':'topline
dll=''
in=''
'LOCATE /'cs'/'
if rc=0 then do
'LOCATE -/MODULE/'
if rc=0 then do
'EXTRACT /CURLINE/'
parse value curline.3 with . dll .
in='In :'
if pos('.DLL',dll)=0 then do
dll=''
in=''
end
end
end
'BOT'
'INPUT Return to' cs':'ip 'Bp :'ebp in DLL
':'line.1
end
':'topline
'LOCATE /EBP :/'
end
'SET WRAP' wrap.1
'MACRO K'