LLVM: llvm::dwarf_linker::classic::DwarfStreamer Class Reference (original) (raw)

User of DwarfStreamer should call initialization code for AsmPrinter: More...

#include "[llvm/DWARFLinker/Classic/DWARFStreamer.h](DWARFStreamer%5F8h%5Fsource.html)"

Public Member Functions
DwarfStreamer (DWARFLinkerBase::OutputFileType OutFileType, raw_pwrite_stream &OutFile, DWARFLinkerBase::MessageHandlerTy Warning)
~DwarfStreamer () override=default
Error init (Triple TheTriple, StringRef Swift5ReflectionSegmentName)
void finish () override
Dump the file to the disk.
AsmPrinter & getAsmPrinter () const
void switchToDebugInfoSection (unsigned DwarfVersion)
Set the current output section to debug_info and change the MC Dwarf version to DwarfVersion.
void emitCompileUnitHeader (CompileUnit &Unit, unsigned DwarfVersion) override
Emit the compilation unit header for Unit in the debug_info section.
void emitDIE (DIE &Die) override
Recursively emit the DIE tree rooted at Die.
void emitAbbrevs (const std::vector< std::unique_ptr< DIEAbbrev > > &Abbrevs, unsigned DwarfVersion) override
Emit the abbreviation table Abbrevs to the debug_abbrev section.
void emitSectionContents (StringRef SecData, DebugSectionKind SecKind) override
Emit contents of section SecName From Obj.
void emitStrings (const NonRelocatableStringpool &Pool) override
Emit the string table described by Pool into .debug_str table.
void emitStringOffsets (const SmallVector< uint64_t > &StringOffset, uint16_t TargetDWARFVersion) override
Emit the debug string offset table described by StringOffsets into the .debug_str_offsets table.
void emitLineStrings (const NonRelocatableStringpool &Pool) override
Emit the string table described by Pool into .debug_line_str table.
void emitSwiftAST (StringRef Buffer)
Emit the swift_ast section stored in Buffer.
void emitSwiftReflectionSection (llvm::binaryformat::Swift5ReflectionSectionKind ReflSectionKind, StringRef Buffer, uint32_t Alignment, uint32_t Size)
Emit the swift reflection section stored in Buffer.
MCSymbol * emitDwarfDebugRangeListHeader (const CompileUnit &Unit) override
Emit debug ranges(.debug_ranges, .debug_rnglists) header.
void emitDwarfDebugRangeListFragment (const CompileUnit &Unit, const AddressRanges &LinkedRanges, PatchLocation Patch, DebugDieValuePool &AddrPool) override
Emit debug ranges(.debug_ranges, .debug_rnglists) fragment.
void emitDwarfDebugRangeListFooter (const CompileUnit &Unit, MCSymbol *EndLabel) override
Emit debug ranges(.debug_ranges, .debug_rnglists) footer.
MCSymbol * emitDwarfDebugLocListHeader (const CompileUnit &Unit) override
Emit debug locations(.debug_loc, .debug_loclists) header.
MCSymbol * emitDwarfDebugAddrsHeader (const CompileUnit &Unit) override
Emit .debug_addr header.
void emitDwarfDebugAddrs (const SmallVector< uint64_t > &Addrs, uint8_t AddrSize) override
Emit the addresses described by Addrs into .debug_addr table.
void emitDwarfDebugAddrsFooter (const CompileUnit &Unit, MCSymbol *EndLabel) override
Emit .debug_addr footer.
void emitDwarfDebugLocListFragment (const CompileUnit &Unit, const DWARFLocationExpressionsVector &LinkedLocationExpression, PatchLocation Patch, DebugDieValuePool &AddrPool) override
Emit debug ranges(.debug_loc, .debug_loclists) fragment.
void emitDwarfDebugLocListFooter (const CompileUnit &Unit, MCSymbol *EndLabel) override
Emit debug ranges(.debug_loc, .debug_loclists) footer.
void emitDwarfDebugArangesTable (const CompileUnit &Unit, const AddressRanges &LinkedRanges) override
Emit .debug_aranges entries for Unit.
uint64_t getRangesSectionSize () const override
Returns size of generated .debug_ranges section.
uint64_t getRngListsSectionSize () const override
Returns size of generated .debug_rnglists section.
void emitLineTableForUnit (const DWARFDebugLine::LineTable &LineTable, const CompileUnit &Unit, OffsetsStringPool &DebugStrPool, OffsetsStringPool &DebugLineStrPool, std::vector< uint64_t > *RowOffsets=nullptr) override
Emit .debug_line table entry for specified LineTable The optional parameter RowOffsets, if provided, will be populated with the offsets of each line table row in the output .debug_line section.
uint64_t getLineSectionSize () const override
Returns size of generated .debug_line section.
void emitPubNamesForUnit (const CompileUnit &Unit) override
Emit the .debug_pubnames contribution for Unit.
void emitPubTypesForUnit (const CompileUnit &Unit) override
Emit the .debug_pubtypes contribution for Unit.
void emitCIE (StringRef CIEBytes) override
Emit a CIE.
void emitFDE (uint32_t CIEOffset, uint32_t AddreSize, uint64_t Address, StringRef Bytes) override
Emit an FDE with data Bytes.
void emitDebugNames (DWARF5AccelTable &Table) override
Emit DWARF debug names.
void emitAppleNamespaces (AccelTable< AppleAccelTableStaticOffsetData > &Table) override
Emit Apple namespaces accelerator table.
void emitAppleNames (AccelTable< AppleAccelTableStaticOffsetData > &Table) override
Emit Apple names accelerator table.
void emitAppleObjc (AccelTable< AppleAccelTableStaticOffsetData > &Table) override
Emit Apple Objective-C accelerator table.
void emitAppleTypes (AccelTable< AppleAccelTableStaticTypeData > &Table) override
Emit Apple type accelerator table.
uint64_t getFrameSectionSize () const override
Returns size of generated .debug_frame section.
uint64_t getDebugInfoSectionSize () const override
Returns size of generated .debug_info section.
uint64_t getDebugMacInfoSectionSize () const override
Returns size of generated .debug_macinfo section.
uint64_t getDebugMacroSectionSize () const override
Returns size of generated .debug_macro section.
uint64_t getLocListsSectionSize () const override
Returns size of generated .debug_loclists section.
uint64_t getDebugAddrSectionSize () const override
Returns size of generated .debug_addr section.
void emitMacroTables (DWARFContext *Context, const Offset2UnitMap &UnitMacroMap, OffsetsStringPool &StringPool) override
Emit all available macro tables(DWARFv4 and DWARFv5).
Public Member Functions inherited from llvm::dwarf_linker::classic::DwarfEmitter
virtual ~DwarfEmitter ()=default

User of DwarfStreamer should call initialization code for AsmPrinter:

InitializeAllTargetInfos(); InitializeAllTargetMCs(); InitializeAllTargets(); InitializeAllAsmPrinters(); The Dwarf streaming logic.

All interactions with the MC layer that is used to build the debug information binary representation are handled in this class.

Definition at line 45 of file DWARFStreamer.h.

~DwarfStreamer()

llvm::dwarf_linker::classic::DwarfStreamer::~DwarfStreamer ( ) overridedefault

createStreamer()

emitAbbrevs()

void DwarfStreamer::emitAbbrevs ( const std::vector< std::unique_ptr< DIEAbbrev > > & Abbrevs, unsigned DwarfVersion ) overridevirtual

emitAppleNames()

emitAppleNamespaces()

emitAppleObjc()

emitAppleTypes()

emitCIE()

void DwarfStreamer::emitCIE ( StringRef CIEBytes) overridevirtual

emitCompileUnitHeader()

emitDebugNames()

emitDIE()

void DwarfStreamer::emitDIE ( DIE & Die) overridevirtual

emitDwarfDebugAddrs()

emitDwarfDebugAddrsFooter()

emitDwarfDebugAddrsHeader()

emitDwarfDebugArangesTable()

emitDwarfDebugLocListFooter()

emitDwarfDebugLocListFragment()

emitDwarfDebugLocListHeader()

emitDwarfDebugRangeListFooter()

emitDwarfDebugRangeListFragment()

emitDwarfDebugRangeListHeader()

emitFDE()

emitLineStrings()

emitLineTableForUnit()

emitMacroTables()

emitPubNamesForUnit()

void DwarfStreamer::emitPubNamesForUnit ( const CompileUnit & Unit) overridevirtual

emitPubTypesForUnit()

void DwarfStreamer::emitPubTypesForUnit ( const CompileUnit & Unit) overridevirtual

emitSectionContents()

emitStringOffsets()

emitStrings()

emitSwiftAST()

void DwarfStreamer::emitSwiftAST ( StringRef Buffer )

emitSwiftReflectionSection()

finish()

void DwarfStreamer::finish ( ) overridevirtual

getAsmPrinter()

AsmPrinter & llvm::dwarf_linker::classic::DwarfStreamer::getAsmPrinter ( ) const inline

getDebugAddrSectionSize()

uint64_t llvm::dwarf_linker::classic::DwarfStreamer::getDebugAddrSectionSize ( ) const inlineoverridevirtual

getDebugInfoSectionSize()

uint64_t llvm::dwarf_linker::classic::DwarfStreamer::getDebugInfoSectionSize ( ) const inlineoverridevirtual

getDebugMacInfoSectionSize()

uint64_t llvm::dwarf_linker::classic::DwarfStreamer::getDebugMacInfoSectionSize ( ) const inlineoverridevirtual

getDebugMacroSectionSize()

uint64_t llvm::dwarf_linker::classic::DwarfStreamer::getDebugMacroSectionSize ( ) const inlineoverridevirtual

getFrameSectionSize()

uint64_t llvm::dwarf_linker::classic::DwarfStreamer::getFrameSectionSize ( ) const inlineoverridevirtual

getLineSectionSize()

uint64_t llvm::dwarf_linker::classic::DwarfStreamer::getLineSectionSize ( ) const inlineoverridevirtual

getLocListsSectionSize()

uint64_t llvm::dwarf_linker::classic::DwarfStreamer::getLocListsSectionSize ( ) const inlineoverridevirtual

getRangesSectionSize()

uint64_t llvm::dwarf_linker::classic::DwarfStreamer::getRangesSectionSize ( ) const inlineoverridevirtual

getRngListsSectionSize()

uint64_t llvm::dwarf_linker::classic::DwarfStreamer::getRngListsSectionSize ( ) const inlineoverridevirtual

init()

Definition at line 44 of file DWARFStreamer.cpp.

References llvm::MCTargetOptions::AsmVerbose, llvm::dwarf_linker::DWARFLinkerBase::Assembly, llvm::Target::createAsmPrinter(), llvm::Target::createAsmStreamer(), llvm::Target::createMCAsmBackend(), llvm::Target::createMCAsmInfo(), llvm::Target::createMCCodeEmitter(), llvm::Target::createMCInstPrinter(), llvm::Target::createMCInstrInfo(), llvm::Target::createMCObjectFileInfo(), llvm::Target::createMCObjectStreamer(), llvm::Target::createMCRegInfo(), llvm::Target::createMCSubtargetInfo(), llvm::createStringError(), llvm::Target::createTargetMachine(), llvm::MCTargetOptions::EnableDwarfDirectory, llvm::Triple::getTriple(), llvm::mc::InitMCTargetOptionsFromFlags(), llvm::TargetRegistry::lookupTarget(), llvm::MCTargetOptions::MCUseDwarfDirectory, llvm::dwarf_linker::DWARFLinkerBase::Object, and llvm::Error::success().

Referenced by ~DwarfStreamer().

switchToDebugInfoSection()

void DwarfStreamer::switchToDebugInfoSection ( unsigned DwarfVersion )

The documentation for this class was generated from the following files: