Changeset View
Changeset View
Standalone View
Standalone View
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
Show First 20 Lines • Show All 208 Lines • ▼ Show 20 Lines | static DWARFRangeList GetRangesOrReportError(DWARFUnit &unit, | ||||
const DWARFFormValue &value) { | const DWARFFormValue &value) { | ||||
llvm::Expected<DWARFRangeList> expected_ranges = | llvm::Expected<DWARFRangeList> expected_ranges = | ||||
(value.Form() == DW_FORM_rnglistx) | (value.Form() == DW_FORM_rnglistx) | ||||
? unit.FindRnglistFromIndex(value.Unsigned()) | ? unit.FindRnglistFromIndex(value.Unsigned()) | ||||
: unit.FindRnglistFromOffset(value.Unsigned()); | : unit.FindRnglistFromOffset(value.Unsigned()); | ||||
if (expected_ranges) | if (expected_ranges) | ||||
return std::move(*expected_ranges); | return std::move(*expected_ranges); | ||||
unit.GetSymbolFileDWARF().GetObjectFile()->GetModule()->ReportError( | unit.GetSymbolFileDWARF().GetObjectFile()->GetModule()->ReportError( | ||||
"{0x%8.8x}: DIE has DW_AT_ranges(0x%" PRIx64 ") attribute, but " | "{0x%8.8x}: DIE has DW_AT_ranges(%s 0x%" PRIx64 ") attribute, but " | ||||
"range extraction failed (%s), please file a bug " | "range extraction failed (%s), please file a bug " | ||||
"and attach the file at the start of this error message", | "and attach the file at the start of this error message", | ||||
die.GetOffset(), value.Unsigned(), | die.GetOffset(), | ||||
toString(expected_ranges.takeError()).c_str()); | llvm::dwarf::FormEncodingString(value.Form()).str().c_str(), | ||||
value.Unsigned(), toString(expected_ranges.takeError()).c_str()); | |||||
return DWARFRangeList(); | return DWARFRangeList(); | ||||
} | } | ||||
// GetDIENamesAndRanges | // GetDIENamesAndRanges | ||||
// | // | ||||
// Gets the valid address ranges for a given DIE by looking for a | // Gets the valid address ranges for a given DIE by looking for a | ||||
// DW_AT_low_pc/DW_AT_high_pc pair, DW_AT_entry_pc, or DW_AT_ranges attributes. | // DW_AT_low_pc/DW_AT_high_pc pair, DW_AT_entry_pc, or DW_AT_ranges attributes. | ||||
bool DWARFDebugInfoEntry::GetDIENamesAndRanges( | bool DWARFDebugInfoEntry::GetDIENamesAndRanges( | ||||
▲ Show 20 Lines • Show All 664 Lines • Show Last 20 Lines |