diff options
| author | Tamas Berghammer <tberghammer@google.com> | 2016-03-01 15:01:05 +0000 |
|---|---|---|
| committer | Tamas Berghammer <tberghammer@google.com> | 2016-03-01 15:01:05 +0000 |
| commit | f46c5259bdeb620a2b9b5144db9b5c52a5be4b66 (patch) | |
| tree | 29f0a1b0f23b3a2f920276a68842bc4cc156e242 /lldb/source/Expression/DWARFExpression.cpp | |
| parent | 47a115cd417b24809749b1cfcea5c5db60a7c0bd (diff) | |
| download | bcm5719-llvm-f46c5259bdeb620a2b9b5144db9b5c52a5be4b66.tar.gz bcm5719-llvm-f46c5259bdeb620a2b9b5144db9b5c52a5be4b66.zip | |
DWARFExpression: Don't resolve load address in DW_OP_plus
If we have a TargetLoadAddress on the top of the DWARF stack then a
DW_OP_plus or a DW_OP_plus_ucons sholudn't dereference (resolve) it
and then add the value to the dereferenced value but it should offset
the load address by the specified constant.
llvm-svn: 262339
Diffstat (limited to 'lldb/source/Expression/DWARFExpression.cpp')
| -rw-r--r-- | lldb/source/Expression/DWARFExpression.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp index bd71565e622..610c8cf3a5f 100644 --- a/lldb/source/Expression/DWARFExpression.cpp +++ b/lldb/source/Expression/DWARFExpression.cpp @@ -1944,7 +1944,7 @@ DWARFExpression::Evaluate { tmp = stack.back(); stack.pop_back(); - stack.back().ResolveValue(exe_ctx) = stack.back().ResolveValue(exe_ctx) + tmp.ResolveValue(exe_ctx); + stack.back().GetScalar() += tmp.GetScalar(); } break; @@ -1965,8 +1965,8 @@ DWARFExpression::Evaluate { const uint64_t uconst_value = opcodes.GetULEB128(&offset); // Implicit conversion from a UINT to a Scalar... - stack.back().ResolveValue(exe_ctx) += uconst_value; - if (!stack.back().ResolveValue(exe_ctx).IsValid()) + stack.back().GetScalar() += uconst_value; + if (!stack.back().GetScalar().IsValid()) { if (error_ptr) error_ptr->SetErrorString("DW_OP_plus_uconst failed."); |

