HomePhabricator

[DWARFExpression] Read literars as unsigned values.

Authored by JDevlieghere on Sep 13 2018, 8:18 AM.

Description

[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

Details

Committed
JDevlieghereSep 13 2018, 8:18 AM
Differential Revision
D51730: [DWARFExpression] Read literars as unsigned values.
Parents
rGaaec3c62602c: [ARM] Allow truncs as sources in ARM CGP
Branches
Unknown
Tags
Unknown