Last active
August 29, 2015 13:57
-
-
Save supermarin/9416972 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reveal | |
command script import ~/.lldb/reveal.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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