From d0ee83768ca25b1a9e09313b1259b64f33c07ec2 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 29 Mar 2017 08:34:30 +0200 Subject: Debugger: Reset expression syntax after evaluate Fixes setting breakpoints after using python dumpers. Change-Id: Ifd917526e91c73f82f943645e1d1d11790369179 Reviewed-by: Christian Stenger --- src/libs/qtcreatorcdbext/pycdbextmodule.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libs/qtcreatorcdbext/pycdbextmodule.cpp b/src/libs/qtcreatorcdbext/pycdbextmodule.cpp index 4d16671c02..4ca11a777d 100644 --- a/src/libs/qtcreatorcdbext/pycdbextmodule.cpp +++ b/src/libs/qtcreatorcdbext/pycdbextmodule.cpp @@ -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); } -- cgit v1.2.1