LLVM  17.0.0git
DWARFYAML.h
Go to the documentation of this file.
1 //===- DWARFYAML.h - DWARF YAMLIO implementation ----------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 ///
9 /// \file
10 /// This file declares classes for handling the YAML representation
11 /// of DWARF Debug Info.
12 ///
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_OBJECTYAML_DWARFYAML_H
16 #define LLVM_OBJECTYAML_DWARFYAML_H
17 
18 #include "llvm/ADT/SetVector.h"
19 #include "llvm/ADT/StringRef.h"
21 #include "llvm/ObjectYAML/YAML.h"
23 #include <cstdint>
24 #include <optional>
25 #include <unordered_map>
26 #include <vector>
27 
28 namespace llvm {
29 namespace DWARFYAML {
30 
34  llvm::yaml::Hex64 Value; // Some DWARF5 attributes have values
35 };
36 
37 struct Abbrev {
38  std::optional<yaml::Hex64> Code;
41  std::vector<AttributeAbbrev> Attributes;
42 };
43 
44 struct AbbrevTable {
45  std::optional<uint64_t> ID;
46  std::vector<Abbrev> Table;
47 };
48 
50  llvm::yaml::Hex64 Address;
51  yaml::Hex64 Length;
52 };
53 
54 struct ARange {
56  std::optional<yaml::Hex64> Length;
58  yaml::Hex64 CuOffset;
59  std::optional<yaml::Hex8> AddrSize;
60  yaml::Hex8 SegSize;
61  std::vector<ARangeDescriptor> Descriptors;
62 };
63 
64 /// Class that describes a range list entry, or a base address selection entry
65 /// within a range list in the .debug_ranges section.
66 struct RangeEntry {
67  llvm::yaml::Hex64 LowOffset;
68  llvm::yaml::Hex64 HighOffset;
69 };
70 
71 /// Class that describes a single range list inside the .debug_ranges section.
72 struct Ranges {
73  std::optional<llvm::yaml::Hex64> Offset;
74  std::optional<llvm::yaml::Hex8> AddrSize;
75  std::vector<RangeEntry> Entries;
76 };
77 
78 struct PubEntry {
79  llvm::yaml::Hex32 DieOffset;
80  llvm::yaml::Hex8 Descriptor;
82 };
83 
84 struct PubSection {
86  yaml::Hex64 Length;
90  std::vector<PubEntry> Entries;
91 };
92 
93 struct FormValue {
94  llvm::yaml::Hex64 Value;
96  std::vector<llvm::yaml::Hex8> BlockData;
97 };
98 
99 struct Entry {
100  llvm::yaml::Hex32 AbbrCode;
101  std::vector<FormValue> Values;
102 };
103 
104 /// Class that contains helpful context information when mapping YAML into DWARF
105 /// data structures.
106 struct DWARFContext {
107  bool IsGNUPubSec = false;
108 };
109 
110 struct Unit {
112  std::optional<yaml::Hex64> Length;
114  std::optional<uint8_t> AddrSize;
115  llvm::dwarf::UnitType Type; // Added in DWARF 5
116  std::optional<uint64_t> AbbrevTableID;
117  std::optional<yaml::Hex64> AbbrOffset;
118  std::vector<Entry> Entries;
119 };
120 
121 struct File {
126 };
127 
130  std::optional<uint64_t> ExtLen;
133  int64_t SData;
135  std::vector<llvm::yaml::Hex8> UnknownOpcodeData;
136  std::vector<llvm::yaml::Hex64> StandardOpcodeData;
137 };
138 
139 struct LineTable {
141  std::optional<uint64_t> Length;
143  std::optional<uint64_t> PrologueLength;
144  uint8_t MinInstLength;
145  uint8_t MaxOpsPerInst;
146  uint8_t DefaultIsStmt;
147  uint8_t LineBase;
148  uint8_t LineRange;
149  std::optional<uint8_t> OpcodeBase;
150  std::optional<std::vector<uint8_t>> StandardOpcodeLengths;
151  std::vector<StringRef> IncludeDirs;
152  std::vector<File> Files;
153  std::vector<LineTableOpcode> Opcodes;
154 };
155 
156 struct SegAddrPair {
157  yaml::Hex64 Segment;
158  yaml::Hex64 Address;
159 };
160 
163  std::optional<yaml::Hex64> Length;
164  yaml::Hex16 Version;
165  std::optional<yaml::Hex8> AddrSize;
166  yaml::Hex8 SegSelectorSize;
167  std::vector<SegAddrPair> SegAddrPairs;
168 };
169 
172  std::optional<yaml::Hex64> Length;
173  yaml::Hex16 Version;
174  yaml::Hex16 Padding;
175  std::vector<yaml::Hex64> Offsets;
176 };
177 
180  std::vector<yaml::Hex64> Values;
181 };
182 
183 struct RnglistEntry {
185  std::vector<yaml::Hex64> Values;
186 };
187 
188 struct LoclistEntry {
190  std::vector<yaml::Hex64> Values;
191  std::optional<yaml::Hex64> DescriptionsLength;
192  std::vector<DWARFOperation> Descriptions;
193 };
194 
195 template <typename EntryType> struct ListEntries {
196  std::optional<std::vector<EntryType>> Entries;
197  std::optional<yaml::BinaryRef> Content;
198 };
199 
200 template <typename EntryType> struct ListTable {
202  std::optional<yaml::Hex64> Length;
203  yaml::Hex16 Version;
204  std::optional<yaml::Hex8> AddrSize;
205  yaml::Hex8 SegSelectorSize;
206  std::optional<uint32_t> OffsetEntryCount;
207  std::optional<std::vector<yaml::Hex64>> Offsets;
208  std::vector<ListEntries<EntryType>> Lists;
209 };
210 
211 struct Data {
214  std::vector<AbbrevTable> DebugAbbrev;
215  std::optional<std::vector<StringRef>> DebugStrings;
216  std::optional<std::vector<StringOffsetsTable>> DebugStrOffsets;
217  std::optional<std::vector<ARange>> DebugAranges;
218  std::optional<std::vector<Ranges>> DebugRanges;
219  std::optional<std::vector<AddrTableEntry>> DebugAddr;
220  std::optional<PubSection> PubNames;
221  std::optional<PubSection> PubTypes;
222 
223  std::optional<PubSection> GNUPubNames;
224  std::optional<PubSection> GNUPubTypes;
225 
226  std::vector<Unit> CompileUnits;
227 
228  std::vector<LineTable> DebugLines;
229  std::optional<std::vector<ListTable<RnglistEntry>>> DebugRnglists;
230  std::optional<std::vector<ListTable<LoclistEntry>>> DebugLoclists;
231 
232  bool isEmpty() const;
233 
235 
239  };
242 
243 private:
244  mutable std::unordered_map<uint64_t, AbbrevTableInfo> AbbrevTableInfoMap;
245  mutable std::unordered_map<uint64_t, std::string> AbbrevTableContents;
246 };
247 
248 } // end namespace DWARFYAML
249 } // end namespace llvm
250 
279 
280 namespace llvm {
281 namespace yaml {
282 
283 template <> struct MappingTraits<DWARFYAML::Data> {
284  static void mapping(IO &IO, DWARFYAML::Data &DWARF);
285 };
286 
287 template <> struct MappingTraits<DWARFYAML::AbbrevTable> {
288  static void mapping(IO &IO, DWARFYAML::AbbrevTable &AbbrevTable);
289 };
290 
291 template <> struct MappingTraits<DWARFYAML::Abbrev> {
292  static void mapping(IO &IO, DWARFYAML::Abbrev &Abbrev);
293 };
294 
295 template <> struct MappingTraits<DWARFYAML::AttributeAbbrev> {
296  static void mapping(IO &IO, DWARFYAML::AttributeAbbrev &AttAbbrev);
297 };
298 
299 template <> struct MappingTraits<DWARFYAML::ARangeDescriptor> {
300  static void mapping(IO &IO, DWARFYAML::ARangeDescriptor &Descriptor);
301 };
302 
303 template <> struct MappingTraits<DWARFYAML::ARange> {
304  static void mapping(IO &IO, DWARFYAML::ARange &ARange);
305 };
306 
307 template <> struct MappingTraits<DWARFYAML::RangeEntry> {
308  static void mapping(IO &IO, DWARFYAML::RangeEntry &Entry);
309 };
310 
311 template <> struct MappingTraits<DWARFYAML::Ranges> {
312  static void mapping(IO &IO, DWARFYAML::Ranges &Ranges);
313 };
314 
315 template <> struct MappingTraits<DWARFYAML::PubEntry> {
316  static void mapping(IO &IO, DWARFYAML::PubEntry &Entry);
317 };
318 
319 template <> struct MappingTraits<DWARFYAML::PubSection> {
320  static void mapping(IO &IO, DWARFYAML::PubSection &Section);
321 };
322 
323 template <> struct MappingTraits<DWARFYAML::Unit> {
324  static void mapping(IO &IO, DWARFYAML::Unit &Unit);
325 };
326 
327 template <> struct MappingTraits<DWARFYAML::Entry> {
328  static void mapping(IO &IO, DWARFYAML::Entry &Entry);
329 };
330 
331 template <> struct MappingTraits<DWARFYAML::FormValue> {
332  static void mapping(IO &IO, DWARFYAML::FormValue &FormValue);
333 };
334 
335 template <> struct MappingTraits<DWARFYAML::File> {
336  static void mapping(IO &IO, DWARFYAML::File &File);
337 };
338 
339 template <> struct MappingTraits<DWARFYAML::LineTableOpcode> {
340  static void mapping(IO &IO, DWARFYAML::LineTableOpcode &LineTableOpcode);
341 };
342 
343 template <> struct MappingTraits<DWARFYAML::LineTable> {
344  static void mapping(IO &IO, DWARFYAML::LineTable &LineTable);
345 };
346 
347 template <> struct MappingTraits<DWARFYAML::SegAddrPair> {
348  static void mapping(IO &IO, DWARFYAML::SegAddrPair &SegAddrPair);
349 };
350 
351 template <> struct MappingTraits<DWARFYAML::DWARFOperation> {
352  static void mapping(IO &IO, DWARFYAML::DWARFOperation &DWARFOperation);
353 };
354 
355 template <typename EntryType>
356 struct MappingTraits<DWARFYAML::ListTable<EntryType>> {
357  static void mapping(IO &IO, DWARFYAML::ListTable<EntryType> &ListTable);
358 };
359 
360 template <typename EntryType>
361 struct MappingTraits<DWARFYAML::ListEntries<EntryType>> {
362  static void mapping(IO &IO, DWARFYAML::ListEntries<EntryType> &ListEntries);
363  static std::string validate(IO &IO,
364  DWARFYAML::ListEntries<EntryType> &ListEntries);
365 };
366 
367 template <> struct MappingTraits<DWARFYAML::RnglistEntry> {
368  static void mapping(IO &IO, DWARFYAML::RnglistEntry &RnglistEntry);
369 };
370 
371 template <> struct MappingTraits<DWARFYAML::LoclistEntry> {
372  static void mapping(IO &IO, DWARFYAML::LoclistEntry &LoclistEntry);
373 };
374 
375 template <> struct MappingTraits<DWARFYAML::AddrTableEntry> {
376  static void mapping(IO &IO, DWARFYAML::AddrTableEntry &AddrTable);
377 };
378 
379 template <> struct MappingTraits<DWARFYAML::StringOffsetsTable> {
380  static void mapping(IO &IO, DWARFYAML::StringOffsetsTable &StrOffsetsTable);
381 };
382 
383 template <> struct ScalarEnumerationTraits<dwarf::DwarfFormat> {
384  static void enumeration(IO &IO, dwarf::DwarfFormat &Format) {
385  IO.enumCase(Format, "DWARF32", dwarf::DWARF32);
386  IO.enumCase(Format, "DWARF64", dwarf::DWARF64);
387  }
388 };
389 
390 #define HANDLE_DW_TAG(unused, name, unused2, unused3, unused4) \
391  io.enumCase(value, "DW_TAG_" #name, dwarf::DW_TAG_##name);
392 
393 template <> struct ScalarEnumerationTraits<dwarf::Tag> {
394  static void enumeration(IO &io, dwarf::Tag &value) {
395 #include "llvm/BinaryFormat/Dwarf.def"
396  io.enumFallback<Hex16>(value);
397  }
398 };
399 
400 #define HANDLE_DW_LNS(unused, name) \
401  io.enumCase(value, "DW_LNS_" #name, dwarf::DW_LNS_##name);
402 
403 template <> struct ScalarEnumerationTraits<dwarf::LineNumberOps> {
404  static void enumeration(IO &io, dwarf::LineNumberOps &value) {
405 #include "llvm/BinaryFormat/Dwarf.def"
406  io.enumFallback<Hex8>(value);
407  }
408 };
409 
410 #define HANDLE_DW_LNE(unused, name) \
411  io.enumCase(value, "DW_LNE_" #name, dwarf::DW_LNE_##name);
412 
413 template <> struct ScalarEnumerationTraits<dwarf::LineNumberExtendedOps> {
414  static void enumeration(IO &io, dwarf::LineNumberExtendedOps &value) {
415 #include "llvm/BinaryFormat/Dwarf.def"
416  io.enumFallback<Hex16>(value);
417  }
418 };
419 
420 #define HANDLE_DW_AT(unused, name, unused2, unused3) \
421  io.enumCase(value, "DW_AT_" #name, dwarf::DW_AT_##name);
422 
423 template <> struct ScalarEnumerationTraits<dwarf::Attribute> {
424  static void enumeration(IO &io, dwarf::Attribute &value) {
425 #include "llvm/BinaryFormat/Dwarf.def"
426  io.enumFallback<Hex16>(value);
427  }
428 };
429 
430 #define HANDLE_DW_FORM(unused, name, unused2, unused3) \
431  io.enumCase(value, "DW_FORM_" #name, dwarf::DW_FORM_##name);
432 
433 template <> struct ScalarEnumerationTraits<dwarf::Form> {
434  static void enumeration(IO &io, dwarf::Form &value) {
435 #include "llvm/BinaryFormat/Dwarf.def"
436  io.enumFallback<Hex16>(value);
437  }
438 };
439 
440 #define HANDLE_DW_UT(unused, name) \
441  io.enumCase(value, "DW_UT_" #name, dwarf::DW_UT_##name);
442 
443 template <> struct ScalarEnumerationTraits<dwarf::UnitType> {
444  static void enumeration(IO &io, dwarf::UnitType &value) {
445 #include "llvm/BinaryFormat/Dwarf.def"
446  io.enumFallback<Hex8>(value);
447  }
448 };
449 
450 template <> struct ScalarEnumerationTraits<dwarf::Constants> {
451  static void enumeration(IO &io, dwarf::Constants &value) {
452  io.enumCase(value, "DW_CHILDREN_no", dwarf::DW_CHILDREN_no);
453  io.enumCase(value, "DW_CHILDREN_yes", dwarf::DW_CHILDREN_yes);
454  io.enumFallback<Hex16>(value);
455  }
456 };
457 
458 #define HANDLE_DW_RLE(unused, name) \
459  io.enumCase(value, "DW_RLE_" #name, dwarf::DW_RLE_##name);
460 
461 template <> struct ScalarEnumerationTraits<dwarf::RnglistEntries> {
462  static void enumeration(IO &io, dwarf::RnglistEntries &value) {
463 #include "llvm/BinaryFormat/Dwarf.def"
464  }
465 };
466 
467 #define HANDLE_DW_LLE(unused, name) \
468  io.enumCase(value, "DW_LLE_" #name, dwarf::DW_LLE_##name);
469 
470 template <> struct ScalarEnumerationTraits<dwarf::LoclistEntries> {
471  static void enumeration(IO &io, dwarf::LoclistEntries &value) {
472 #include "llvm/BinaryFormat/Dwarf.def"
473  }
474 };
475 
476 #define HANDLE_DW_OP(id, name, version, vendor) \
477  io.enumCase(value, "DW_OP_" #name, dwarf::DW_OP_##name);
478 
479 template <> struct ScalarEnumerationTraits<dwarf::LocationAtom> {
480  static void enumeration(IO &io, dwarf::LocationAtom &value) {
481 #include "llvm/BinaryFormat/Dwarf.def"
482  io.enumFallback<yaml::Hex8>(value);
483  }
484 };
485 
486 } // end namespace yaml
487 } // end namespace llvm
488 
489 #endif // LLVM_OBJECTYAML_DWARFYAML_H
llvm::DWARFYAML::AttributeAbbrev::Value
llvm::yaml::Hex64 Value
Definition: DWARFYAML.h:34
llvm::DWARFYAML::RangeEntry::HighOffset
llvm::yaml::Hex64 HighOffset
Definition: DWARFYAML.h:68
llvm::DWARFYAML::DWARFOperation
Definition: DWARFYAML.h:178
llvm::DWARFYAML::ListTable::Offsets
std::optional< std::vector< yaml::Hex64 > > Offsets
Definition: DWARFYAML.h:207
llvm::DWARFYAML::Data::DebugRanges
std::optional< std::vector< Ranges > > DebugRanges
Definition: DWARFYAML.h:218
llvm::DWARFYAML::AttributeAbbrev::Attribute
llvm::dwarf::Attribute Attribute
Definition: DWARFYAML.h:32
llvm::DWARFYAML::LineTable::Version
uint16_t Version
Definition: DWARFYAML.h:142
llvm::DWARFYAML::Entry::AbbrCode
llvm::yaml::Hex32 AbbrCode
Definition: DWARFYAML.h:100
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::DWARFYAML::Unit::Length
std::optional< yaml::Hex64 > Length
Definition: DWARFYAML.h:112
llvm::DWARFYAML::LineTable::LineRange
uint8_t LineRange
Definition: DWARFYAML.h:148
llvm::DWARFYAML::Data::GNUPubNames
std::optional< PubSection > GNUPubNames
Definition: DWARFYAML.h:223
llvm::dwarf::Constants
Constants
Definition: Dwarf.h:510
llvm::DWARFYAML::AddrTableEntry::SegSelectorSize
yaml::Hex8 SegSelectorSize
Definition: DWARFYAML.h:166
llvm::DWARFYAML::LoclistEntry::Descriptions
std::vector< DWARFOperation > Descriptions
Definition: DWARFYAML.h:192
llvm::DWARFYAML::LineTableOpcode::SubOpcode
dwarf::LineNumberExtendedOps SubOpcode
Definition: DWARFYAML.h:131
llvm::DWARFYAML::ListEntries::Content
std::optional< yaml::BinaryRef > Content
Definition: DWARFYAML.h:197
llvm::DWARFYAML::PubSection::Format
dwarf::DwarfFormat Format
Definition: DWARFYAML.h:85
llvm::DWARFYAML::LineTable::StandardOpcodeLengths
std::optional< std::vector< uint8_t > > StandardOpcodeLengths
Definition: DWARFYAML.h:150
llvm::DWARFYAML::Unit::AbbrOffset
std::optional< yaml::Hex64 > AbbrOffset
Definition: DWARFYAML.h:117
llvm::DWARFYAML::LineTableOpcode::Opcode
dwarf::LineNumberOps Opcode
Definition: DWARFYAML.h:129
llvm::DWARFYAML::RnglistEntry::Values
std::vector< yaml::Hex64 > Values
Definition: DWARFYAML.h:185
llvm::DWARFYAML::LineTableOpcode::ExtLen
std::optional< uint64_t > ExtLen
Definition: DWARFYAML.h:130
StringRef.h
llvm::DWARFYAML::StringOffsetsTable
Definition: DWARFYAML.h:170
llvm::DWARFYAML::LineTable::DefaultIsStmt
uint8_t DefaultIsStmt
Definition: DWARFYAML.h:146
llvm::DWARFYAML::DWARFContext
Class that contains helpful context information when mapping YAML into DWARF data structures.
Definition: DWARFYAML.h:106
llvm::DWARFYAML::LineTable::LineBase
uint8_t LineBase
Definition: DWARFYAML.h:147
llvm::dwarf::Form
Form
Definition: Dwarf.h:130
llvm::DWARFYAML::Data::DebugAranges
std::optional< std::vector< ARange > > DebugAranges
Definition: DWARFYAML.h:217
llvm::DWARFYAML::LineTableOpcode::SData
int64_t SData
Definition: DWARFYAML.h:133
llvm::DWARFYAML::Data::IsLittleEndian
bool IsLittleEndian
Definition: DWARFYAML.h:212
llvm::DWARFYAML::ARangeDescriptor
Definition: DWARFYAML.h:49
llvm::DWARFYAML::PubSection::Length
yaml::Hex64 Length
Definition: DWARFYAML.h:86
LLVM_YAML_IS_SEQUENCE_VECTOR
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
llvm::DWARFYAML::Data::GNUPubTypes
std::optional< PubSection > GNUPubTypes
Definition: DWARFYAML.h:224
llvm::DWARFYAML::File::DirIdx
uint64_t DirIdx
Definition: DWARFYAML.h:123
llvm::DWARFYAML::ListEntries::Entries
std::optional< std::vector< EntryType > > Entries
Definition: DWARFYAML.h:196
llvm::DWARFYAML::LoclistEntry::Operator
dwarf::LoclistEntries Operator
Definition: DWARFYAML.h:189
llvm::DWARFYAML::ListTable::Version
yaml::Hex16 Version
Definition: DWARFYAML.h:203
llvm::DWARFYAML::StringOffsetsTable::Offsets
std::vector< yaml::Hex64 > Offsets
Definition: DWARFYAML.h:175
llvm::DWARFYAML::StringOffsetsTable::Version
yaml::Hex16 Version
Definition: DWARFYAML.h:173
llvm::DWARFYAML::Data::isEmpty
bool isEmpty() const
Definition: DWARFYAML.cpp:21
llvm::DWARFYAML::Data::DebugLines
std::vector< LineTable > DebugLines
Definition: DWARFYAML.h:228
llvm::DWARFYAML::Data::DebugStrOffsets
std::optional< std::vector< StringOffsetsTable > > DebugStrOffsets
Definition: DWARFYAML.h:216
llvm::DWARFYAML::LineTableOpcode::UnknownOpcodeData
std::vector< llvm::yaml::Hex8 > UnknownOpcodeData
Definition: DWARFYAML.h:135
llvm::DWARFYAML::LineTableOpcode
Definition: DWARFYAML.h:128
llvm::dwarf::DW_CHILDREN_yes
@ DW_CHILDREN_yes
Definition: Dwarf.h:513
llvm::DWARFYAML::LineTable::IncludeDirs
std::vector< StringRef > IncludeDirs
Definition: DWARFYAML.h:151
llvm::DWARFYAML::ListTable::Lists
std::vector< ListEntries< EntryType > > Lists
Definition: DWARFYAML.h:208
llvm::DWARFYAML::ListTable::Format
dwarf::DwarfFormat Format
Definition: DWARFYAML.h:201
llvm::DWARFYAML::ARange::Version
uint16_t Version
Definition: DWARFYAML.h:57
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:41
llvm::RISCVFeatures::validate
void validate(const Triple &TT, const FeatureBitset &FeatureBits)
Definition: RISCVBaseInfo.cpp:99
llvm::dwarf::Tag
Tag
Definition: Dwarf.h:103
llvm::dwarf::LoclistEntries
LoclistEntries
DWARF v5 loc list entry encoding values.
Definition: Dwarf.h:494
llvm::DWARFYAML::Abbrev::Code
std::optional< yaml::Hex64 > Code
Definition: DWARFYAML.h:38
llvm::DWARFYAML::RnglistEntry
Definition: DWARFYAML.h:183
llvm::Data
@ Data
Definition: SIMachineScheduler.h:55
llvm::dwarf::Attribute
Attribute
Attributes.
Definition: Dwarf.h:123
llvm::DWARFYAML::Data
Definition: DWARFYAML.h:211
llvm::DWARFYAML::LineTableOpcode::StandardOpcodeData
std::vector< llvm::yaml::Hex64 > StandardOpcodeData
Definition: DWARFYAML.h:136
llvm::DWARFYAML::Abbrev::Children
llvm::dwarf::Constants Children
Definition: DWARFYAML.h:40
llvm::DWARFYAML::AddrTableEntry::Format
dwarf::DwarfFormat Format
Definition: DWARFYAML.h:162
llvm::DWARFYAML::LineTableOpcode::FileEntry
File FileEntry
Definition: DWARFYAML.h:134
llvm::DWARFYAML::StringOffsetsTable::Length
std::optional< yaml::Hex64 > Length
Definition: DWARFYAML.h:172
llvm::DWARFYAML::ListTable::SegSelectorSize
yaml::Hex8 SegSelectorSize
Definition: DWARFYAML.h:205
llvm::DWARFYAML::RangeEntry
Class that describes a range list entry, or a base address selection entry within a range list in the...
Definition: DWARFYAML.h:66
llvm::DWARFYAML::Entry::Values
std::vector< FormValue > Values
Definition: DWARFYAML.h:101
llvm::DWARFYAML::Data::DebugLoclists
std::optional< std::vector< ListTable< LoclistEntry > > > DebugLoclists
Definition: DWARFYAML.h:230
llvm::DWARFYAML::ARange::AddrSize
std::optional< yaml::Hex8 > AddrSize
Definition: DWARFYAML.h:59
llvm::DWARFYAML::LoclistEntry::DescriptionsLength
std::optional< yaml::Hex64 > DescriptionsLength
Definition: DWARFYAML.h:191
llvm::DWARFYAML::SegAddrPair::Address
yaml::Hex64 Address
Definition: DWARFYAML.h:158
llvm::DWARFYAML::ARange::Descriptors
std::vector< ARangeDescriptor > Descriptors
Definition: DWARFYAML.h:61
llvm::DWARFYAML::FormValue::CStr
StringRef CStr
Definition: DWARFYAML.h:95
llvm::DWARFYAML::Data::DebugAbbrev
std::vector< AbbrevTable > DebugAbbrev
Definition: DWARFYAML.h:214
llvm::DWARFYAML::File::ModTime
uint64_t ModTime
Definition: DWARFYAML.h:124
llvm::DWARFYAML::StringOffsetsTable::Padding
yaml::Hex16 Padding
Definition: DWARFYAML.h:174
llvm::DWARFYAML::PubSection::Version
uint16_t Version
Definition: DWARFYAML.h:87
llvm::DWARFYAML::ARange::Length
std::optional< yaml::Hex64 > Length
Definition: DWARFYAML.h:56
llvm::DWARFYAML::Data::AbbrevTableInfo::Index
uint64_t Index
Definition: DWARFYAML.h:237
llvm::DWARFYAML::Ranges::AddrSize
std::optional< llvm::yaml::Hex8 > AddrSize
Definition: DWARFYAML.h:74
llvm::dwarf::Index
Index
Definition: Dwarf.h:550
YAML.h
llvm::DWARFYAML::Abbrev::Attributes
std::vector< AttributeAbbrev > Attributes
Definition: DWARFYAML.h:41
llvm::DWARFYAML::ARange::SegSize
yaml::Hex8 SegSize
Definition: DWARFYAML.h:60
llvm::DWARFYAML::Abbrev
Definition: DWARFYAML.h:37
llvm::dwarf::LineNumberExtendedOps
LineNumberExtendedOps
Line Number Extended Opcode Encodings.
Definition: Dwarf.h:448
llvm::dwarf::DwarfFormat
DwarfFormat
Constants that define the DWARF format as 32 or 64 bit.
Definition: Dwarf.h:91
llvm::CallingConv::ID
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Definition: CallingConv.h:24
llvm::DWARFYAML::LineTable::MinInstLength
uint8_t MinInstLength
Definition: DWARFYAML.h:144
llvm::DWARFYAML::File
Definition: DWARFYAML.h:121
llvm::DWARFYAML::AbbrevTable::ID
std::optional< uint64_t > ID
Definition: DWARFYAML.h:45
llvm::DWARFYAML::RnglistEntry::Operator
dwarf::RnglistEntries Operator
Definition: DWARFYAML.h:184
llvm::DWARFYAML::FormValue::Value
llvm::yaml::Hex64 Value
Definition: DWARFYAML.h:94
llvm::DWARFYAML::PubEntry::DieOffset
llvm::yaml::Hex32 DieOffset
Definition: DWARFYAML.h:79
llvm::DWARFYAML::ListEntries
Definition: DWARFYAML.h:195
llvm::DWARFYAML::PubSection::Entries
std::vector< PubEntry > Entries
Definition: DWARFYAML.h:90
llvm::DWARFYAML::Data::getNonEmptySectionNames
SetVector< StringRef > getNonEmptySectionNames() const
Definition: DWARFYAML.cpp:25
llvm::DWARFYAML::LineTable::Format
dwarf::DwarfFormat Format
Definition: DWARFYAML.h:140
llvm::DWARFYAML::Data::AbbrevTableInfo
Definition: DWARFYAML.h:236
llvm::DWARFYAML::AddrTableEntry::AddrSize
std::optional< yaml::Hex8 > AddrSize
Definition: DWARFYAML.h:165
llvm::DWARFYAML::LineTableOpcode::Data
uint64_t Data
Definition: DWARFYAML.h:132
uint64_t
llvm::DWARFYAML::FormValue::BlockData
std::vector< llvm::yaml::Hex8 > BlockData
Definition: DWARFYAML.h:96
llvm::DWARFYAML::ListTable::AddrSize
std::optional< yaml::Hex8 > AddrSize
Definition: DWARFYAML.h:204
llvm::DWARFYAML::ListTable::OffsetEntryCount
std::optional< uint32_t > OffsetEntryCount
Definition: DWARFYAML.h:206
llvm::DWARFYAML::AbbrevTable::Table
std::vector< Abbrev > Table
Definition: DWARFYAML.h:46
llvm::DWARFYAML::File::Name
StringRef Name
Definition: DWARFYAML.h:122
llvm::DWARFYAML::LineTable::Length
std::optional< uint64_t > Length
Definition: DWARFYAML.h:141
llvm::DWARFYAML::ARangeDescriptor::Address
llvm::yaml::Hex64 Address
Definition: DWARFYAML.h:50
llvm::DWARFYAML::SegAddrPair
Definition: DWARFYAML.h:156
llvm::DWARFYAML::ARange::Format
dwarf::DwarfFormat Format
Definition: DWARFYAML.h:55
llvm::DWARFYAML::Data::DebugAddr
std::optional< std::vector< AddrTableEntry > > DebugAddr
Definition: DWARFYAML.h:219
llvm::dwarf::UnitType
UnitType
Constants for unit types in DWARF v5.
Definition: Dwarf.h:543
llvm::DWARFYAML::PubSection
Definition: DWARFYAML.h:84
llvm::DWARFYAML::Unit
Definition: DWARFYAML.h:110
llvm::DWARFYAML::ARange::CuOffset
yaml::Hex64 CuOffset
Definition: DWARFYAML.h:58
llvm::DWARFYAML::LoclistEntry
Definition: DWARFYAML.h:188
llvm::DWARFYAML::LineTable::Opcodes
std::vector< LineTableOpcode > Opcodes
Definition: DWARFYAML.h:153
llvm::DWARFYAML::Unit::Format
dwarf::DwarfFormat Format
Definition: DWARFYAML.h:111
llvm::DWARFYAML::Ranges::Offset
std::optional< llvm::yaml::Hex64 > Offset
Definition: DWARFYAML.h:73
llvm::DWARFYAML::ARangeDescriptor::Length
yaml::Hex64 Length
Definition: DWARFYAML.h:51
llvm::DWARFYAML::Abbrev::Tag
llvm::dwarf::Tag Tag
Definition: DWARFYAML.h:39
llvm::DWARFYAML::StringOffsetsTable::Format
dwarf::DwarfFormat Format
Definition: DWARFYAML.h:171
llvm::DWARFYAML::ListTable::Length
std::optional< yaml::Hex64 > Length
Definition: DWARFYAML.h:202
llvm::DWARFYAML::LineTable::MaxOpsPerInst
uint8_t MaxOpsPerInst
Definition: DWARFYAML.h:145
llvm::DWARFYAML::Unit::Type
llvm::dwarf::UnitType Type
Definition: DWARFYAML.h:115
llvm::DWARFYAML::PubSection::UnitOffset
uint32_t UnitOffset
Definition: DWARFYAML.h:88
llvm::DWARFYAML::AttributeAbbrev
Definition: DWARFYAML.h:31
YAMLTraits.h
llvm::DWARFYAML::Data::getAbbrevTableContentByIndex
StringRef getAbbrevTableContentByIndex(uint64_t Index) const
Definition: DWARFEmitter.cpp:97
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
Dwarf.h
llvm::DWARFYAML::AddrTableEntry
Definition: DWARFYAML.h:161
llvm::DWARFYAML::Data::CompileUnits
std::vector< Unit > CompileUnits
Definition: DWARFYAML.h:226
uint32_t
llvm::DWARFYAML::PubEntry::Name
StringRef Name
Definition: DWARFYAML.h:81
llvm::DWARFYAML::AbbrevTable
Definition: DWARFYAML.h:44
llvm::DWARFYAML::Data::PubTypes
std::optional< PubSection > PubTypes
Definition: DWARFYAML.h:221
llvm::dwarf::RnglistEntries
RnglistEntries
DWARF v5 range list entry encoding values.
Definition: Dwarf.h:488
llvm::DWARFYAML::Entry
Definition: DWARFYAML.h:99
llvm::DWARFYAML::Unit::AbbrevTableID
std::optional< uint64_t > AbbrevTableID
Definition: DWARFYAML.h:116
llvm::DWARFYAML::Ranges
Class that describes a single range list inside the .debug_ranges section.
Definition: DWARFYAML.h:72
llvm::DWARFYAML::AttributeAbbrev::Form
llvm::dwarf::Form Form
Definition: DWARFYAML.h:33
llvm::DWARFYAML::PubEntry
Definition: DWARFYAML.h:78
llvm::DWARFYAML::Unit::AddrSize
std::optional< uint8_t > AddrSize
Definition: DWARFYAML.h:114
llvm::DWARFYAML::ListTable
Definition: DWARFYAML.h:200
llvm::DWARFYAML::LineTable
Definition: DWARFYAML.h:139
uint16_t
llvm::DWARFYAML::PubEntry::Descriptor
llvm::yaml::Hex8 Descriptor
Definition: DWARFYAML.h:80
llvm::DWARFYAML::Unit::Entries
std::vector< Entry > Entries
Definition: DWARFYAML.h:118
llvm::DWARFYAML::Data::Is64BitAddrSize
bool Is64BitAddrSize
Definition: DWARFYAML.h:213
llvm::DWARFYAML::AddrTableEntry::SegAddrPairs
std::vector< SegAddrPair > SegAddrPairs
Definition: DWARFYAML.h:167
llvm::DWARFYAML::Data::DebugStrings
std::optional< std::vector< StringRef > > DebugStrings
Definition: DWARFYAML.h:215
llvm::DWARFYAML::File::Length
uint64_t Length
Definition: DWARFYAML.h:125
llvm::DWARFYAML::Data::DebugRnglists
std::optional< std::vector< ListTable< RnglistEntry > > > DebugRnglists
Definition: DWARFYAML.h:229
llvm::dwarf::DW_CHILDREN_no
@ DW_CHILDREN_no
Definition: Dwarf.h:512
llvm::DWARFYAML::AddrTableEntry::Length
std::optional< yaml::Hex64 > Length
Definition: DWARFYAML.h:163
llvm::DWARFYAML::LineTable::PrologueLength
std::optional< uint64_t > PrologueLength
Definition: DWARFYAML.h:143
llvm::DWARFYAML::Data::AbbrevTableInfo::Offset
uint64_t Offset
Definition: DWARFYAML.h:238
llvm::DWARFYAML::Data::getAbbrevTableInfoByID
Expected< AbbrevTableInfo > getAbbrevTableInfoByID(uint64_t ID) const
Definition: DWARFYAML.cpp:59
llvm::DWARFYAML::RangeEntry::LowOffset
llvm::yaml::Hex64 LowOffset
Definition: DWARFYAML.h:67
llvm::DWARFYAML::DWARFOperation::Operator
dwarf::LocationAtom Operator
Definition: DWARFYAML.h:179
llvm::DWARFYAML::FormValue
Definition: DWARFYAML.h:93
llvm::DWARFYAML::LineTable::Files
std::vector< File > Files
Definition: DWARFYAML.h:152
llvm::logicalview::LVWarningKind::Ranges
@ Ranges
llvm::DWARFYAML::ARange
Definition: DWARFYAML.h:54
llvm::dwarf::LineNumberOps
LineNumberOps
Line Number Standard Opcode Encodings.
Definition: Dwarf.h:442
llvm::DWARFYAML::DWARFContext::IsGNUPubSec
bool IsGNUPubSec
Definition: DWARFYAML.h:107
llvm::DWARFYAML::DWARFOperation::Values
std::vector< yaml::Hex64 > Values
Definition: DWARFYAML.h:180
llvm::dwarf::DWARF64
@ DWARF64
Definition: Dwarf.h:91
llvm::DWARFYAML::Data::PubNames
std::optional< PubSection > PubNames
Definition: DWARFYAML.h:220
llvm::DWARFYAML::LoclistEntry::Values
std::vector< yaml::Hex64 > Values
Definition: DWARFYAML.h:190
llvm::ARMBuildAttrs::File
@ File
Definition: ARMBuildAttributes.h:36
llvm::DWARFYAML::SegAddrPair::Segment
yaml::Hex64 Segment
Definition: DWARFYAML.h:157
llvm::SetVector
A vector that has set insertion semantics.
Definition: SetVector.h:40
llvm::DWARFYAML::Ranges::Entries
std::vector< RangeEntry > Entries
Definition: DWARFYAML.h:75
llvm::DWARFYAML::PubSection::UnitSize
uint32_t UnitSize
Definition: DWARFYAML.h:89
llvm::DWARFYAML::LineTable::OpcodeBase
std::optional< uint8_t > OpcodeBase
Definition: DWARFYAML.h:149
llvm::dwarf::LocationAtom
LocationAtom
Definition: Dwarf.h:136
llvm::DWARFYAML::AddrTableEntry::Version
yaml::Hex16 Version
Definition: DWARFYAML.h:164
llvm::dwarf::DWARF32
@ DWARF32
Definition: Dwarf.h:91
SetVector.h
llvm::DWARFYAML::Unit::Version
uint16_t Version
Definition: DWARFYAML.h:113