Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ bool DWARFDebugInfoEntry::extractFast(const DWARFUnit &U, uint64_t *OffsetPtr,
"DWARF unit from offset 0x%8.8" PRIx64 " incl. "
"to offset 0x%8.8" PRIx64 " excl. "
"tries to read DIEs at offset 0x%8.8" PRIx64,
U.getOffset(), U.getNextUnitOffset(), *OffsetPtr));
U.getOffset(), UEndOffset, *OffsetPtr));
return false;
}
assert(DebugInfoData.isValidOffset(UEndOffset - 1));
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,9 @@ Error DWARFUnitHeader::extract(DWARFContext &Context,
// Header fields all parsed, capture the size of this unit header.
assert(*offset_ptr - Offset <= 255 && "unexpected header size");
Size = uint8_t(*offset_ptr - Offset);
uint64_t NextCUOffset = Offset + getUnitLengthFieldByteSize() + getLength();
uint64_t NextCUOffset = getNextUnitOffset();

if (!debug_info.isValidOffset(getNextUnitOffset() - 1))
if (!debug_info.isValidOffset(NextCUOffset - 1))
return createStringError(errc::invalid_argument,
"DWARF unit from offset 0x%8.8" PRIx64 " incl. "
"to offset 0x%8.8" PRIx64 " excl. "
Expand Down
Loading