diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-09-13 15:18:39 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-09-13 15:18:39 +0000 |
commit | bf2d112c15c407a5ff9a3ecbba8ec638cd989e85 (patch) | |
tree | 578519a0c8182d5b236c529a54edd01d78270504 /lldb/source/Expression/DWARFExpression.cpp | |
parent | aaec3c62602c389e90feb98d8746c63349e81533 (diff) | |
download | bcm5719-llvm-bf2d112c15c407a5ff9a3ecbba8ec638cd989e85.tar.gz bcm5719-llvm-bf2d112c15c407a5ff9a3ecbba8ec638cd989e85.zip |
[DWARFExpression] Read literars as unsigned values.
After landing r341457, we started seeing a failure on the swift-lldb
bots. The change was correct and pretty straightforward, a DW_OP_constu
was replaced with DW_OP_lit23, the value remaining identical.
0x000000f4: DW_TAG_variable
DW_AT_location (0x00000000
[0x0000000100000a51, 0x0000000100000d47): DW_OP_lit23, DW_OP_stack_value)
DW_AT_name ("number")
However, this broke LLDB.
(Int) number = <extracting data from value failed>
The value was read correctly, but apparently the value's type was different.
When reading a constu it was reading a uint64 (m_type = e_ulonglong) while for
the literal, it got a signed int (m_type = e_sint). This change makes sure we
read the value as an unsigned.
Differential revision: https://reviews.llvm.org/D51730
llvm-svn: 342142
Diffstat (limited to 'lldb/source/Expression/DWARFExpression.cpp')
-rw-r--r-- | lldb/source/Expression/DWARFExpression.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp index 53244094ac0..a3f0b022f25 100644 --- a/lldb/source/Expression/DWARFExpression.cpp +++ b/lldb/source/Expression/DWARFExpression.cpp @@ -2382,7 +2382,7 @@ bool DWARFExpression::Evaluate( case DW_OP_lit29: case DW_OP_lit30: case DW_OP_lit31: - stack.push_back(Scalar(op - DW_OP_lit0)); + stack.push_back(Scalar((uint64_t)(op - DW_OP_lit0))); break; //---------------------------------------------------------------------- |