Created
January 16, 2014 03:13
-
-
Save Roguelazer/8449235 to your computer and use it in GitHub Desktop.
python-assisted gdb breakpoint
This file contains 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
import gdb | |
TARGET = "a" | |
class PyAssistedBreakpoint(gdb.Breakpoint): | |
def stop(self): | |
found_target = False | |
f = gdb.selected_frame() | |
while f is not None: | |
if f.name() == TARGET: | |
found_target = True | |
break | |
f = f.older() | |
if not found_target: | |
return False | |
print found_target | |
return True | |
b = PyAssistedBreakpoint("c") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment