Commit d0ee8376 authored by David Schulz's avatar David Schulz
Browse files

Debugger: Reset expression syntax after evaluate



Fixes setting breakpoints after using python dumpers.

Change-Id: Ifd917526e91c73f82f943645e1d1d11790369179
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent cd2a70c8
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment