LLVM 20.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 911 of file DWARFEmitter.cpp.
References llvm::createStringError(), llvm::invalid_argument, llvm::ArrayRef< T >::size(), llvm::StringRef::str(), and llvm::Error::success().
Referenced by writeDWARFExpression(), and writeListEntry().
|
static |
Definition at line 1254 of file DWARFEmitter.cpp.
References llvm::raw_ostream::flush(), llvm::DWARFYAML::getDWARFEmitterByName(), llvm::MemoryBuffer::getMemBufferCopy(), and llvm::Error::success().
Referenced by llvm::DWARFYAML::emitDebugSections().
|
static |
Definition at line 505 of file DWARFEmitter.cpp.
References llvm::encodeULEB128(), OS, and llvm::raw_ostream::write().
Referenced by llvm::DWARFYAML::emitDebugLine(), and writeExtendedOpcode().
|
static |
Definition at line 226 of file DWARFEmitter.cpp.
References llvm::DWARFYAML::PubSection::Entries, llvm::DWARFYAML::PubSection::Format, llvm::DWARFYAML::PubSection::Length, OS, 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 586 of file DWARFEmitter.cpp.
References llvm::Version.
Referenced by llvm::DWARFYAML::emitDebugLine().
|
static |
Definition at line 264 of file DWARFEmitter.cpp.
References llvm::dwarf::FormParams::AddrSize, llvm::DWARFYAML::Abbrev::Attributes, 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, OS, llvm::ArrayRef< T >::size(), llvm::Expected< T >::takeError(), llvm::raw_ostream::tell(), llvm::toString(), llvm::raw_ostream::write(), writeInteger(), and writeVariableSizedInteger().
Referenced by llvm::DWARFYAML::emitDebugInfo().
|
static |
Definition at line 937 of file DWARFEmitter.cpp.
References checkOperandCount(), llvm::createStringError(), llvm::StringRef::empty(), llvm::encodeSLEB128(), llvm::not_supported, Operation, llvm::dwarf::OperationEncodingString(), OS, llvm::raw_ostream::tell(), and writeInteger().
Referenced by writeListEntry().
|
static |
Definition at line 1128 of file DWARFEmitter.cpp.
References llvm::dwarf::DWARF64, llvm::Length, llvm::List, llvm::Offset, OS, llvm::Error::success(), llvm::Expected< T >::takeError(), llvm::raw_ostream::tell(), UINT64_MAX, llvm::raw_ostream::write(), writeDWARFOffset(), writeInitialLength(), writeInteger(), and writeListEntry().
|
static |
Definition at line 81 of file DWARFEmitter.cpp.
References llvm::cantFail(), llvm::dwarf::DWARF64, llvm::Offset, OS, and writeVariableSizedInteger().
Referenced by llvm::DWARFYAML::emitDebugAranges(), llvm::DWARFYAML::emitDebugInfo(), llvm::DWARFYAML::emitDebugLine(), llvm::DWARFYAML::emitDebugStrOffsets(), and writeDWARFLists().
|
static |
Definition at line 513 of file DWARFEmitter.cpp.
References llvm::cantFail(), emitFileEntry(), llvm::encodeULEB128(), OS, 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, OS, 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, OS, llvm::sys::swapByteOrder(), 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(), and writeVariableSizedInteger().
|
static |
Definition at line 546 of file DWARFEmitter.cpp.
References llvm::encodeSLEB128(), llvm::encodeULEB128(), OS, writeExtendedOpcode(), and writeInteger().
Referenced by llvm::DWARFYAML::emitDebugLine().
|
static |
Definition at line 1030 of file DWARFEmitter.cpp.
References Addr, llvm::cantFail(), checkOperandCount(), llvm::encodeULEB128(), llvm::dwarf::LocListEncodingString(), OS, llvm::Error::success(), llvm::raw_ostream::tell(), llvm::raw_ostream::write(), writeDWARFExpression(), writeInteger(), and writeListEntryAddress().
|
static |
Definition at line 969 of file DWARFEmitter.cpp.
References Addr, llvm::cantFail(), checkOperandCount(), llvm::encodeULEB128(), OS, llvm::dwarf::RangeListEncodingString(), llvm::raw_ostream::tell(), writeInteger(), and writeListEntryAddress().
Referenced by writeDWARFLists().
|
static |
Definition at line 924 of file DWARFEmitter.cpp.
References Addr, llvm::c_str(), llvm::createStringError(), llvm::invalid_argument, OS, llvm::StringRef::str(), llvm::Error::success(), llvm::toString(), and writeVariableSizedInteger().
Referenced by writeListEntry().
|
static |
Definition at line 48 of file DWARFEmitter.cpp.
References llvm::createStringError(), llvm::Integer, OS, 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 OS, Size, and llvm::raw_ostream::write().
Referenced by llvm::DWARFYAML::emitDebugAranges(), and llvm::DWARFYAML::emitDebugRanges().