in fbchisellldbbase.py [0:0]
def evaluate(expr):
if not check_expr(expr):
raise Exception(
"Invalid Expression, the last expression not include a RETURN family marco"
)
command = "({" + RETURN_MACRO + "\n" + expr + "})"
ret = evaluateExpressionValue(command, printErrors=True)
if not ret.GetError().Success():
print(ret.GetError())
return None
else:
process = lldb.debugger.GetSelectedTarget().GetProcess()
error = lldb.SBError()
ret = process.ReadCStringFromMemory(int(ret.GetValue(), 16), 2 ** 20, error)
if not error.Success():
print(error)
return None
else:
ret = json.loads(ret)
return ret["return"]