[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 <dean@codeplay.com>

llvm-svn: 263129
This commit is contained in:
Aidan Dodds
2016-03-10 17:23:33 +00:00
parent 92be8e6d95
commit 8433fdbedf

View File

@@ -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)
{