Skip to content

Instantly share code, notes, and snippets.

@kastiglione
Last active May 11, 2016 17:24
Show Gist options
  • Save kastiglione/c5a27e39f1dda34cce4f17c6545b59c6 to your computer and use it in GitHub Desktop.
Save kastiglione/c5a27e39f1dda34cce4f17c6545b59c6 to your computer and use it in GitHub Desktop.
def stdio_print(debugger, command, result, dict):
print "Printing via stdio"
def result_print(debugger, command, result, dict):
print >> result, "Printing via result"
def __lldb_init_module(debugger, dict):
debugger.HandleCommand("command script add -f printing.stdio_print stdio_print")
debugger.HandleCommand("command script add -f printing.result_print result_print")
@kastiglione
Copy link
Author

Add to ~/.lldbinit:

command script import path/to/printing.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment