Trees | Indices | Help |
---|
|
1 ''' 2 A module with some cute toys for monitoring allocations. 3 ''' 4 5 import vtrace 6 7 import envi.archs.i386 as e_i386 82111 vtrace.Breakpoint.__init__(self, addr) 12 self.fastbreak = True 13 self._chsize = chsize 14 self._chflags = chflags1523 274129 30 sp = trace.getStackCounter() 31 ( saved_eip, 32 heap, 33 flags, 34 size ) = trace.readMemoryFormat(sp, '<4P') 35 36 if trace.getBreakpointByAddr(saved_eip) == None: 37 bp = ReturnBreak(saved_eip, size, flags) 38 trace.addBreakpoint(bp) 39 40 trace.runAgain()43 ''' 44 Add a breakpoint to ntdll.RtlAllocateHeap to watch for 45 allocations and track who made them... 46 ''' 47 clearHeapAllocs(trace) 48 addr = trace.parseExpression('ntdll.RtlAllocateHeap') 49 bp = RtlAllocateHeapBreak(addr) 50 trace.addBreakpoint(bp)5153 trace.setMeta('HeapAllocs', [])5456 ''' 57 Return a list of (caller_eip, heap_chunk, size, flags) tuples 58 ''' 59 return trace.getMeta('HeapAllocs', [])60
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Nov 16 18:22:26 2012 | http://epydoc.sourceforge.net |