From d1a5e01ff9a655ba5428050488e1ac112a0fe767 Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Fri, 6 Jan 2012 18:24:47 +0000 Subject: [PATCH] Fixed a bug where the DWARF location expression parser was creating malformed resuls. When the location of a variable is computed by reading a register and adding an offset, we shouldn't say that the variable's value is located in that register. This was confusing the expression parser when trying to read a variable captured by a block. llvm-svn: 147668 --- lldb/source/Expression/DWARFExpression.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp index 3555c41fd583..88ce130a3c31 100644 --- a/lldb/source/Expression/DWARFExpression.cpp +++ b/lldb/source/Expression/DWARFExpression.cpp @@ -2433,6 +2433,7 @@ DWARFExpression::Evaluate { int64_t breg_offset = opcodes.GetSLEB128(&offset); tmp.ResolveValue(exe_ctx, ast_context) += (uint64_t)breg_offset; + tmp.ClearContext(); stack.push_back(tmp); stack.back().SetValueType (Value::eValueTypeLoadAddress); } @@ -2456,6 +2457,7 @@ DWARFExpression::Evaluate { int64_t breg_offset = opcodes.GetSLEB128(&offset); tmp.ResolveValue(exe_ctx, ast_context) += (uint64_t)breg_offset; + tmp.ClearContext(); stack.push_back(tmp); stack.back().SetValueType (Value::eValueTypeLoadAddress); }