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
3 changes: 2 additions & 1 deletion commands/FBVisualizationCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def _showImage(commandForImage):
else:
raise

imageDataAddress = fb.evaluateObjectExpression('UIImagePNGRepresentation((id)' + commandForImage + ')')
toPNG = '(id)UIImagePNGRepresentation((id){})'.format(commandForImage)
imageDataAddress = fb.evaluateExpressionValue(toPNG, tryAllThreads=True).GetValue()
imageBytesStartAddress = fb.evaluateExpression('(void *)[(id)' + imageDataAddress + ' bytes]')
imageBytesLength = fb.evaluateExpression('(NSUInteger)[(id)' + imageDataAddress + ' length]')

Expand Down
6 changes: 3 additions & 3 deletions fblldbbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def importModule(frame, module):

# evaluates expression in Objective-C++ context, so it will work even for
# Swift projects
def evaluateExpressionValue(expression, printErrors=True, language=lldb.eLanguageTypeObjC_plus_plus):
def evaluateExpressionValue(expression, printErrors=True, language=lldb.eLanguageTypeObjC_plus_plus, tryAllThreads=False):
frame = lldb.debugger.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame()
options = lldb.SBExpressionOptions()
options.SetLanguage(language)
Expand All @@ -70,8 +70,8 @@ def evaluateExpressionValue(expression, printErrors=True, language=lldb.eLanguag
# Give evaluation more time.
options.SetTimeoutInMicroSeconds(5000000) # 5s

# Chisel commands are not multithreaded.
options.SetTryAllThreads(False)
# Most Chisel commands are not multithreaded.
options.SetTryAllThreads(tryAllThreads)

value = frame.EvaluateExpression(expression, options)
error = value.GetError()
Expand Down