LLVM 20.0.0git
Public Member Functions | List of all members
llvm::dwarf_linker::classic::DwarfEmitter Class Referenceabstract

DwarfEmitter presents interface to generate all debug info tables. More...

#include "llvm/DWARFLinker/Classic/DWARFLinker.h"

Inheritance diagram for llvm::dwarf_linker::classic::DwarfEmitter:
Inheritance graph
[legend]

Public Member Functions

virtual ~DwarfEmitter ()=default
 
virtual void emitSectionContents (StringRef SecData, DebugSectionKind SecKind)=0
 Emit section named SecName with data SecData.
 
virtual void emitAbbrevs (const std::vector< std::unique_ptr< DIEAbbrev > > &Abbrevs, unsigned DwarfVersion)=0
 Emit the abbreviation table Abbrevs to the .debug_abbrev section.
 
virtual void emitStrings (const NonRelocatableStringpool &Pool)=0
 Emit the string table described by Pool into .debug_str table.
 
virtual void emitStringOffsets (const SmallVector< uint64_t > &StringOffsets, uint16_t TargetDWARFVersion)=0
 Emit the debug string offset table described by StringOffsets into the .debug_str_offsets table.
 
virtual void emitLineStrings (const NonRelocatableStringpool &Pool)=0
 Emit the string table described by Pool into .debug_line_str table.
 
virtual void emitDebugNames (DWARF5AccelTable &Table)=0
 Emit DWARF debug names.
 
virtual void emitAppleNamespaces (AccelTable< AppleAccelTableStaticOffsetData > &Table)=0
 Emit Apple namespaces accelerator table.
 
virtual void emitAppleNames (AccelTable< AppleAccelTableStaticOffsetData > &Table)=0
 Emit Apple names accelerator table.
 
virtual void emitAppleObjc (AccelTable< AppleAccelTableStaticOffsetData > &Table)=0
 Emit Apple Objective-C accelerator table.
 
virtual void emitAppleTypes (AccelTable< AppleAccelTableStaticTypeData > &Table)=0
 Emit Apple type accelerator table.
 
virtual MCSymbolemitDwarfDebugRangeListHeader (const CompileUnit &Unit)=0
 Emit debug ranges (.debug_ranges, .debug_rnglists) header.
 
virtual void emitDwarfDebugRangeListFragment (const CompileUnit &Unit, const AddressRanges &LinkedRanges, PatchLocation Patch, DebugDieValuePool &AddrPool)=0
 Emit debug ranges (.debug_ranges, .debug_rnglists) fragment.
 
virtual void emitDwarfDebugRangeListFooter (const CompileUnit &Unit, MCSymbol *EndLabel)=0
 Emit debug ranges (.debug_ranges, .debug_rnglists) footer.
 
virtual MCSymbolemitDwarfDebugLocListHeader (const CompileUnit &Unit)=0
 Emit debug locations (.debug_loc, .debug_loclists) header.
 
virtual void emitDwarfDebugLocListFragment (const CompileUnit &Unit, const DWARFLocationExpressionsVector &LinkedLocationExpression, PatchLocation Patch, DebugDieValuePool &AddrPool)=0
 Emit debug locations (.debug_loc, .debug_loclists) fragment.
 
virtual void emitDwarfDebugLocListFooter (const CompileUnit &Unit, MCSymbol *EndLabel)=0
 Emit debug locations (.debug_loc, .debug_loclists) footer.
 
virtual MCSymbolemitDwarfDebugAddrsHeader (const CompileUnit &Unit)=0
 Emit .debug_addr header.
 
virtual void emitDwarfDebugAddrs (const SmallVector< uint64_t > &Addrs, uint8_t AddrSize)=0
 Emit the addresses described by Addrs into the .debug_addr section.
 
virtual void emitDwarfDebugAddrsFooter (const CompileUnit &Unit, MCSymbol *EndLabel)=0
 Emit .debug_addr footer.
 
virtual void emitDwarfDebugArangesTable (const CompileUnit &Unit, const AddressRanges &LinkedRanges)=0
 Emit .debug_aranges entries for Unit.
 
virtual void emitLineTableForUnit (const DWARFDebugLine::LineTable &LineTable, const CompileUnit &Unit, OffsetsStringPool &DebugStrPool, OffsetsStringPool &DebugLineStrPool)=0
 Emit specified LineTable into .debug_line table.
 
virtual void emitPubNamesForUnit (const CompileUnit &Unit)=0
 Emit the .debug_pubnames contribution for Unit.
 
virtual void emitPubTypesForUnit (const CompileUnit &Unit)=0
 Emit the .debug_pubtypes contribution for Unit.
 
virtual void emitCIE (StringRef CIEBytes)=0
 Emit a CIE.
 
virtual void emitFDE (uint32_t CIEOffset, uint32_t AddreSize, uint64_t Address, StringRef Bytes)=0
 Emit an FDE with data Bytes.
 
virtual void emitCompileUnitHeader (CompileUnit &Unit, unsigned DwarfVersion)=0
 Emit the compilation unit header for Unit in the .debug_info section.
 
virtual void emitDIE (DIE &Die)=0
 Recursively emit the DIE tree rooted at Die.
 
virtual void emitMacroTables (DWARFContext *Context, const Offset2UnitMap &UnitMacroMap, OffsetsStringPool &StringPool)=0
 Emit all available macro tables(DWARFv4 and DWARFv5).
 
virtual uint64_t getLineSectionSize () const =0
 Returns size of generated .debug_line section.
 
virtual uint64_t getFrameSectionSize () const =0
 Returns size of generated .debug_frame section.
 
virtual uint64_t getRangesSectionSize () const =0
 Returns size of generated .debug_ranges section.
 
virtual uint64_t getRngListsSectionSize () const =0
 Returns size of generated .debug_rnglists section.
 
virtual uint64_t getDebugInfoSectionSize () const =0
 Returns size of generated .debug_info section.
 
virtual uint64_t getDebugMacInfoSectionSize () const =0
 Returns size of generated .debug_macinfo section.
 
virtual uint64_t getDebugMacroSectionSize () const =0
 Returns size of generated .debug_macro section.
 
virtual uint64_t getLocListsSectionSize () const =0
 Returns size of generated .debug_loclists section.
 
virtual uint64_t getDebugAddrSectionSize () const =0
 Returns size of generated .debug_addr section.
 
virtual void finish ()=0
 Dump the file to the disk.
 

Detailed Description

DwarfEmitter presents interface to generate all debug info tables.

Definition at line 40 of file DWARFLinker.h.

Constructor & Destructor Documentation

◆ ~DwarfEmitter()

virtual llvm::dwarf_linker::classic::DwarfEmitter::~DwarfEmitter ( )
virtualdefault

Member Function Documentation

◆ emitAbbrevs()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitAbbrevs ( const std::vector< std::unique_ptr< DIEAbbrev > > &  Abbrevs,
unsigned  DwarfVersion 
)
pure virtual

Emit the abbreviation table Abbrevs to the .debug_abbrev section.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

Referenced by llvm::dwarf_linker::classic::DWARFLinker::link().

◆ emitAppleNames()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitAppleNames ( AccelTable< AppleAccelTableStaticOffsetData > &  Table)
pure virtual

Emit Apple names accelerator table.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

Referenced by llvm::dwarf_linker::classic::DWARFLinker::link().

◆ emitAppleNamespaces()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitAppleNamespaces ( AccelTable< AppleAccelTableStaticOffsetData > &  Table)
pure virtual

Emit Apple namespaces accelerator table.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

Referenced by llvm::dwarf_linker::classic::DWARFLinker::link().

◆ emitAppleObjc()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitAppleObjc ( AccelTable< AppleAccelTableStaticOffsetData > &  Table)
pure virtual

Emit Apple Objective-C accelerator table.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

Referenced by llvm::dwarf_linker::classic::DWARFLinker::link().

◆ emitAppleTypes()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitAppleTypes ( AccelTable< AppleAccelTableStaticTypeData > &  Table)
pure virtual

Emit Apple type accelerator table.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

Referenced by llvm::dwarf_linker::classic::DWARFLinker::link().

◆ emitCIE()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitCIE ( StringRef  CIEBytes)
pure virtual

Emit a CIE.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ emitCompileUnitHeader()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitCompileUnitHeader ( CompileUnit Unit,
unsigned  DwarfVersion 
)
pure virtual

Emit the compilation unit header for Unit in the .debug_info section.

As a side effect, this also switches the current Dwarf version of the MC layer to the one of U.getOrigUnit().

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ emitDebugNames()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitDebugNames ( DWARF5AccelTable Table)
pure virtual

◆ emitDIE()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitDIE ( DIE Die)
pure virtual

Recursively emit the DIE tree rooted at Die.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ emitDwarfDebugAddrs()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitDwarfDebugAddrs ( const SmallVector< uint64_t > &  Addrs,
uint8_t  AddrSize 
)
pure virtual

Emit the addresses described by Addrs into the .debug_addr section.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ emitDwarfDebugAddrsFooter()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitDwarfDebugAddrsFooter ( const CompileUnit Unit,
MCSymbol EndLabel 
)
pure virtual

Emit .debug_addr footer.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ emitDwarfDebugAddrsHeader()

virtual MCSymbol * llvm::dwarf_linker::classic::DwarfEmitter::emitDwarfDebugAddrsHeader ( const CompileUnit Unit)
pure virtual

Emit .debug_addr header.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ emitDwarfDebugArangesTable()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitDwarfDebugArangesTable ( const CompileUnit Unit,
const AddressRanges LinkedRanges 
)
pure virtual

Emit .debug_aranges entries for Unit.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ emitDwarfDebugLocListFooter()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitDwarfDebugLocListFooter ( const CompileUnit Unit,
MCSymbol EndLabel 
)
pure virtual

Emit debug locations (.debug_loc, .debug_loclists) footer.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ emitDwarfDebugLocListFragment()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitDwarfDebugLocListFragment ( const CompileUnit Unit,
const DWARFLocationExpressionsVector LinkedLocationExpression,
PatchLocation  Patch,
DebugDieValuePool AddrPool 
)
pure virtual

Emit debug locations (.debug_loc, .debug_loclists) fragment.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ emitDwarfDebugLocListHeader()

virtual MCSymbol * llvm::dwarf_linker::classic::DwarfEmitter::emitDwarfDebugLocListHeader ( const CompileUnit Unit)
pure virtual

Emit debug locations (.debug_loc, .debug_loclists) header.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ emitDwarfDebugRangeListFooter()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitDwarfDebugRangeListFooter ( const CompileUnit Unit,
MCSymbol EndLabel 
)
pure virtual

Emit debug ranges (.debug_ranges, .debug_rnglists) footer.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ emitDwarfDebugRangeListFragment()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitDwarfDebugRangeListFragment ( const CompileUnit Unit,
const AddressRanges LinkedRanges,
PatchLocation  Patch,
DebugDieValuePool AddrPool 
)
pure virtual

Emit debug ranges (.debug_ranges, .debug_rnglists) fragment.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ emitDwarfDebugRangeListHeader()

virtual MCSymbol * llvm::dwarf_linker::classic::DwarfEmitter::emitDwarfDebugRangeListHeader ( const CompileUnit Unit)
pure virtual

Emit debug ranges (.debug_ranges, .debug_rnglists) header.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ emitFDE()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitFDE ( uint32_t  CIEOffset,
uint32_t  AddreSize,
uint64_t  Address,
StringRef  Bytes 
)
pure virtual

Emit an FDE with data Bytes.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ emitLineStrings()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitLineStrings ( const NonRelocatableStringpool Pool)
pure virtual

Emit the string table described by Pool into .debug_line_str table.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

Referenced by llvm::dwarf_linker::classic::DWARFLinker::link().

◆ emitLineTableForUnit()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitLineTableForUnit ( const DWARFDebugLine::LineTable LineTable,
const CompileUnit Unit,
OffsetsStringPool DebugStrPool,
OffsetsStringPool DebugLineStrPool 
)
pure virtual

Emit specified LineTable into .debug_line table.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ emitMacroTables()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitMacroTables ( DWARFContext Context,
const Offset2UnitMap UnitMacroMap,
OffsetsStringPool StringPool 
)
pure virtual

Emit all available macro tables(DWARFv4 and DWARFv5).

Use UnitMacroMap to get compilation unit by macro table offset. Side effects: Fill StringPool with macro strings, update DW_AT_macro_info, DW_AT_macros attributes for corresponding compile units.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ emitPubNamesForUnit()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitPubNamesForUnit ( const CompileUnit Unit)
pure virtual

Emit the .debug_pubnames contribution for Unit.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ emitPubTypesForUnit()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitPubTypesForUnit ( const CompileUnit Unit)
pure virtual

Emit the .debug_pubtypes contribution for Unit.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ emitSectionContents()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitSectionContents ( StringRef  SecData,
DebugSectionKind  SecKind 
)
pure virtual

Emit section named SecName with data SecData.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ emitStringOffsets()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitStringOffsets ( const SmallVector< uint64_t > &  StringOffsets,
uint16_t  TargetDWARFVersion 
)
pure virtual

Emit the debug string offset table described by StringOffsets into the .debug_str_offsets table.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

Referenced by llvm::dwarf_linker::classic::DWARFLinker::link().

◆ emitStrings()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::emitStrings ( const NonRelocatableStringpool Pool)
pure virtual

Emit the string table described by Pool into .debug_str table.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

Referenced by llvm::dwarf_linker::classic::DWARFLinker::link().

◆ finish()

virtual void llvm::dwarf_linker::classic::DwarfEmitter::finish ( )
pure virtual

Dump the file to the disk.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ getDebugAddrSectionSize()

virtual uint64_t llvm::dwarf_linker::classic::DwarfEmitter::getDebugAddrSectionSize ( ) const
pure virtual

Returns size of generated .debug_addr section.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ getDebugInfoSectionSize()

virtual uint64_t llvm::dwarf_linker::classic::DwarfEmitter::getDebugInfoSectionSize ( ) const
pure virtual

Returns size of generated .debug_info section.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

Referenced by llvm::dwarf_linker::classic::DWARFLinker::link().

◆ getDebugMacInfoSectionSize()

virtual uint64_t llvm::dwarf_linker::classic::DwarfEmitter::getDebugMacInfoSectionSize ( ) const
pure virtual

Returns size of generated .debug_macinfo section.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ getDebugMacroSectionSize()

virtual uint64_t llvm::dwarf_linker::classic::DwarfEmitter::getDebugMacroSectionSize ( ) const
pure virtual

Returns size of generated .debug_macro section.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ getFrameSectionSize()

virtual uint64_t llvm::dwarf_linker::classic::DwarfEmitter::getFrameSectionSize ( ) const
pure virtual

Returns size of generated .debug_frame section.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ getLineSectionSize()

virtual uint64_t llvm::dwarf_linker::classic::DwarfEmitter::getLineSectionSize ( ) const
pure virtual

Returns size of generated .debug_line section.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ getLocListsSectionSize()

virtual uint64_t llvm::dwarf_linker::classic::DwarfEmitter::getLocListsSectionSize ( ) const
pure virtual

Returns size of generated .debug_loclists section.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ getRangesSectionSize()

virtual uint64_t llvm::dwarf_linker::classic::DwarfEmitter::getRangesSectionSize ( ) const
pure virtual

Returns size of generated .debug_ranges section.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.

◆ getRngListsSectionSize()

virtual uint64_t llvm::dwarf_linker::classic::DwarfEmitter::getRngListsSectionSize ( ) const
pure virtual

Returns size of generated .debug_rnglists section.

Implemented in llvm::dwarf_linker::classic::DwarfStreamer.


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