Author: aidandodds
Date: Thu Mar 10 11:23:33 2016
New Revision: 263129

URL: http://llvm.org/viewvc/llvm-project?rev=263129&view=rev
Log:
[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 <d...@codeplay.com>

Modified:
    
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp

Modified: 
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp?rev=263129&r1=263128&r2=263129&view=diff
==============================================================================
--- 
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
 (original)
+++ 
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
 Thu Mar 10 11:23:33 2016
@@ -1457,8 +1457,10 @@ RenderScriptRuntime::EvalRSExpression(co
         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)
     {


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to