15#ifndef LLVM_OBJECTYAML_DWARFYAML_H
16#define LLVM_OBJECTYAML_DWARFYAML_H
26#include <unordered_map>
39 std::optional<yaml::Hex64>
Code;
46 std::optional<uint64_t>
ID;
74 std::optional<llvm::yaml::Hex64>
Offset;
222 std::optional<std::vector<EntryType>>
Entries;
233 std::optional<std::vector<yaml::Hex64>>
Offsets;
234 std::vector<ListEntries<EntryType>>
Lists;
271 mutable std::unordered_map<uint64_t, AbbrevTableInfo> AbbrevTableInfoMap;
272 mutable std::unordered_map<uint64_t, std::string> AbbrevTableContents;
313template <>
struct MappingTraits<DWARFYAML::
Data> {
314 LLVM_ABI static void mapping(IO &IO, DWARFYAML::Data &DWARF);
317template <>
struct MappingTraits<DWARFYAML::AbbrevTable> {
318 LLVM_ABI static void mapping(IO &IO, DWARFYAML::AbbrevTable &AbbrevTable);
321template <>
struct MappingTraits<DWARFYAML::Abbrev> {
322 LLVM_ABI static void mapping(IO &IO, DWARFYAML::Abbrev &Abbrev);
325template <>
struct MappingTraits<DWARFYAML::AttributeAbbrev> {
326 LLVM_ABI static void mapping(IO &IO, DWARFYAML::AttributeAbbrev &AttAbbrev);
329template <>
struct MappingTraits<DWARFYAML::ARangeDescriptor> {
330 LLVM_ABI static void mapping(IO &IO, DWARFYAML::ARangeDescriptor &Descriptor);
333template <>
struct MappingTraits<DWARFYAML::ARange> {
334 LLVM_ABI static void mapping(IO &IO, DWARFYAML::ARange &ARange);
337template <>
struct MappingTraits<DWARFYAML::RangeEntry> {
338 LLVM_ABI static void mapping(IO &IO, DWARFYAML::RangeEntry &Entry);
341template <>
struct MappingTraits<DWARFYAML::
Ranges> {
342 LLVM_ABI static void mapping(IO &IO, DWARFYAML::Ranges &Ranges);
345template <>
struct MappingTraits<DWARFYAML::PubEntry> {
346 LLVM_ABI static void mapping(IO &IO, DWARFYAML::PubEntry &Entry);
349template <>
struct MappingTraits<DWARFYAML::PubSection> {
350 LLVM_ABI static void mapping(IO &IO, DWARFYAML::PubSection &Section);
353template <>
struct MappingTraits<DWARFYAML::Unit> {
354 LLVM_ABI static void mapping(IO &IO, DWARFYAML::Unit &Unit);
357template <>
struct MappingTraits<DWARFYAML::DebugNamesSection> {
358 LLVM_ABI static void mapping(IO &IO, DWARFYAML::DebugNamesSection &);
360template <>
struct MappingTraits<DWARFYAML::DebugNameEntry> {
361 LLVM_ABI static void mapping(IO &IO, DWARFYAML::DebugNameEntry &);
363template <>
struct MappingTraits<DWARFYAML::DebugNameAbbreviation> {
364 LLVM_ABI static void mapping(IO &IO, DWARFYAML::DebugNameAbbreviation &);
366template <>
struct MappingTraits<DWARFYAML::IdxForm> {
367 LLVM_ABI static void mapping(IO &IO, DWARFYAML::IdxForm &);
370template <>
struct MappingTraits<DWARFYAML::
Entry> {
371 LLVM_ABI static void mapping(IO &IO, DWARFYAML::Entry &Entry);
374template <>
struct MappingTraits<DWARFYAML::FormValue> {
375 LLVM_ABI static void mapping(IO &IO, DWARFYAML::FormValue &FormValue);
378template <>
struct MappingTraits<DWARFYAML::
File> {
379 LLVM_ABI static void mapping(IO &IO, DWARFYAML::File &File);
382template <>
struct MappingTraits<DWARFYAML::LineTableOpcode> {
383 LLVM_ABI static void mapping(IO &IO,
384 DWARFYAML::LineTableOpcode &LineTableOpcode);
387template <>
struct MappingTraits<DWARFYAML::LineTable> {
388 LLVM_ABI static void mapping(IO &IO, DWARFYAML::LineTable &LineTable);
391template <>
struct MappingTraits<DWARFYAML::SegAddrPair> {
392 LLVM_ABI static void mapping(IO &IO, DWARFYAML::SegAddrPair &SegAddrPair);
395template <>
struct MappingTraits<DWARFYAML::DWARFOperation> {
396 LLVM_ABI static void mapping(IO &IO,
397 DWARFYAML::DWARFOperation &DWARFOperation);
400template <
typename EntryType>
401struct MappingTraits<DWARFYAML::ListTable<EntryType>> {
402 static void mapping(IO &IO, DWARFYAML::ListTable<EntryType> &ListTable);
405template <
typename EntryType>
406struct MappingTraits<DWARFYAML::ListEntries<EntryType>> {
407 static void mapping(IO &IO, DWARFYAML::ListEntries<EntryType> &ListEntries);
409 DWARFYAML::ListEntries<EntryType> &ListEntries);
412template <>
struct MappingTraits<DWARFYAML::RnglistEntry> {
413 LLVM_ABI static void mapping(IO &IO, DWARFYAML::RnglistEntry &RnglistEntry);
416template <>
struct MappingTraits<DWARFYAML::LoclistEntry> {
417 LLVM_ABI static void mapping(IO &IO, DWARFYAML::LoclistEntry &LoclistEntry);
420template <>
struct MappingTraits<DWARFYAML::AddrTableEntry> {
421 LLVM_ABI static void mapping(IO &IO, DWARFYAML::AddrTableEntry &AddrTable);
424template <>
struct MappingTraits<DWARFYAML::StringOffsetsTable> {
425 LLVM_ABI static void mapping(IO &IO,
426 DWARFYAML::StringOffsetsTable &StrOffsetsTable);
429template <>
struct ScalarEnumerationTraits<dwarf::
DwarfFormat> {
430 static void enumeration(IO &IO, dwarf::DwarfFormat &Format) {
431 IO.enumCase(Format,
"DWARF32", dwarf::DWARF32);
432 IO.enumCase(Format,
"DWARF64", dwarf::DWARF64);
436#define HANDLE_DW_TAG(unused, name, unused2, unused3, unused4) \
437 io.enumCase(value, "DW_TAG_" #name, dwarf::DW_TAG_##name);
439template <>
struct ScalarEnumerationTraits<dwarf::
Tag> {
440 static void enumeration(IO &io, dwarf::Tag &
value) {
441#include "llvm/BinaryFormat/Dwarf.def"
442 io.enumFallback<Hex16>(
value);
446#define HANDLE_DW_LNS(unused, name) \
447 io.enumCase(value, "DW_LNS_" #name, dwarf::DW_LNS_##name);
449template <>
struct ScalarEnumerationTraits<dwarf::
LineNumberOps> {
450 static void enumeration(IO &io, dwarf::LineNumberOps &
value) {
451#include "llvm/BinaryFormat/Dwarf.def"
452 io.enumFallback<Hex8>(
value);
456#define HANDLE_DW_LNE(unused, name) \
457 io.enumCase(value, "DW_LNE_" #name, dwarf::DW_LNE_##name);
460 static void enumeration(IO &io, dwarf::LineNumberExtendedOps &
value) {
461#include "llvm/BinaryFormat/Dwarf.def"
462 io.enumFallback<Hex16>(
value);
466#define HANDLE_DW_AT(unused, name, unused2, unused3) \
467 io.enumCase(value, "DW_AT_" #name, dwarf::DW_AT_##name);
469template <>
struct ScalarEnumerationTraits<dwarf::
Attribute> {
470 static void enumeration(IO &io, dwarf::Attribute &
value) {
471#include "llvm/BinaryFormat/Dwarf.def"
472 io.enumFallback<Hex16>(
value);
476#define HANDLE_DW_FORM(unused, name, unused2, unused3) \
477 io.enumCase(value, "DW_FORM_" #name, dwarf::DW_FORM_##name);
479template <>
struct ScalarEnumerationTraits<dwarf::
Form> {
480 static void enumeration(IO &io, dwarf::Form &
value) {
481#include "llvm/BinaryFormat/Dwarf.def"
482 io.enumFallback<Hex16>(
value);
486#define HANDLE_DW_IDX(unused, name) \
487 io.enumCase(value, "DW_IDX_" #name, dwarf::DW_IDX_##name);
489template <>
struct ScalarEnumerationTraits<dwarf::
Index> {
490 static void enumeration(IO &io, dwarf::Index &
value) {
491#include "llvm/BinaryFormat/Dwarf.def"
492 io.enumFallback<Hex16>(
value);
496#define HANDLE_DW_UT(unused, name) \
497 io.enumCase(value, "DW_UT_" #name, dwarf::DW_UT_##name);
499template <>
struct ScalarEnumerationTraits<dwarf::
UnitType> {
500 static void enumeration(IO &io, dwarf::UnitType &
value) {
501#include "llvm/BinaryFormat/Dwarf.def"
502 io.enumFallback<Hex8>(
value);
506template <>
struct ScalarEnumerationTraits<dwarf::
Constants> {
507 static void enumeration(IO &io, dwarf::Constants &
value) {
508 io.enumCase(
value,
"DW_CHILDREN_no", dwarf::DW_CHILDREN_no);
509 io.enumCase(
value,
"DW_CHILDREN_yes", dwarf::DW_CHILDREN_yes);
510 io.enumFallback<Hex16>(
value);
514#define HANDLE_DW_RLE(unused, name) \
515 io.enumCase(value, "DW_RLE_" #name, dwarf::DW_RLE_##name);
517template <>
struct ScalarEnumerationTraits<dwarf::
RnglistEntries> {
518 static void enumeration(IO &io, dwarf::RnglistEntries &
value) {
519#include "llvm/BinaryFormat/Dwarf.def"
523#define HANDLE_DW_LLE(unused, name) \
524 io.enumCase(value, "DW_LLE_" #name, dwarf::DW_LLE_##name);
526template <>
struct ScalarEnumerationTraits<dwarf::
LoclistEntries> {
527 static void enumeration(IO &io, dwarf::LoclistEntries &
value) {
528#include "llvm/BinaryFormat/Dwarf.def"
532#define HANDLE_DW_OP(id, name, operands, arity, version, vendor) \
533 io.enumCase(value, "DW_OP_" #name, dwarf::DW_OP_##name);
535template <>
struct ScalarEnumerationTraits<dwarf::
LocationAtom> {
536 static void enumeration(IO &io, dwarf::LocationAtom &
value) {
537#include "llvm/BinaryFormat/Dwarf.def"
538 io.enumFallback<yaml::Hex8>(
value);
Given that RA is a live value
This file contains constants used for implementing Dwarf debug support.
This file implements a set that has insertion order iteration characteristics.
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
Tagged union holding either a T or a Error.
A vector that has set insertion semantics.
StringRef - Represent a constant reference to a string, i.e.
void validate(const Triple &TT, const FeatureBitset &FeatureBits)
LineNumberOps
Line Number Standard Opcode Encodings.
LoclistEntries
DWARF v5 loc list entry encoding values.
UnitType
Constants for unit types in DWARF v5.
DwarfFormat
Constants that define the DWARF format as 32 or 64 bit.
RnglistEntries
DWARF v5 range list entry encoding values.
LineNumberExtendedOps
Line Number Extended Opcode Encodings.
This is an optimization pass for GlobalISel generic memory operations.
llvm::yaml::Hex64 Address
std::optional< yaml::Hex64 > Length
dwarf::DwarfFormat Format
std::vector< ARangeDescriptor > Descriptors
std::optional< yaml::Hex8 > AddrSize
std::vector< Abbrev > Table
std::optional< uint64_t > ID
std::vector< AttributeAbbrev > Attributes
std::optional< yaml::Hex64 > Code
llvm::dwarf::Constants Children
std::optional< yaml::Hex64 > Length
std::optional< yaml::Hex8 > AddrSize
dwarf::DwarfFormat Format
yaml::Hex8 SegSelectorSize
std::vector< SegAddrPair > SegAddrPairs
llvm::dwarf::Attribute Attribute
Class that contains helpful context information when mapping YAML into DWARF data structures.
std::vector< yaml::Hex64 > Values
dwarf::LocationAtom Operator
std::vector< Unit > Units
std::vector< LineTable > DebugLines
std::optional< std::vector< AddrTableEntry > > DebugAddr
std::optional< std::vector< Ranges > > DebugRanges
std::optional< std::vector< ListTable< LoclistEntry > > > DebugLoclists
std::vector< AbbrevTable > DebugAbbrev
LLVM_ABI Expected< AbbrevTableInfo > getAbbrevTableInfoByID(uint64_t ID) const
std::optional< PubSection > GNUPubNames
std::optional< std::vector< ARange > > DebugAranges
LLVM_ABI StringRef getAbbrevTableContentByIndex(uint64_t Index) const
std::optional< PubSection > GNUPubTypes
LLVM_ABI SetVector< StringRef > getNonEmptySectionNames() const
std::optional< std::vector< StringOffsetsTable > > DebugStrOffsets
std::optional< std::vector< StringRef > > DebugStrings
std::optional< std::vector< ListTable< RnglistEntry > > > DebugRnglists
std::optional< PubSection > PubNames
std::optional< DebugNamesSection > DebugNames
std::optional< PubSection > PubTypes
LLVM_ABI bool isEmpty() const
std::vector< IdxForm > Indices
std::vector< yaml::Hex64 > Values
std::vector< DebugNameAbbreviation > Abbrevs
std::vector< DebugNameEntry > Entries
std::vector< FormValue > Values
llvm::yaml::Hex32 AbbrCode
dwarf::LineNumberOps Opcode
std::optional< uint64_t > ExtLen
std::vector< llvm::yaml::Hex64 > StandardOpcodeData
dwarf::LineNumberExtendedOps SubOpcode
std::vector< llvm::yaml::Hex8 > UnknownOpcodeData
std::optional< uint64_t > Length
std::optional< uint8_t > OpcodeBase
std::vector< LineTableOpcode > Opcodes
std::optional< uint64_t > PrologueLength
dwarf::DwarfFormat Format
std::vector< File > Files
std::vector< StringRef > IncludeDirs
std::optional< std::vector< uint8_t > > StandardOpcodeLengths
std::optional< std::vector< EntryType > > Entries
std::optional< yaml::BinaryRef > Content
std::optional< yaml::Hex8 > AddrSize
std::optional< std::vector< yaml::Hex64 > > Offsets
yaml::Hex8 SegSelectorSize
dwarf::DwarfFormat Format
std::vector< ListEntries< EntryType > > Lists
std::optional< uint32_t > OffsetEntryCount
std::optional< yaml::Hex64 > Length
std::vector< yaml::Hex64 > Values
std::optional< yaml::Hex64 > DescriptionsLength
dwarf::LoclistEntries Operator
std::vector< DWARFOperation > Descriptions
llvm::yaml::Hex8 Descriptor
llvm::yaml::Hex32 DieOffset
dwarf::DwarfFormat Format
std::vector< PubEntry > Entries
Class that describes a range list entry, or a base address selection entry within a range list in the...
llvm::yaml::Hex64 HighOffset
llvm::yaml::Hex64 LowOffset
Class that describes a single range list inside the .debug_ranges section.
std::vector< RangeEntry > Entries
std::optional< llvm::yaml::Hex64 > Offset
std::optional< llvm::yaml::Hex8 > AddrSize
std::vector< yaml::Hex64 > Values
dwarf::RnglistEntries Operator
std::optional< yaml::Hex64 > Length
std::vector< yaml::Hex64 > Offsets
dwarf::DwarfFormat Format
std::optional< uint64_t > AbbrevTableID
dwarf::DwarfFormat Format
std::optional< yaml::Hex64 > Length
yaml::Hex64 TypeSignatureOrDwoID
std::optional< uint8_t > AddrSize
llvm::dwarf::UnitType Type
std::vector< Entry > Entries
std::optional< yaml::Hex64 > AbbrOffset