forked from qt-creator/qt-creator
Debugger: Reset expression syntax after evaluate
Fixes setting breakpoints after using python dumpers. Change-Id: Ifd917526e91c73f82f943645e1d1d11790369179 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -102,9 +102,13 @@ static PyObject *cdbext_parseAndEvaluate(PyObject *, PyObject *args) // -> Value
|
||||
if (debugPyCdbextModule)
|
||||
DebugPrint() << "evaluate expression: " << expr;
|
||||
CIDebugControl *control = ExtensionCommandContext::instance()->control();
|
||||
ULONG oldExpressionSyntax;
|
||||
control->GetExpressionSyntax(&oldExpressionSyntax);
|
||||
control->SetExpressionSyntax(DEBUG_EXPR_CPLUSPLUS);
|
||||
DEBUG_VALUE value;
|
||||
if (FAILED(control->Evaluate(expr, DEBUG_VALUE_INT64, &value, NULL)))
|
||||
HRESULT hr = control->Evaluate(expr, DEBUG_VALUE_INT64, &value, NULL);
|
||||
control->SetExpressionSyntax(oldExpressionSyntax);
|
||||
if (FAILED(hr))
|
||||
Py_RETURN_NONE;
|
||||
return Py_BuildValue("K", value.I64);
|
||||
}
|
||||
|
Reference in New Issue
Block a user