LLVM 22.0.0git
|
The DWARF component of yaml2obj. More...
#include "llvm/ObjectYAML/DWARFEmitter.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/ObjectYAML/DWARFYAML.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/LEB128.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/SwapByteOrder.h"
#include "llvm/Support/YAMLTraits.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/Host.h"
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include <vector>
Go to the source code of this file.
The DWARF component of yaml2obj.
Provided as library code for tests.
Definition in file DWARFEmitter.cpp.
|
static |
Definition at line 908 of file DWARFEmitter.cpp.
References llvm::createStringError(), llvm::invalid_argument, llvm::ArrayRef< T >::size(), llvm::StringRef::str(), and llvm::Error::success().
Referenced by writeDWARFExpression(), writeListEntry(), and writeListEntry().
|
static |
Definition at line 1251 of file DWARFEmitter.cpp.
References llvm::Data, llvm::raw_ostream::flush(), llvm::DWARFYAML::getDWARFEmitterByName(), llvm::MemoryBuffer::getMemBufferCopy(), and llvm::Error::success().
Referenced by llvm::DWARFYAML::emitDebugSections().
|
static |
Definition at line 502 of file DWARFEmitter.cpp.
References llvm::encodeULEB128(), and llvm::raw_ostream::write().
Referenced by llvm::DWARFYAML::emitDebugLine(), and writeExtendedOpcode().
|
static |
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().
|
static |
Definition at line 583 of file DWARFEmitter.cpp.
Referenced by llvm::DWARFYAML::emitDebugLine().
|
static |
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().
|
static |
Definition at line 934 of file DWARFEmitter.cpp.
References checkOperandCount(), llvm::createStringError(), llvm::StringRef::empty(), llvm::encodeSLEB128(), llvm::not_supported, Operation, llvm::dwarf::OperationEncodingString(), llvm::raw_ostream::tell(), llvm::utohexstr(), and writeInteger().
Referenced by writeListEntry().
|
static |
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().
|
static |
Definition at line 81 of file DWARFEmitter.cpp.
References llvm::cantFail(), llvm::dwarf::DWARF64, llvm::Offset, and writeVariableSizedInteger().
Referenced by llvm::DWARFYAML::emitDebugAranges(), llvm::DWARFYAML::emitDebugInfo(), llvm::DWARFYAML::emitDebugLine(), llvm::DWARFYAML::emitDebugStrOffsets(), and writeDWARFLists().
|
static |
Definition at line 510 of file DWARFEmitter.cpp.
References llvm::cantFail(), emitFileEntry(), llvm::encodeULEB128(), llvm::raw_ostream::write(), writeInteger(), and writeVariableSizedInteger().
Referenced by writeLineTableOpcode().
|
static |
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().
|
static |
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().
|
static |
Definition at line 543 of file DWARFEmitter.cpp.
References llvm::encodeSLEB128(), llvm::encodeULEB128(), writeExtendedOpcode(), and writeInteger().
Referenced by llvm::DWARFYAML::emitDebugLine().
|
static |
Definition at line 1027 of file DWARFEmitter.cpp.
References llvm::cantFail(), checkOperandCount(), llvm::encodeULEB128(), llvm::dwarf::LocListEncodingString(), llvm::Error::success(), llvm::raw_ostream::tell(), llvm::raw_ostream::write(), writeDWARFExpression(), writeInteger(), and writeListEntryAddress().
|
static |
Definition at line 966 of file DWARFEmitter.cpp.
References llvm::cantFail(), checkOperandCount(), llvm::encodeULEB128(), llvm::dwarf::RangeListEncodingString(), llvm::raw_ostream::tell(), writeInteger(), and writeListEntryAddress().
Referenced by writeDWARFLists().
|
static |
Definition at line 921 of file DWARFEmitter.cpp.
References llvm::c_str(), llvm::createStringError(), llvm::invalid_argument, llvm::StringRef::str(), llvm::Error::success(), llvm::toString(), and writeVariableSizedInteger().
Referenced by writeListEntry(), and writeListEntry().
|
static |
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().
|
static |
Definition at line 65 of file DWARFEmitter.cpp.
References Size, and llvm::raw_ostream::write().
Referenced by llvm::DWARFYAML::emitDebugAranges(), and llvm::DWARFYAML::emitDebugRanges().