summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2017-12-07 10:38:22 +0000
committerPavel Labath <labath@google.com>2017-12-07 10:38:22 +0000
commit62ef18562b5494567c601be41761cf8449960ad4 (patch)
tree28c52e9fcc72f1069e6799a56b1e66b2fd1727c6
parent0d6cf90663e6662e9b7b6045d56755679c1ffdc9 (diff)
downloadbcm5719-llvm-62ef18562b5494567c601be41761cf8449960ad4.tar.gz
bcm5719-llvm-62ef18562b5494567c601be41761cf8449960ad4.zip
Variable: Fix usage of uninitialised value
Summary: 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. Reviewers: jingham Subscribers: mehdi_amini, lldb-commits Differential Revision: https://reviews.llvm.org/D40557 llvm-svn: 320021
-rw-r--r--lldb/source/Symbol/Variable.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/lldb/source/Symbol/Variable.cpp b/lldb/source/Symbol/Variable.cpp
index ff32aa73146..1957bcef1f3 100644
--- a/lldb/source/Symbol/Variable.cpp
+++ b/lldb/source/Symbol/Variable.cpp
@@ -425,14 +425,8 @@ Status Variable::GetValuesForVariableExpressionPath(
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'",
OpenPOWER on IntegriCloud