Skip to content

Instantly share code, notes, and snippets.

@luca-bernardi
Created February 12, 2014 15:47
Show Gist options
  • Save luca-bernardi/8957990 to your computer and use it in GitHub Desktop.
Save luca-bernardi/8957990 to your computer and use it in GitHub Desktop.
import lldb
import commands
import optparse
import shlex
def __lldb_init_module (debugger, dict):
debugger.HandleCommand('command script add -f windowDescription.window_description_command window_description')
print 'The "window_description" command has been installed'
def window_description_command(debbuger, command, result, dict):
debbuger.HandleCommand('expr UIApplication *$uiapp = [UIApplication sharedApplication]')
debbuger.HandleCommand('expr UIApplication *$kw = [$uiapp keyWindow]')
debbuger.HandleCommand('po [$kw recursiveDescription]')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment