Skip to content

Commit f46c525

Browse files
author
Tamas Berghammer
committed
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
1 parent 47a115c commit f46c525

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lldb/source/Expression/DWARFExpression.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,7 +1944,7 @@ DWARFExpression::Evaluate
19441944
{
19451945
tmp = stack.back();
19461946
stack.pop_back();
1947-
stack.back().ResolveValue(exe_ctx) = stack.back().ResolveValue(exe_ctx) + tmp.ResolveValue(exe_ctx);
1947+
stack.back().GetScalar() += tmp.GetScalar();
19481948
}
19491949
break;
19501950

@@ -1965,8 +1965,8 @@ DWARFExpression::Evaluate
19651965
{
19661966
const uint64_t uconst_value = opcodes.GetULEB128(&offset);
19671967
// Implicit conversion from a UINT to a Scalar...
1968-
stack.back().ResolveValue(exe_ctx) += uconst_value;
1969-
if (!stack.back().ResolveValue(exe_ctx).IsValid())
1968+
stack.back().GetScalar() += uconst_value;
1969+
if (!stack.back().GetScalar().IsValid())
19701970
{
19711971
if (error_ptr)
19721972
error_ptr->SetErrorString("DW_OP_plus_uconst failed.");

0 commit comments

Comments
 (0)