Skip to content

Instantly share code, notes, and snippets.

@dcci
Created March 26, 2018 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcci/bdfa0713a02ced182667aecea65730b9 to your computer and use it in GitHub Desktop.
Save dcci/bdfa0713a02ced182667aecea65730b9 to your computer and use it in GitHub Desktop.
lldb API
# Python reference http://lldb.llvm.org/python-reference.html
import lldb
def main():
dbg = lldb.SBDebugger.Create()
target = dbg.CreateTarget("a.out")
if not target:
print("Can't create target!")
return 1
breakpoint = target.BreakpointCreateByName("main",
target.GetExecutable().GetFilename());
return 0
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment