Created
April 22, 2019 15:33
-
-
Save acoomans/c24cb544b05fef2edf8258cce59704a0 to your computer and use it in GitHub Desktop.
LLDB Python helper
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
def GetBundleIdentifier(debugger): | |
debugger.GetSelectedTarget().GetProcess().GetThreadAtIndex(0).GetSelectedFrame() | |
options = lldb.SBExpressionOptions() | |
options.SetLanguage(lldb.eLanguageTypeSwift) | |
bundle_identifier = frame.EvaluateExpression('Bundle.main.bundleIdentifier', options).description.translate(None, '"').strip() | |
if not bundle_identifier: | |
bundle_identifier = "no-bundle-id" | |
debug('bundle_identifier = ' + bundle_identifier) | |
return bundle_identifier |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment