diff --git a/commands/FBAccessibilityCommands.py b/commands/FBAccessibilityCommands.py index f71543c..d8d367a 100644 --- a/commands/FBAccessibilityCommands.py +++ b/commands/FBAccessibilityCommands.py @@ -78,9 +78,9 @@ def forceStartAccessibilityServer(): if not fb.evaluateBooleanExpression('[UIView instancesRespondToSelector:@selector(_accessibilityElementsInContainer:)]'): #Starting accessibility server is different for simulator and device if fb.evaluateExpressionValue('(id)[[UIDevice currentDevice] model]').GetObjectDescription().lower().find('simulator') >= 0: - lldb.debugger.HandleCommand('expr (void)[[UIApplication sharedApplication] accessibilityActivate]') + lldb.debugger.HandleCommand('eobjc (void)[[UIApplication sharedApplication] accessibilityActivate]') else: - lldb.debugger.HandleCommand('expr (void)[[[UIApplication sharedApplication] _accessibilityBundlePrincipalClass] _accessibilityStartServer]') + lldb.debugger.HandleCommand('eobjc (void)[[[UIApplication sharedApplication] _accessibilityBundlePrincipalClass] _accessibilityStartServer]') def accessibilityLabel(view): #using Apple private API to get real value of accessibility string for element. diff --git a/commands/FBAutoLayoutCommands.py b/commands/FBAutoLayoutCommands.py index bbf38e4..6e2fe22 100644 --- a/commands/FBAutoLayoutCommands.py +++ b/commands/FBAutoLayoutCommands.py @@ -40,8 +40,8 @@ def setBorderOnAmbiguousViewRecursive(view, width, color): isAmbiguous = fb.evaluateBooleanExpression('(BOOL)[%s hasAmbiguousLayout]' % view) if isAmbiguous: layer = viewHelpers.convertToLayer(view) - lldb.debugger.HandleCommand('expr (void)[%s setBorderWidth:(CGFloat)%s]' % (layer, width)) - lldb.debugger.HandleCommand('expr (void)[%s setBorderColor:(CGColorRef)[(id)[UIColor %sColor] CGColor]]' % (layer, color)) + lldb.debugger.HandleCommand('eobjc (void)[%s setBorderWidth:(CGFloat)%s]' % (layer, width)) + lldb.debugger.HandleCommand('eobjc (void)[%s setBorderColor:(CGColorRef)[(id)[UIColor %sColor] CGColor]]' % (layer, color)) subviews = fb.evaluateExpression('(id)[%s subviews]' % view) subviewsCount = int(fb.evaluateExpression('(int)[(id)%s count]' % subviews)) diff --git a/commands/FBComponentCommands.py b/commands/FBComponentCommands.py index 3319cf6..08f885d 100644 --- a/commands/FBComponentCommands.py +++ b/commands/FBComponentCommands.py @@ -32,10 +32,10 @@ def options(self): def run(self, arguments, options): if options.set: - lldb.debugger.HandleCommand('expr (void)[CKComponentDebugController setDebugMode:YES]') + lldb.debugger.HandleCommand('eobjc (void)[CKComponentDebugController setDebugMode:YES]') print 'Debug mode for ComponentKit has been set.' elif options.unset: - lldb.debugger.HandleCommand('expr (void)[CKComponentDebugController setDebugMode:NO]') + lldb.debugger.HandleCommand('eobjc (void)[CKComponentDebugController setDebugMode:NO]') print 'Debug mode for ComponentKit has been unset.' else: print 'No option for ComponentKit Debug mode specified.' diff --git a/commands/FBDisplayCommands.py b/commands/FBDisplayCommands.py index ee4046c..5370135 100644 --- a/commands/FBDisplayCommands.py +++ b/commands/FBDisplayCommands.py @@ -51,8 +51,8 @@ def run(self, args, options): colorClassName = 'NSColor' layer = viewHelpers.convertToLayer(args[0]) - lldb.debugger.HandleCommand('expr (void)[%s setBorderWidth:(CGFloat)%s]' % (layer, options.width)) - lldb.debugger.HandleCommand('expr (void)[%s setBorderColor:(CGColorRef)[(id)[%s %sColor] CGColor]]' % (layer, colorClassName, options.color)) + lldb.debugger.HandleCommand('eobjc (void)[%s setBorderWidth:(CGFloat)%s]' % (layer, options.width)) + lldb.debugger.HandleCommand('eobjc (void)[%s setBorderColor:(CGColorRef)[(id)[%s %sColor] CGColor]]' % (layer, colorClassName, options.color)) lldb.debugger.HandleCommand('caflush') @@ -68,7 +68,7 @@ def args(self): def run(self, args, options): layer = viewHelpers.convertToLayer(args[0]) - lldb.debugger.HandleCommand('expr (void)[%s setBorderWidth:(CGFloat)%s]' % (layer, 0)) + lldb.debugger.HandleCommand('eobjc (void)[%s setBorderWidth:(CGFloat)%s]' % (layer, 0)) lldb.debugger.HandleCommand('caflush') diff --git a/commands/FBInvocationCommands.py b/commands/FBInvocationCommands.py index e34c2f3..8ccbdb1 100644 --- a/commands/FBInvocationCommands.py +++ b/commands/FBInvocationCommands.py @@ -114,8 +114,8 @@ def prettyPrintInvocation(frame, invocation): for argDescription in argDescriptions: s = re.sub(r'argument [0-9]+: ', '', argDescription) - lldb.debugger.HandleCommand('expr void *$v') - lldb.debugger.HandleCommand('expr (void)[' + invocation + ' getArgument:&$v atIndex:' + str(index) + ']') + lldb.debugger.HandleCommand('eobjc void *$v') + lldb.debugger.HandleCommand('eobjc (void)[' + invocation + ' getArgument:&$v atIndex:' + str(index) + ']') address = findArgAdressAtIndexFromStackFrame(frame, index) diff --git a/commands/FBVisualizationCommands.py b/commands/FBVisualizationCommands.py index 5f68077..b91ecdd 100755 --- a/commands/FBVisualizationCommands.py +++ b/commands/FBVisualizationCommands.py @@ -83,9 +83,9 @@ def _showColor(color): colorToUse = '[UIColor colorWithCIColor:(CIColor *){}]'.format(color) imageSize = 58 - lldb.debugger.HandleCommand('expr (void)UIGraphicsBeginImageContextWithOptions((CGSize)CGSizeMake({imageSize}, {imageSize}), NO, 0.0)'.format(imageSize=imageSize)) - lldb.debugger.HandleCommand('expr (void)[(id){} setFill]'.format(colorToUse)) - lldb.debugger.HandleCommand('expr (void)UIRectFill((CGRect)CGRectMake(0.0, 0.0, {imageSize}, {imageSize}))'.format(imageSize=imageSize)) + lldb.debugger.HandleCommand('eobjc (void)UIGraphicsBeginImageContextWithOptions((CGSize)CGSizeMake({imageSize}, {imageSize}), NO, 0.0)'.format(imageSize=imageSize)) + lldb.debugger.HandleCommand('eobjc (void)[(id){} setFill]'.format(colorToUse)) + lldb.debugger.HandleCommand('eobjc (void)UIRectFill((CGRect)CGRectMake(0.0, 0.0, {imageSize}, {imageSize}))'.format(imageSize=imageSize)) frame = lldb.debugger.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame() result = frame.EvaluateExpression('(UIImage *)UIGraphicsGetImageFromCurrentImageContext()') @@ -96,13 +96,13 @@ def _showColor(color): image = result.GetValue() _showImage(image) - lldb.debugger.HandleCommand('expr (void)UIGraphicsEndImageContext()') + lldb.debugger.HandleCommand('eobjc (void)UIGraphicsEndImageContext()') def _showLayer(layer): layer = '(' + layer + ')' - lldb.debugger.HandleCommand('expr (void)UIGraphicsBeginImageContextWithOptions(((CGRect)[(id)' + layer + ' bounds]).size, NO, 0.0)') - lldb.debugger.HandleCommand('expr (void)[(id)' + layer + ' renderInContext:(void *)UIGraphicsGetCurrentContext()]') + lldb.debugger.HandleCommand('eobjc (void)UIGraphicsBeginImageContextWithOptions(((CGRect)[(id)' + layer + ' bounds]).size, NO, 0.0)') + lldb.debugger.HandleCommand('eobjc (void)[(id)' + layer + ' renderInContext:(void *)UIGraphicsGetCurrentContext()]') frame = lldb.debugger.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame() result = frame.EvaluateExpression('(UIImage *)UIGraphicsGetImageFromCurrentImageContext()') @@ -112,7 +112,7 @@ def _showLayer(layer): image = result.GetValue() _showImage(image) - lldb.debugger.HandleCommand('expr (void)UIGraphicsEndImageContext()') + lldb.debugger.HandleCommand('eobjc (void)UIGraphicsEndImageContext()') def _dataIsImage(data): data = '(' + data + ')' diff --git a/fblldbviewhelpers.py b/fblldbviewhelpers.py index a6534d8..76e0826 100644 --- a/fblldbviewhelpers.py +++ b/fblldbviewhelpers.py @@ -12,10 +12,10 @@ import fblldbbase as fb def flushCoreAnimationTransaction(): - lldb.debugger.HandleCommand('expr (void)[CATransaction flush]') + lldb.debugger.HandleCommand('eobjc (void)[CATransaction flush]') def setViewHidden(object, hidden): - lldb.debugger.HandleCommand('expr (void)[' + object + ' setHidden:' + str(int(hidden)) + ']') + lldb.debugger.HandleCommand('eobjc (void)[' + object + ' setHidden:' + str(int(hidden)) + ']') flushCoreAnimationTransaction() def maskView(viewOrLayer, color, alpha): @@ -30,16 +30,16 @@ def maskView(viewOrLayer, color, alpha): size.GetChildMemberWithName('height').GetValue()) mask = fb.evaluateExpression('(id)[[UIView alloc] initWithFrame:%s]' % rectExpr) - lldb.debugger.HandleCommand('expr (void)[%s setTag:(NSInteger)%s]' % (mask, viewOrLayer)) - lldb.debugger.HandleCommand('expr (void)[%s setBackgroundColor:[UIColor %sColor]]' % (mask, color)) - lldb.debugger.HandleCommand('expr (void)[%s setAlpha:(CGFloat)%s]' % (mask, alpha)) - lldb.debugger.HandleCommand('expr (void)[%s addSubview:%s]' % (window, mask)) + lldb.debugger.HandleCommand('eobjc (void)[%s setTag:(NSInteger)%s]' % (mask, viewOrLayer)) + lldb.debugger.HandleCommand('eobjc (void)[%s setBackgroundColor:[UIColor %sColor]]' % (mask, color)) + lldb.debugger.HandleCommand('eobjc (void)[%s setAlpha:(CGFloat)%s]' % (mask, alpha)) + lldb.debugger.HandleCommand('eobjc (void)[%s addSubview:%s]' % (window, mask)) flushCoreAnimationTransaction() def unmaskView(viewOrLayer): window = fb.evaluateExpression('(UIWindow *)[[UIApplication sharedApplication] keyWindow]') mask = fb.evaluateExpression('(UIView *)[%s viewWithTag:(NSInteger)%s]' % (window, viewOrLayer)) - lldb.debugger.HandleCommand('expr (void)[%s removeFromSuperview]' % mask) + lldb.debugger.HandleCommand('eobjc (void)[%s removeFromSuperview]' % mask) flushCoreAnimationTransaction() def convertPoint(x, y, fromViewOrLayer, toViewOrLayer): @@ -89,4 +89,4 @@ def upwardsRecursiveDescription(view, maxDepth=0): return builder def slowAnimation(speed=1): - lldb.debugger.HandleCommand('expr (void)[[[UIApplication sharedApplication] windows] setValue:@(%s) forKeyPath:@"layer.speed"]' % speed) + lldb.debugger.HandleCommand('eobjc (void)[[[UIApplication sharedApplication] windows] setValue:@(%s) forKeyPath:@"layer.speed"]' % speed)