DerekSelander/LLDB

Enumerating NoneType

cclamb opened this issue · 2 comments

So there's a bug that seems pretty endemic with respect to enumerating a NoneType. You can see it in search at line 110 (I think i may be a python3 issue?):

Currently in search.py:110: if 'nil' in res.GetOutput():

Fixed with?
ro = res.GetOutput()
if ro is None or 'nil' in res.GetOutput():

Not sure if this is correct though.

You could try calling res.HasResult() before grabbing the output. If SBCommandReturnObject::GetOutput() is returning None, my guess is that the expression (HandleCommand() call) couldn't be executed for some reason. There's also a SBCommandReturnObject::Succeeded() method.