[Lldb-commits] [lldb] r147668 - /lldb/trunk/source/Expression/DWARFExpression.cpp

Sean Callanan scallanan at apple.com
Fri Jan 6 10:24:47 PST 2012


Author: spyffe
Date: Fri Jan  6 12:24:47 2012
New Revision: 147668

URL: http://llvm.org/viewvc/llvm-project?rev=147668&view=rev
Log:
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.

Modified:
    lldb/trunk/source/Expression/DWARFExpression.cpp

Modified: lldb/trunk/source/Expression/DWARFExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/DWARFExpression.cpp?rev=147668&r1=147667&r2=147668&view=diff
==============================================================================
--- lldb/trunk/source/Expression/DWARFExpression.cpp (original)
+++ lldb/trunk/source/Expression/DWARFExpression.cpp Fri Jan  6 12:24:47 2012
@@ -2433,6 +2433,7 @@
                 {
                     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 @@
                 {
                     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);
                 }





More information about the lldb-commits mailing list