| """ | |
| Automate loading of F-Script Anywhere into any app. | |
| By Daniel Jalkut - @danielpunkass - http://indiestack.com/ | |
| To set up: | |
| 0. Make sure you have FScript.framework installed in /Library/Frameworks (http://www.fscript.org) | |
| 1. Copy this script to ~/.lldb/fsa.py | |
| 2. Add the following to your ~/.lldbinit file: | |
| command script import ~/.lldb/fsa.py | |
| To use: | |
| 1. Attach to a process e.g. by "lldb -n TextEdit" | |
| 2. Type "fsa" to load an initialize F-Script Anywhere in the context of the app. | |
| 3. Type "c" to continue execution of the target app. | |
| """ | |
| def loadFSA(debugger, args, result, internal_dict): | |
| debugger.HandleCommand('expr (void) [[NSBundle bundleWithPath:@"/Library/Frameworks/FScript.framework"] load]'); | |
| debugger.HandleCommand('expr (void)[FScriptMenuItem insertInMainMenu]'); | |
| def __lldb_init_module(debugger, dict): | |
| debugger.HandleCommand('command script add -f fsa.loadFSA fsa'); | |
ifonefox
commented
May 16, 2014
djacobs
commented
May 16, 2014
Nice job @danielpunkass. Good sharing.
mrfabbri
commented
Dec 12, 2014
very handy
mrfabbri
commented
Dec 13, 2014
PS: Added a shortcut for Console and Objects Browser on https://gist.github.com/mrfabbri/307fe3b8d800b2074477 (and a convenience method to use heredocs for lldb commands)
perfaram
commented
Apr 25, 2015
@ifonefox : Me too, I'm getting a "Undeclared identifier" for NSBundle...
wtfaremyinitials
commented
Jul 22, 2015
hankbao
commented
Jan 13, 2016
try this in lldb: expr @import Foundation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This fails when for me typing the command in lldb. I get this error: