Skip to content

Instantly share code, notes, and snippets.

@supermarin
Last active August 29, 2015 13:57

Revisions

  1. supermarin revised this gist Mar 7, 2014. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions reveal.py
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    #!/usr/bin/python
    # Loads Reveal.app
    # Usage: (lldb) reveal

    import lldb

  2. supermarin created this gist Mar 7, 2014.
    2 changes: 2 additions & 0 deletions .lldbinit
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    # Reveal
    command script import ~/.lldb/reveal.py
    19 changes: 19 additions & 0 deletions reveal.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    #!/usr/bin/python
    # Loads Reveal.app

    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)