26 auto oldContext = IO.getContext();
27 IO.setContext(&DWARF);
30 if (!DWARF.
ARanges.empty() || !IO.outputting())
31 IO.mapOptional(
"debug_aranges", DWARF.
ARanges);
33 IO.mapOptional(
"debug_pubnames", DWARF.
PubNames);
35 IO.mapOptional(
"debug_pubtypes", DWARF.
PubTypes);
37 IO.mapOptional(
"debug_gnu_pubnames", DWARF.
GNUPubNames);
39 IO.mapOptional(
"debug_gnu_pubtypes", DWARF.
GNUPubTypes);
41 IO.mapOptional(
"debug_line", DWARF.
DebugLines);
42 IO.setContext(&oldContext);
47 IO.mapRequired(
"Code", Abbrev.
Code);
48 IO.mapRequired(
"Tag", Abbrev.
Tag);
49 IO.mapRequired(
"Children", Abbrev.
Children);
50 IO.mapRequired(
"Attributes", Abbrev.
Attributes);
55 IO.mapRequired(
"Attribute", AttAbbrev.
Attribute);
56 IO.mapRequired(
"Form", AttAbbrev.
Form);
57 if(AttAbbrev.
Form == dwarf::DW_FORM_implicit_const)
58 IO.mapRequired(
"Value", AttAbbrev.
Value);
63 IO.mapRequired(
"Address", Descriptor.
Address);
64 IO.mapRequired(
"Length", Descriptor.
Length);
69 IO.mapRequired(
"Length", Range.
Length);
70 IO.mapRequired(
"Version", Range.
Version);
71 IO.mapRequired(
"CuOffset", Range.
CuOffset);
72 IO.mapRequired(
"AddrSize", Range.
AddrSize);
73 IO.mapRequired(
"SegSize", Range.
SegSize);
79 IO.mapRequired(
"DieOffset", Entry.
DieOffset);
80 if (reinterpret_cast<DWARFYAML::PubSection *>(IO.getContext())->IsGNUStyle)
81 IO.mapRequired(
"Descriptor", Entry.
Descriptor);
82 IO.mapRequired(
"Name", Entry.
Name);
87 auto OldContext = IO.getContext();
88 IO.setContext(&Section);
90 IO.mapRequired(
"Length", Section.
Length);
91 IO.mapRequired(
"Version", Section.
Version);
92 IO.mapRequired(
"UnitOffset", Section.
UnitOffset);
93 IO.mapRequired(
"UnitSize", Section.
UnitSize);
94 IO.mapRequired(
"Entries", Section.
Entries);
96 IO.setContext(OldContext);
100 IO.mapRequired(
"Length", Unit.
Length);
101 IO.mapRequired(
"Version", Unit.
Version);
103 IO.mapRequired(
"UnitType", Unit.
Type);
104 IO.mapRequired(
"AbbrOffset", Unit.
AbbrOffset);
105 IO.mapRequired(
"AddrSize", Unit.
AddrSize);
106 IO.mapOptional(
"Entries", Unit.
Entries);
110 IO.mapRequired(
"AbbrCode", Entry.
AbbrCode);
111 IO.mapRequired(
"Values", Entry.
Values);
116 IO.mapOptional(
"Value", FormValue.
Value);
117 if (!FormValue.
CStr.
empty() || !IO.outputting())
118 IO.mapOptional(
"CStr", FormValue.
CStr);
119 if (!FormValue.
BlockData.empty() || !IO.outputting())
120 IO.mapOptional(
"BlockData", FormValue.
BlockData);
124 IO.mapRequired(
"Name", File.
Name);
125 IO.mapRequired(
"DirIdx", File.
DirIdx);
126 IO.mapRequired(
"ModTime", File.
ModTime);
127 IO.mapRequired(
"Length", File.
Length);
132 IO.mapRequired(
"Opcode", LineTableOpcode.
Opcode);
133 if (LineTableOpcode.
Opcode == dwarf::DW_LNS_extended_op) {
134 IO.mapRequired(
"ExtLen", LineTableOpcode.
ExtLen);
135 IO.mapRequired(
"SubOpcode", LineTableOpcode.
SubOpcode);
143 IO.mapOptional(
"FileEntry", LineTableOpcode.
FileEntry);
144 if (LineTableOpcode.
Opcode == dwarf::DW_LNS_advance_line || !IO.outputting())
145 IO.mapOptional(
"SData", LineTableOpcode.
SData);
146 IO.mapOptional(
"Data", LineTableOpcode.
Data);
151 IO.mapRequired(
"Length", LineTable.
Length);
152 IO.mapRequired(
"Version", LineTable.
Version);
158 IO.mapRequired(
"LineBase", LineTable.
LineBase);
159 IO.mapRequired(
"LineRange", LineTable.
LineRange);
160 IO.mapRequired(
"OpcodeBase", LineTable.
OpcodeBase);
162 IO.mapRequired(
"IncludeDirs", LineTable.
IncludeDirs);
163 IO.mapRequired(
"Files", LineTable.
Files);
164 IO.mapRequired(
"Opcodes", LineTable.
Opcodes);
169 IO.mapRequired(
"TotalLength", InitialLength.
TotalLength);
171 IO.mapRequired(
"TotalLength64", InitialLength.
TotalLength64);
llvm::dwarf::Constants Children
std::vector< AttributeAbbrev > Attributes
This class represents lattice values for constants.
llvm::dwarf::UnitType Type
dwarf::LineNumberExtendedOps SubOpcode
dwarf::LineNumberOps Opcode
std::vector< Abbrev > AbbrevDecls
llvm::yaml::Hex64 Address
std::vector< uint8_t > StandardOpcodeLengths
std::vector< PubEntry > Entries
std::vector< ARangeDescriptor > Descriptors
std::vector< ARange > ARanges
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
std::vector< Unit > CompileUnits
std::vector< File > Files
llvm::yaml::Hex32 DieOffset
std::vector< LineTable > DebugLines
std::vector< StringRef > IncludeDirs
std::vector< Entry > Entries
std::vector< FormValue > Values
llvm::yaml::Hex8 Descriptor
llvm::dwarf::Attribute Attribute
std::vector< StringRef > DebugStrings
llvm::yaml::Hex32 AbbrCode
std::vector< llvm::yaml::Hex8 > UnknownOpcodeData
This file declares classes for handling the YAML representation of DWARF Debug Info.
std::vector< llvm::yaml::Hex64 > StandardOpcodeData
std::vector< LineTableOpcode > Opcodes