-
-
Save aufflick/8090606 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
""" File: reveal.py | |
Add to ~/.lldbinit: | |
command script import ~/.lldb-scripts/reveal.py | |
Q: Want to automatically load the Reveal lib on launch while debugging from Xcode? | |
A: In Xcode: | |
Add a Symbolic Breakpoint | |
Symbol: "UIApplicationMain" | |
Action: Debugger Command with value "reveal" | |
Tick "Automatically continue after evaluating" | |
""" | |
__author__ = 'Chris Miles' | |
__copyright__ = 'Copyright (c) Chris Miles 2013' | |
__license__ = 'MIT' | |
from subprocess import call | |
import lldb | |
def auto_load_reveal(debugger, command, result, dict): | |
lldb.debugger.HandleCommand('call (void*)dlopen("/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib", 0x2)') | |
lldb.debugger.HandleCommand('call (void)[(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStart" object:nil]') | |
call(["open", "-a", "/Applications/Reveal.app"]) | |
# lldb.debugger.HandleCommand('continue') | |
def __lldb_init_module(debugger, internal_dict): | |
debugger.HandleCommand('command script add -f reveal.auto_load_reveal reveal') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment