[Lldb-commits] [lldb] r182301 - Patch from Yacine Belkadi that fixes an issue in Variable::GetValuesForVariableExpressionPath().
Greg Clayton
gclayton at apple.com
Mon May 20 09:50:52 PDT 2013
Author: gclayton
Date: Mon May 20 11:50:51 2013
New Revision: 182301
URL: http://llvm.org/viewvc/llvm-project?rev=182301&view=rev
Log:
Patch from Yacine Belkadi that fixes an issue in Variable::GetValuesForVariableExpressionPath().
Modified:
lldb/trunk/source/Symbol/Variable.cpp
Modified: lldb/trunk/source/Symbol/Variable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Variable.cpp?rev=182301&r1=182300&r2=182301&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Variable.cpp (original)
+++ lldb/trunk/source/Symbol/Variable.cpp Mon May 20 11:50:51 2013
@@ -416,8 +416,8 @@ Variable::GetValuesForVariableExpression
ValueObjectSP variable_valobj_sp(ValueObjectVariable::Create (scope, var_sp));
if (variable_valobj_sp)
{
- variable_expr_path += variable_name.size();
- if (*variable_expr_path)
+ const char *variable_sub_expr_path = variable_expr_path + variable_name.size();
+ if (*variable_sub_expr_path)
{
const char* first_unparsed = NULL;
ValueObject::ExpressionPathScanEndReason reason_to_stop;
@@ -425,7 +425,7 @@ Variable::GetValuesForVariableExpression
ValueObject::GetValueForExpressionPathOptions options;
ValueObject::ExpressionPathAftermath final_task_on_target;
- valobj_sp = variable_valobj_sp->GetValueForExpressionPath (variable_expr_path,
+ valobj_sp = variable_valobj_sp->GetValueForExpressionPath (variable_sub_expr_path,
&first_unparsed,
&reason_to_stop,
&final_value_type,
@@ -434,7 +434,7 @@ Variable::GetValuesForVariableExpression
if (!valobj_sp)
{
error.SetErrorStringWithFormat ("invalid expression path '%s' for variable '%s'",
- variable_expr_path,
+ variable_sub_expr_path,
var_sp->GetName().GetCString());
}
}
More information about the lldb-commits
mailing list