Skip to content

Instantly share code, notes, and snippets.

@tahaconfiant
Created December 10, 2019 09:33
Show Gist options
  • Save tahaconfiant/7e658c55a1388a7ac2d78db3c7240ec2 to your computer and use it in GitHub Desktop.
Save tahaconfiant/7e658c55a1388a7ac2d78db3c7240ec2 to your computer and use it in GitHub Desktop.
waitpid_callback_part2
# Let's attempt to attach to the child process
listener = lldb.SBListener('listener')
error = lldb.SBError()
child = curr_target.AttachToProcessWithID(listener, child_pid, error)
if not error.Success():
print ("error %s\n" % error.GetCString())
raise Exception('Failed to attach to the process.')
assert child.IsValid()
else:
print ("sucessfully attached to child, with pid : %s\n" % str(child.GetProcessID()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment