Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion commands/FBDebugCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ def run(self, arguments, options):
formattedCategory = category if category else ''
breakpointFullName = '{}[{}{} {}]'.format(methodTypeCharacter, breakpointClassName, formattedCategory, selector)

breakpointCondition = None
if targetIsClass:
breakpointCondition = '(void*)object_getClass({}) == {}'.format(expressionForSelf, targetClass)
else:
Expand Down
2 changes: 0 additions & 2 deletions commands/FBDisplayCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
# of patent rights can be found in the PATENTS file in the same directory.

import lldb
import os
import time

import fblldbviewhelpers as viewHelpers
import fblldbbase as fb
Expand Down
2 changes: 0 additions & 2 deletions commands/FBFlickerCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
# of patent rights can be found in the PATENTS file in the same directory.

import os
import time
import sys

import lldb
import fblldbbase as fb
import fblldbviewhelpers as viewHelpers
import fblldbinputhelpers as inputHelpers
import fblldbobjcruntimehelpers as runtimeHelpers

def lldbcommands():
Expand Down
6 changes: 0 additions & 6 deletions commands/FBInvocationCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,6 @@ def findArgAdressAtIndexFromStackFrame(frame, index):

def prettyPrintInvocation(frame, invocation):
object = fb.evaluateExpression('(id)[(id)' + invocation + ' target]')
selector = fb.evaluateExpressionValue('(char *)sel_getName((SEL)[(id)' + invocation + ' selector])').GetSummary()
selector = re.sub(r'^"|"$', '', selector)

objectClassValue = fb.evaluateExpressionValue('(id)object_getClass((id)' + object + ')')
objectClass = objectClassValue.GetObjectDescription()

description = fb.evaluateExpressionValue('(id)' + invocation).GetObjectDescription()
argDescriptions = description.splitlines(True)[4:]

Expand Down
3 changes: 2 additions & 1 deletion commands/FBVisualizationCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.

import lldb
import os
import time

import lldb
import errno
import fblldbbase as fb
import fblldbobjecthelpers as objectHelpers
Expand Down
7 changes: 2 additions & 5 deletions fblldb.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import imp
import os
import shlex
import sys

from optparse import OptionParser

import fblldbbase as fb
Expand Down Expand Up @@ -54,8 +54,6 @@ def loadCommand(module, command, directory, filename, extension):
def makeRunCommand(command, filename):
def runCommand(debugger, input, result, dict):
splitInput = shlex.split(input)
options = None
args = None

# OptionParser will throw in the case where you want just one big long argument and no
# options and you enter something that starts with '-' in the argument. e.g.:
Expand Down Expand Up @@ -129,13 +127,12 @@ def helpForCommand(command, filename):
help += '\n\nOptions:'
for option in command.options():

optionFlag = ''
if option.longName and option.shortName:
optionFlag = option.longName + '/' + option.shortName
elif option.longName:
optionFlag = option.longName
else:
optionFlag = optiob.shortName
optionFlag = option.shortName
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂


help += '\n ' + optionFlag + ' '

Expand Down
4 changes: 2 additions & 2 deletions fblldbobjcruntimehelpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.

import re

import lldb
import fblldbbase as fb

Expand Down Expand Up @@ -58,8 +60,6 @@ def functionPreambleExpressionForSelf():
return expressionForSelf

def functionPreambleExpressionForObjectParameterAtIndex(parameterIndex):
import re

arch = currentArch()
expresssion = None
if arch == 'i386':
Expand Down
2 changes: 1 addition & 1 deletion fblldbviewcontrollerhelpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# of patent rights can be found in the PATENTS file in the same directory.

import lldb

import fblldbbase as fb
import fblldbobjcruntimehelpers as runtimeHelpers

Expand Down Expand Up @@ -36,7 +37,6 @@ def _recursiveViewControllerDescriptionWithPrefixAndChildPrefix(vc, string, pref
nextPrefix = childPrefix + ' |'

numChildViewControllers = fb.evaluateIntegerExpression('(int)[(id)[%s childViewControllers] count]' % (vc))
childViewControllers = fb.evaluateExpression('(id)[%s childViewControllers]' % (vc))

for i in range(0, numChildViewControllers):
viewController = fb.evaluateExpression('(id)[(id)[%s childViewControllers] objectAtIndex:%d]' % (vc, i))
Expand Down
2 changes: 1 addition & 1 deletion fblldbviewhelpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def upwardsRecursiveDescription(view, maxDepth=0):
if viewDescription:
recursiveDescription.insert(0, viewDescription)

if len(viewDescription) == 0:
if not len(viewDescription):
return None

currentPrefix = ""
Expand Down