Lines Matching +full:form +full:- +full:data
1 //===-- DWARFDebugInfoEntry.cpp -------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
41 // Extract a debug info entry for a given DWARFUnit from the data
43 bool DWARFDebugInfoEntry::Extract(const DWARFDataExtractor &data,
48 unit.GetSymbolFileDWARF().GetObjectFile()->GetModule()->ReportError(
58 const uint64_t abbr_idx = data.GetULEB128(offset_ptr);
73 m_tag = abbrevDecl->getTag();
74 m_has_children = abbrevDecl->hasChildren();
75 // Skip all data in the .debug_info or .debug_types for the attributes
76 for (const auto &attribute : abbrevDecl->attributes()) {
77 if (DWARFFormValue::SkipValue(attribute.Form, data, offset_ptr, &unit))
80 return report_error("Unsupported DW_FORM_{1:x}", attribute.Form);
87 return (value.Form() == DW_FORM_rnglistx)
96 form_value.FormRef() = attr_spec.Form;
116 SymbolFileDWARF &dwarf = cu->GetSymbolFileDWARF();
117 lldb::ModuleSP module = dwarf.GetObjectFile()->GetModule();
120 const DWARFDataExtractor &data = cu->GetData();
123 if (!data.ValidOffset(offset))
128 for (const auto &attribute : abbrevDecl->attributes()) {
133 if (form_value.ExtractValue(data, &offset)) {
148 if (form_value.Form() == DW_FORM_addr ||
149 form_value.Form() == DW_FORM_addrx ||
150 form_value.Form() == DW_FORM_GNU_addr_index) {
157 hi_pc += lo_pc; // DWARF 4 introduces <offset-from-lo-pc> to save
167 module->ReportError(
171 GetOffset(), llvm::dwarf::FormEncodingString(form_value.Form()),
229 form_value.BlockData() - data.GetDataStart();
234 data, block_offset, block_length)),
237 DataExtractor data = cu->GetLocationData();
239 if (data.ValidOffset(offset)) {
240 data = DataExtractor(data, offset, data.GetByteSize() - offset);
242 assert(lo_pc >= cu->GetBaseAddress());
243 DWARFExpression::ParseDWARFLocationList(cu, data, frame_base);
244 frame_base->SetFuncFileAddress(lo_pc);
266 dw_addr_t file_addr = ranges.begin()->LowPC;
267 assert(file_addr >= cu->GetBaseAddress());
268 frame_base->SetFuncFileAddress(file_addr);
274 die.GetDIE()->GetDIENamesAndRanges(die.GetCU(), name, mangled, ranges,
303 entry->GetAbbreviationDeclarationPtr(current.GetCU());
307 const DWARFDataExtractor &data = cu->GetData();
308 lldb::offset_t offset = current.GetDIE()->GetFirstAttributeOffset();
312 for (const auto &attribute : abbrevDecl->attributes()) {
318 // attributes, the depth will be non-zero. We need to omit certain
336 if (form_value.ExtractValue(data, &offset)) {
343 const dw_form_t form = form_value.Form();
345 DWARFFormValue::GetFixedSize(form, cu);
349 DWARFFormValue::SkipValue(form, data, &offset, cu);
392 std::optional<uint32_t> attr_idx = abbrevDecl->findAttributeIndex(attr);
395 const DWARFDataExtractor &data = cu->GetData();
400 DWARFFormValue::SkipValue(abbrevDecl->getFormByIndex(idx++), data,
405 form_value.SetForm(abbrevDecl->getFormByIndex(idx));
406 if (form_value.ExtractValue(data, &offset)) {
422 dw_offset_t die_offset = die.GetDIE()->GetAttributeValue(
434 // to the string data exists within the supplied SymbolFileDWARF and will only
492 // Get the hi_pc, adding hi_pc to lo_pc when specified as an <offset-from-low-
503 dw_form_t form = form_value.Form();
504 if (form == DW_FORM_addr || form == DW_FORM_addrx ||
505 form == DW_FORM_GNU_addr_index)
508 // DWARF4 can specify the hi_pc as an <offset-from-lowpc>
516 // Get the lo_pc and hi_pc, adding hi_pc to lo_pc when specified as an <offset-
517 // from-low-pc>.
618 debug_aranges->AppendRange(GetOffset(), r.LowPC, r.HighPC);
626 child->BuildFunctionAddressRangeTable(cu, debug_aranges);
627 child = child->GetSibling();
642 cu->GetAbbreviations();
646 return abbrev_set->getAbbreviationDeclaration(m_abbr_idx);
654 switch (parent_die->Tag()) {
667 parent_die = parent_die->GetParent();