LLVM 17.0.0git
Public Member Functions | List of all members
llvm::DwarfEmitter Class Referenceabstract

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

#include "llvm/DWARFLinker/DWARFLinker.h"

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

Public Member Functions

virtual ~DwarfEmitter ()
 
virtual void emitPaperTrailWarningsDie (DIE &Die)=0
 Emit DIE containing warnings.
 
virtual void emitSectionContents (StringRef SecData, StringRef SecName)=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.
 
virtual void emitDebugNames (AccelTable< DWARF5AccelTableStaticData > &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)=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)=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 void emitDwarfDebugArangesTable (const CompileUnit &Unit, const AddressRanges &LinkedRanges)=0
 Emit .debug_aranges entries for Unit.
 
virtual void translateLineTable (DataExtractor LineData, uint64_t Offset)=0
 Copy the .debug_line over to the updated binary while unobfuscating the file names and directories.
 
virtual void emitLineTableForUnit (MCDwarfLineTableParams Params, StringRef PrologueBytes, unsigned MinInstLength, std::vector< DWARFDebugLine::Row > &Rows, unsigned AdddressSize)=0
 Emit the line table described in Rows into the .debug_line section.
 
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.
 

Detailed Description

DwarfEmitter presents interface to generate all debug info tables.

Definition at line 82 of file DWARFLinker.h.

Constructor & Destructor Documentation

◆ ~DwarfEmitter()

llvm::DwarfEmitter::~DwarfEmitter ( )
virtualdefault

Member Function Documentation

◆ emitAbbrevs()

virtual void llvm::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::DwarfStreamer.

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

◆ emitAppleNames()

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

Emit Apple names accelerator table.

Implemented in llvm::DwarfStreamer.

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

◆ emitAppleNamespaces()

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

Emit Apple namespaces accelerator table.

Implemented in llvm::DwarfStreamer.

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

◆ emitAppleObjc()

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

Emit Apple Objective-C accelerator table.

Implemented in llvm::DwarfStreamer.

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

◆ emitAppleTypes()

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

Emit Apple type accelerator table.

Implemented in llvm::DwarfStreamer.

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

◆ emitCIE()

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

Emit a CIE.

Implemented in llvm::DwarfStreamer.

◆ emitCompileUnitHeader()

virtual void llvm::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::DwarfStreamer.

◆ emitDebugNames()

virtual void llvm::DwarfEmitter::emitDebugNames ( AccelTable< DWARF5AccelTableStaticData > &  Table)
pure virtual

Emit DWARF debug names.

Implemented in llvm::DwarfStreamer.

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

◆ emitDIE()

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

Recursively emit the DIE tree rooted at Die.

Implemented in llvm::DwarfStreamer.

◆ emitDwarfDebugArangesTable()

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

Emit .debug_aranges entries for Unit.

Implemented in llvm::DwarfStreamer.

◆ emitDwarfDebugLocListFooter()

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

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

Implemented in llvm::DwarfStreamer.

◆ emitDwarfDebugLocListFragment()

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

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

Implemented in llvm::DwarfStreamer.

◆ emitDwarfDebugLocListHeader()

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

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

Implemented in llvm::DwarfStreamer.

◆ emitDwarfDebugRangeListFooter()

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

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

Implemented in llvm::DwarfStreamer.

◆ emitDwarfDebugRangeListFragment()

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

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

Implemented in llvm::DwarfStreamer.

◆ emitDwarfDebugRangeListHeader()

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

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

Implemented in llvm::DwarfStreamer.

◆ emitFDE()

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

Emit an FDE with data Bytes.

Implemented in llvm::DwarfStreamer.

◆ emitLineTableForUnit()

virtual void llvm::DwarfEmitter::emitLineTableForUnit ( MCDwarfLineTableParams  Params,
StringRef  PrologueBytes,
unsigned  MinInstLength,
std::vector< DWARFDebugLine::Row > &  Rows,
unsigned  AdddressSize 
)
pure virtual

Emit the line table described in Rows into the .debug_line section.

Implemented in llvm::DwarfStreamer.

◆ emitMacroTables()

virtual void llvm::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::DwarfStreamer.

◆ emitPaperTrailWarningsDie()

virtual void llvm::DwarfEmitter::emitPaperTrailWarningsDie ( DIE Die)
pure virtual

Emit DIE containing warnings.

Implemented in llvm::DwarfStreamer.

◆ emitPubNamesForUnit()

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

Emit the .debug_pubnames contribution for Unit.

Implemented in llvm::DwarfStreamer.

◆ emitPubTypesForUnit()

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

Emit the .debug_pubtypes contribution for Unit.

Implemented in llvm::DwarfStreamer.

◆ emitSectionContents()

virtual void llvm::DwarfEmitter::emitSectionContents ( StringRef  SecData,
StringRef  SecName 
)
pure virtual

Emit section named SecName with data SecData.

Implemented in llvm::DwarfStreamer.

◆ emitStrings()

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

Emit the string table described by Pool.

Implemented in llvm::DwarfStreamer.

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

◆ getDebugInfoSectionSize()

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

Returns size of generated .debug_info section.

Implemented in llvm::DwarfStreamer.

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

◆ getDebugMacInfoSectionSize()

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

Returns size of generated .debug_macinfo section.

Implemented in llvm::DwarfStreamer.

◆ getDebugMacroSectionSize()

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

Returns size of generated .debug_macro section.

Implemented in llvm::DwarfStreamer.

◆ getFrameSectionSize()

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

Returns size of generated .debug_frame section.

Implemented in llvm::DwarfStreamer.

◆ getLineSectionSize()

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

Returns size of generated .debug_line section.

Implemented in llvm::DwarfStreamer.

◆ getLocListsSectionSize()

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

Returns size of generated .debug_loclists section.

Implemented in llvm::DwarfStreamer.

◆ getRangesSectionSize()

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

Returns size of generated .debug_ranges section.

Implemented in llvm::DwarfStreamer.

◆ getRngListsSectionSize()

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

Returns size of generated .debug_rnglists section.

Implemented in llvm::DwarfStreamer.

◆ translateLineTable()

virtual void llvm::DwarfEmitter::translateLineTable ( DataExtractor  LineData,
uint64_t  Offset 
)
pure virtual

Copy the .debug_line over to the updated binary while unobfuscating the file names and directories.

Implemented in llvm::DwarfStreamer.


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