LLVM  14.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. More...
 
virtual void emitSectionContents (StringRef SecData, StringRef SecName)=0
 Emit section named SecName with data SecData. More...
 
virtual void emitAbbrevs (const std::vector< std::unique_ptr< DIEAbbrev >> &Abbrevs, unsigned DwarfVersion)=0
 Emit the abbreviation table Abbrevs to the .debug_abbrev section. More...
 
virtual void emitStrings (const NonRelocatableStringpool &Pool)=0
 Emit the string table described by Pool. More...
 
virtual void emitDebugNames (AccelTable< DWARF5AccelTableStaticData > &Table)=0
 Emit DWARF debug names. More...
 
virtual void emitAppleNamespaces (AccelTable< AppleAccelTableStaticOffsetData > &Table)=0
 Emit Apple namespaces accelerator table. More...
 
virtual void emitAppleNames (AccelTable< AppleAccelTableStaticOffsetData > &Table)=0
 Emit Apple names accelerator table. More...
 
virtual void emitAppleObjc (AccelTable< AppleAccelTableStaticOffsetData > &Table)=0
 Emit Apple Objective-C accelerator table. More...
 
virtual void emitAppleTypes (AccelTable< AppleAccelTableStaticTypeData > &Table)=0
 Emit Apple type accelerator table. More...
 
virtual void emitRangesEntries (int64_t UnitPcOffset, uint64_t OrigLowPc, const FunctionIntervals::const_iterator &FuncRange, const std::vector< DWARFDebugRangeList::RangeListEntry > &Entries, unsigned AddressSize)=0
 Emit .debug_ranges for FuncRange by translating the original Entries. More...
 
virtual void emitUnitRangesEntries (CompileUnit &Unit, bool DoRangesSection)=0
 Emit .debug_aranges entries for Unit and if DoRangesSection is true, also emit the .debug_ranges entries for the DW_TAG_compile_unit's DW_AT_ranges attribute. More...
 
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. More...
 
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. More...
 
virtual void emitPubNamesForUnit (const CompileUnit &Unit)=0
 Emit the .debug_pubnames contribution for Unit. More...
 
virtual void emitPubTypesForUnit (const CompileUnit &Unit)=0
 Emit the .debug_pubtypes contribution for Unit. More...
 
virtual void emitCIE (StringRef CIEBytes)=0
 Emit a CIE. More...
 
virtual void emitFDE (uint32_t CIEOffset, uint32_t AddreSize, uint32_t Address, StringRef Bytes)=0
 Emit an FDE with data Bytes. More...
 
virtual void emitLocationsForUnit (const CompileUnit &Unit, DWARFContext &Dwarf, std::function< void(StringRef, SmallVectorImpl< uint8_t > &)> ProcessExpr)=0
 Emit the .debug_loc contribution for Unit by copying the entries from Dwarf and offsetting them. More...
 
virtual void emitCompileUnitHeader (CompileUnit &Unit, unsigned DwarfVersion)=0
 Emit the compilation unit header for Unit in the .debug_info section. More...
 
virtual void emitDIE (DIE &Die)=0
 Recursively emit the DIE tree rooted at Die. More...
 
virtual uint64_t getLineSectionSize () const =0
 Returns size of generated .debug_line section. More...
 
virtual uint64_t getFrameSectionSize () const =0
 Returns size of generated .debug_frame section. More...
 
virtual uint64_t getRangesSectionSize () const =0
 Returns size of generated .debug_ranges section. More...
 
virtual uint64_t getDebugInfoSectionSize () const =0
 Returns size of generated .debug_info section. More...
 

Detailed Description

DwarfEmitter presents interface to generate all debug info tables.

Definition at line 102 of file DWARFLinker.h.

Constructor & Destructor Documentation

◆ ~DwarfEmitter()

llvm::DwarfEmitter::~DwarfEmitter ( )
virtual

Definition at line 136 of file DWARFLinker.cpp.

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.

◆ emitFDE()

virtual void llvm::DwarfEmitter::emitFDE ( uint32_t  CIEOffset,
uint32_t  AddreSize,
uint32_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.

◆ emitLocationsForUnit()

virtual void llvm::DwarfEmitter::emitLocationsForUnit ( const CompileUnit Unit,
DWARFContext Dwarf,
std::function< void(StringRef, SmallVectorImpl< uint8_t > &)>  ProcessExpr 
)
pure virtual

Emit the .debug_loc contribution for Unit by copying the entries from Dwarf and offsetting them.

Update the location attributes to point to the new entries.

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.

◆ emitRangesEntries()

virtual void llvm::DwarfEmitter::emitRangesEntries ( int64_t  UnitPcOffset,
uint64_t  OrigLowPc,
const FunctionIntervals::const_iterator FuncRange,
const std::vector< DWARFDebugRangeList::RangeListEntry > &  Entries,
unsigned  AddressSize 
)
pure virtual

Emit .debug_ranges for FuncRange by translating the original Entries.

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().

◆ emitUnitRangesEntries()

virtual void llvm::DwarfEmitter::emitUnitRangesEntries ( CompileUnit Unit,
bool  DoRangesSection 
)
pure virtual

Emit .debug_aranges entries for Unit and if DoRangesSection is true, also emit the .debug_ranges entries for the DW_TAG_compile_unit's DW_AT_ranges attribute.

Implemented in llvm::DwarfStreamer.

◆ 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().

◆ 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.

◆ getRangesSectionSize()

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

Returns size of generated .debug_ranges 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: