Use the right dwarf attributes for parsing location list entries (fixup for r285441)

Note that the parsing code here is still incorrect wrt. the new draft of the
dwarf 5 spec (seconds arguments to DW_LLE_startx_length should be uleb128, not
u32). Once we have compilers actually emitting dwarf conformant with the new
spec, we'll need to revisit this and figure out the proper behavior there.

This should unbreak the linux bot.

llvm-svn: 285562
This commit is contained in:
Pavel Labath 2016-10-31 11:53:13 +00:00
parent ee908d21f8
commit 6b91e405e3
1 changed files with 2 additions and 2 deletions

View File

@ -3031,14 +3031,14 @@ bool DWARFExpression::AddressRangeForLocationListEntry(
switch (debug_loc_data.GetU8(offset_ptr)) {
case DW_LLE_end_of_list:
return false;
case DW_LLE_start_end: {
case DW_LLE_startx_endx: {
uint64_t index = debug_loc_data.GetULEB128(offset_ptr);
low_pc = ReadAddressFromDebugAddrSection(dwarf_cu, index);
index = debug_loc_data.GetULEB128(offset_ptr);
high_pc = ReadAddressFromDebugAddrSection(dwarf_cu, index);
return true;
}
case DW_LLE_start_length: {
case DW_LLE_startx_length: {
uint64_t index = debug_loc_data.GetULEB128(offset_ptr);
low_pc = ReadAddressFromDebugAddrSection(dwarf_cu, index);
uint32_t length = debug_loc_data.GetU32(offset_ptr);