Last active
October 2, 2020 20:25
-
-
Save gabrielschulhof/2128e79eb27d89a5f55897ad9b747f4f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FinishMapsBreak (gdb.FinishBreakpoint): | |
def stop(self): | |
gdb.write('----------- End Event ------------\n') | |
gdb.flush() | |
return False | |
def out_of_scope(self): | |
return self.stop() | |
class MapsBreak (gdb.Breakpoint): | |
def stop(self): | |
gdb.write('----------- Start Event -----------\n') | |
gdb.flush() | |
gdb.execute('bt 10') | |
FinishMapsBreak() | |
return False | |
gdb.execute("set pagination off") | |
gdb.execute("set breakpoint pending on") | |
gdb.execute("set style enabled off") | |
gdb.execute("start") | |
MapsBreak("mmap") | |
MapsBreak("munmap") | |
MapsBreak("mremap") | |
MapsBreak("madvise") | |
MapsBreak("mprotect") | |
gdb.execute("continue") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment