Skip to content

Instantly share code, notes, and snippets.

@tahaconfiant
Created December 10, 2019 09:15
Show Gist options
  • Save tahaconfiant/215108724625d1326db8f31d487276be to your computer and use it in GitHub Desktop.
Save tahaconfiant/215108724625d1326db8f31d487276be to your computer and use it in GitHub Desktop.
follow-fork-child-breakpoints
def custom_breakpoints(debugger, command, result, internal_dict):
target = debugger.GetSelectedTarget()
breakpoint = target.BreakpointCreateByName("fork")
breakpoint.SetScriptCallbackFunction('follow_fork_child.fork_callback')
breakpoint = target.BreakpointCreateByName("waitpid")
breakpoint.SetScriptCallbackFunction('follow_fork_child.waitpid_callback')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment