(expression, printErrors=True)
| 108 | |
| 109 | |
| 110 | def evaluateInputExpression(expression, printErrors=True): |
| 111 | # HACK |
| 112 | if expression.startswith("(id)"): |
| 113 | return evaluateExpressionValue(expression, printErrors=printErrors).GetValue() |
| 114 | |
| 115 | frame = ( |
| 116 | lldb.debugger.GetSelectedTarget() |
| 117 | .GetProcess() |
| 118 | .GetSelectedThread() |
| 119 | .GetSelectedFrame() |
| 120 | ) |
| 121 | options = lldb.SBExpressionOptions() |
| 122 | options.SetTrapExceptions(False) |
| 123 | value = frame.EvaluateExpression(expression, options) |
| 124 | error = value.GetError() |
| 125 | |
| 126 | if printErrors and error.Fail(): |
| 127 | print(error) |
| 128 | |
| 129 | return value.GetValue() |
| 130 | |
| 131 | |
| 132 | def evaluateIntegerExpression(expression, printErrors=True): |
nothing calls this directly
no test coverage detected