labath created this revision. Herald added a subscriber: mehdi_amini. Variable::GetValuesForVariableExpressionPath was passing an uninitialised value for the final_task_on_target argument. On my compiler/optimization level combo, the final_task_on_target happened to contain "dereference" in some circumstances, which produced hilarious results. The same is true for other arguments to the GetValueForExpressionPath call.
The correct behavior here seems to be to just omit the arguments altogether and let the default behavior take place. https://reviews.llvm.org/D40557 Files: source/Symbol/Variable.cpp Index: source/Symbol/Variable.cpp =================================================================== --- source/Symbol/Variable.cpp +++ source/Symbol/Variable.cpp @@ -425,14 +425,8 @@ llvm::StringRef variable_sub_expr_path = variable_expr_path.drop_front(variable_name.size()); if (!variable_sub_expr_path.empty()) { - ValueObject::ExpressionPathScanEndReason reason_to_stop; - ValueObject::ExpressionPathEndResultType final_value_type; - ValueObject::GetValueForExpressionPathOptions options; - ValueObject::ExpressionPathAftermath final_task_on_target; - valobj_sp = variable_valobj_sp->GetValueForExpressionPath( - variable_sub_expr_path, &reason_to_stop, &final_value_type, options, - &final_task_on_target); + variable_sub_expr_path); if (!valobj_sp) { error.SetErrorStringWithFormat( "invalid expression path '%s' for variable '%s'",
Index: source/Symbol/Variable.cpp =================================================================== --- source/Symbol/Variable.cpp +++ source/Symbol/Variable.cpp @@ -425,14 +425,8 @@ llvm::StringRef variable_sub_expr_path = variable_expr_path.drop_front(variable_name.size()); if (!variable_sub_expr_path.empty()) { - ValueObject::ExpressionPathScanEndReason reason_to_stop; - ValueObject::ExpressionPathEndResultType final_value_type; - ValueObject::GetValueForExpressionPathOptions options; - ValueObject::ExpressionPathAftermath final_task_on_target; - valobj_sp = variable_valobj_sp->GetValueForExpressionPath( - variable_sub_expr_path, &reason_to_stop, &final_value_type, options, - &final_task_on_target); + variable_sub_expr_path); if (!valobj_sp) { error.SetErrorStringWithFormat( "invalid expression path '%s' for variable '%s'",
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits