LLVM: lib/ObjectYAML/DWARFEmitter.cpp File Reference (original) (raw)

The DWARF component of yaml2obj. More...

Go to the source code of this file.

Functions
template<typename T>
static void writeInteger (T Integer, raw_ostream &OS, bool IsLittleEndian)
static Error writeVariableSizedInteger (uint64_t Integer, size_t Size, raw_ostream &OS, bool IsLittleEndian)
static void ZeroFillBytes (raw_ostream &OS, size_t Size)
static void writeInitialLength (const dwarf::DwarfFormat Format, const uint64_t Length, raw_ostream &OS, bool IsLittleEndian)
static void writeDWARFOffset (uint64_t Offset, dwarf::DwarfFormat Format, raw_ostream &OS, bool IsLittleEndian)
static Error emitPubSection (raw_ostream &OS, const DWARFYAML::PubSection &Sect, bool IsLittleEndian, bool IsGNUPubSec=false)
static Expected< uint64_t > writeDIE (const DWARFYAML::Data &DI, uint64_t CUIndex, uint64_t AbbrevTableID, const dwarf::FormParams &Params, const DWARFYAML::Entry &Entry, raw_ostream &OS, bool IsLittleEndian)
static void emitFileEntry (raw_ostream &OS, const DWARFYAML::File &File)
static void writeExtendedOpcode (const DWARFYAML::LineTableOpcode &Op, uint8_t AddrSize, bool IsLittleEndian, raw_ostream &OS)
static void writeLineTableOpcode (const DWARFYAML::LineTableOpcode &Op, uint8_t OpcodeBase, uint8_t AddrSize, raw_ostream &OS, bool IsLittleEndian)
static std::vector< uint8_t > getStandardOpcodeLengths (uint16_t Version, std::optional< uint8_t > OpcodeBase)
static Error checkOperandCount (StringRef EncodingString, ArrayRef< yaml::Hex64 > Values, uint64_t ExpectedOperands)
static Error writeListEntryAddress (StringRef EncodingName, raw_ostream &OS, uint64_t Addr, uint8_t AddrSize, bool IsLittleEndian)
static Expected< uint64_t > writeDWARFExpression (raw_ostream &OS, const DWARFYAML::DWARFOperation &Operation, uint8_t AddrSize, bool IsLittleEndian)
static Expected< uint64_t > writeListEntry (raw_ostream &OS, const DWARFYAML::RnglistEntry &Entry, uint8_t AddrSize, bool IsLittleEndian)
static Expected< uint64_t > writeListEntry (raw_ostream &OS, const DWARFYAML::LoclistEntry &Entry, uint8_t AddrSize, bool IsLittleEndian)
template
static Error writeDWARFLists (raw_ostream &OS, ArrayRef< DWARFYAML::ListTable< EntryType > > Tables, bool IsLittleEndian, bool Is64BitAddrSize)
static Error emitDebugSectionImpl (const DWARFYAML::Data &DI, StringRef Sec, StringMap< std::unique_ptr< MemoryBuffer > > &OutputBuffers)

The DWARF component of yaml2obj.

Provided as library code for tests.

Definition in file DWARFEmitter.cpp.

checkOperandCount()

emitDebugSectionImpl()

emitFileEntry()

emitPubSection()

Definition at line 223 of file DWARFEmitter.cpp.

References llvm::DWARFYAML::PubSection::Entries, llvm::DWARFYAML::PubSection::Format, llvm::DWARFYAML::PubSection::Length, llvm::Error::success(), llvm::DWARFYAML::PubSection::UnitOffset, llvm::DWARFYAML::PubSection::UnitSize, llvm::DWARFYAML::PubSection::Version, llvm::raw_ostream::write(), writeInitialLength(), and writeInteger().

Referenced by llvm::DWARFYAML::emitDebugGNUPubnames(), llvm::DWARFYAML::emitDebugGNUPubtypes(), llvm::DWARFYAML::emitDebugPubnames(), and llvm::DWARFYAML::emitDebugPubtypes().

getStandardOpcodeLengths()

writeDIE()

Definition at line 261 of file DWARFEmitter.cpp.

References llvm::dwarf::FormParams::AddrSize, llvm::DWARFYAML::Abbrev::Attributes, llvm::ArrayRef< T >::begin(), llvm::cantFail(), llvm::createStringError(), llvm::DWARFYAML::Data::DebugAbbrev, llvm::encodeSLEB128(), llvm::encodeULEB128(), llvm::DWARFYAML::Data::getAbbrevTableInfoByID(), llvm::dwarf::FormParams::getDwarfOffsetByteSize(), llvm::dwarf::FormParams::getRefAddrByteSize(), llvm::invalid_argument, llvm::ArrayRef< T >::size(), llvm::Expected< T >::takeError(), llvm::raw_ostream::tell(), llvm::toString(), llvm::utostr(), llvm::raw_ostream::write(), writeInteger(), and writeVariableSizedInteger().

Referenced by llvm::DWARFYAML::emitDebugInfo().

writeDWARFExpression()

writeDWARFLists()

template

Definition at line 1125 of file DWARFEmitter.cpp.

References llvm::dwarf::DWARF64, llvm::Length, llvm::Offset, llvm::Error::success(), llvm::Expected< T >::takeError(), llvm::raw_ostream::tell(), UINT64_MAX, llvm::raw_ostream::write(), writeDWARFOffset(), writeInitialLength(), writeInteger(), and writeListEntry().

Referenced by llvm::DWARFYAML::emitDebugLoclists(), and llvm::DWARFYAML::emitDebugRnglists().

writeDWARFOffset()

writeExtendedOpcode()

writeInitialLength()

Definition at line 70 of file DWARFEmitter.cpp.

References llvm::cantFail(), llvm::dwarf::DW_LENGTH_DWARF64, llvm::dwarf::DWARF64, llvm::Length, and writeVariableSizedInteger().

Referenced by llvm::DWARFYAML::emitDebugAddr(), llvm::DWARFYAML::emitDebugAranges(), llvm::DWARFYAML::emitDebugInfo(), llvm::DWARFYAML::emitDebugLine(), llvm::DWARFYAML::emitDebugStrOffsets(), emitPubSection(), and writeDWARFLists().

writeInteger()

Definition at line 42 of file DWARFEmitter.cpp.

References llvm::Integer, llvm::sys::IsLittleEndianHost, llvm::sys::swapByteOrder(), T, and llvm::raw_ostream::write().

Referenced by llvm::DWARFYAML::emitDebugAddr(), llvm::DWARFYAML::emitDebugAranges(), llvm::DWARFYAML::emitDebugInfo(), llvm::DWARFYAML::emitDebugLine(), llvm::DWARFYAML::emitDebugStrOffsets(), emitPubSection(), writeDIE(), writeDWARFExpression(), writeDWARFLists(), writeExtendedOpcode(), writeLineTableOpcode(), writeListEntry(), writeListEntry(), and writeVariableSizedInteger().

writeLineTableOpcode()

writeListEntry() [1/2]

writeListEntry() [2/2]

writeListEntryAddress()

writeVariableSizedInteger()

Definition at line 48 of file DWARFEmitter.cpp.

References llvm::createStringError(), llvm::Integer, llvm::not_supported, Size, llvm::Error::success(), and writeInteger().

Referenced by llvm::DWARFYAML::emitDebugAddr(), llvm::DWARFYAML::emitDebugAranges(), llvm::DWARFYAML::emitDebugRanges(), writeDIE(), writeDWARFOffset(), writeExtendedOpcode(), writeInitialLength(), and writeListEntryAddress().

ZeroFillBytes()