From 8433fdbedfad67239b7658089b3974b3e516d487 Mon Sep 17 00:00:00 2001 From: Aidan Dodds Date: Thu, 10 Mar 2016 17:23:33 +0000 Subject: [Renderscript] Explicitly set the language to evaluate allocations Currently it is not specified, and since allocations are usually requested once we hit a renderscript breakpoint, the language will be inferred being as renderscript by the ExpressionParser. Actually allocations attempt to invoke functions part of the RS runtime, written in C/C++, so evaluating the calls in RenderScript could be misleading. In particular, in MIPS, the ABI between C/C++ (mips o32) and renderscript (arm) might introduce subtle bugs when evaluating such expressions. This change explicitly sets the language used to evaluate the allocations as C++. Committed on behalf of: Dean De Leo llvm-svn: 263129 --- .../RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp') diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp index 6dd6582ff64..bad04d81433 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp @@ -1457,8 +1457,10 @@ RenderScriptRuntime::EvalRSExpression(const char *expression, StackFrame *frame_ log->Printf("%s(%s)", __FUNCTION__, expression); ValueObjectSP expr_result; + EvaluateExpressionOptions options; + options.SetLanguage(lldb::eLanguageTypeC_plus_plus); // Perform the actual expression evaluation - GetProcess()->GetTarget().EvaluateExpression(expression, frame_ptr, expr_result); + GetProcess()->GetTarget().EvaluateExpression(expression, frame_ptr, expr_result, options); if (!expr_result) { -- cgit v1.2.3