Skip to content

Instantly share code, notes, and snippets.

@supermarin
Last active August 29, 2015 13:57
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 supermarin/9416972 to your computer and use it in GitHub Desktop.
Save supermarin/9416972 to your computer and use it in GitHub Desktop.
# Reveal
command script import ~/.lldb/reveal.py
#!/usr/bin/python
# Loads Reveal.app
# Usage: (lldb) reveal
import lldb
def __lldb_init_module(debugger, dict):
debugger.HandleCommand('command script add -f reveal.reveal_command reveal')
def reveal_command(debugger, command, result, internal_dict):
""" Loads the current app in Reveal.app """
commands = [
'expr (void*)dlopen("/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib", 0x2);',
'expr [(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStart" object:nil];',
'continue'
]
for command in commands:
lldb.debugger.HandleCommand(command)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment