[Lldb-commits] [lldb] r262339 - DWARFExpression: Don't resolve load address in DW_OP_plus
Tamas Berghammer via lldb-commits
lldb-commits at lists.llvm.org
Tue Mar 1 07:01:05 PST 2016
Author: tberghammer
Date: Tue Mar 1 09:01:05 2016
New Revision: 262339
URL: http://llvm.org/viewvc/llvm-project?rev=262339&view=rev
Log:
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.
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=262339&r1=262338&r2=262339&view=diff
==============================================================================
--- lldb/trunk/source/Expression/DWARFExpression.cpp (original)
+++ lldb/trunk/source/Expression/DWARFExpression.cpp Tue Mar 1 09:01:05 2016
@@ -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.");
More information about the lldb-commits
mailing list