LLVM API Documentation

Public Member Functions
llvm::DwarfDebug Class Reference

Collects and handles dwarf debug information. More...

#include <DwarfDebug.h>

Inheritance diagram for llvm::DwarfDebug:
Inheritance graph
[legend]
Collaboration diagram for llvm::DwarfDebug:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DwarfDebug (AsmPrinter *A, Module *M)
 ~DwarfDebug () override
void insertDIE (const MDNode *TypeMD, DIE *Die)
DIEgetDIE (const MDNode *TypeMD)
void beginModule ()
 Emit all Dwarf sections that should come prior to the content.
void endModule () override
 Emit all Dwarf sections that should come after the content.
void beginFunction (const MachineFunction *MF) override
 Gather pre-function debug information.
void endFunction (const MachineFunction *MF) override
 Gather and emit post-function debug information.
void beginInstruction (const MachineInstr *MI) override
 Process beginning of an instruction.
void endInstruction () override
 Process end of an instruction.
void addDwarfTypeUnitType (DwarfCompileUnit &CU, StringRef Identifier, DIE &Die, DICompositeType CTy)
 Add a DIE to the set of types that we're going to pull into type units.
void addArangeLabel (SymbolCU SCU)
 Add a label so that arange data can be generated for it.
void setSymbolSize (const MCSymbol *Sym, uint64_t Size) override
 For symbols that have a size designated (e.g. common symbols), this tracks that size.
void emitDIE (DIE &Die)
 Recursively Emits a debug information entry.
bool useDwarfAccelTables () const
 Returns whether or not to emit tables that dwarf consumers can use to accelerate lookup.
bool useSplitDwarf () const
 Returns whether or not to change the current debug info for the split dwarf proposal support.
unsigned getDwarfVersion () const
 Returns the Dwarf Version.
MCSymbolgetDebugLocSym () const
 Returns the section symbol for the .debug_loc section.
MCSymbolgetDebugStrSym () const
 Returns the section symbol for the .debug_str section.
const DwarfCompileUnitgetPrevCU () const
 Returns the previous CU that was being updated.
void setPrevCU (const DwarfCompileUnit *PrevCU)
const SmallVectorImpl
< DebugLocList > & 
getDebugLocEntries () const
 Returns the entries for the .debug_loc section.
void emitDebugLocEntry (ByteStreamer &Streamer, const DebugLocEntry &Entry)
 Emit an entry for the debug loc section. This can be used to handle an entry that's going to be emitted into the debug loc section.
void emitDebugLocValue (ByteStreamer &Streamer, const DebugLocEntry::Value &Value)
 emit a single value for the debug loc section.
void emitLocPieces (ByteStreamer &Streamer, const DITypeIdentifierMap &Map, ArrayRef< DebugLocEntry::Value > Values)
 Emits an optimal (=sorted) sequence of DW_OP_pieces.
void emitDebugLocEntryLocation (const DebugLocEntry &Entry)
 Emit the location for a debug loc entry, including the size header.
template<typename T >
T resolve (DIRef< T > Ref) const
 Find the MDNode for the given reference.
const DITypeIdentifierMapgetTypeIdentifierMap () const
 Return the TypeIdentifierMap.
DwarfCompileUnitlookupUnit (const DIE *CU) const
 Find the DwarfCompileUnit for the given CU Die.
bool isSubprogramContext (const MDNode *Context)
void addSubprogramNames (DISubprogram SP, DIE &Die)
AddressPoolgetAddressPool ()
void addAccelName (StringRef Name, const DIE &Die)
void addAccelObjC (StringRef Name, const DIE &Die)
void addAccelNamespace (StringRef Name, const DIE &Die)
void addAccelType (StringRef Name, const DIE &Die, char Flags)

Detailed Description

Collects and handles dwarf debug information.

Definition at line 152 of file DwarfDebug.h.


Constructor & Destructor Documentation

DwarfDebug::~DwarfDebug ( ) [override]

Definition at line 223 of file DwarfDebug.cpp.


Member Function Documentation

void DwarfDebug::addAccelName ( StringRef  Name,
const DIE Die 
)
void DwarfDebug::addAccelNamespace ( StringRef  Name,
const DIE Die 
)
void DwarfDebug::addAccelObjC ( StringRef  Name,
const DIE Die 
)
void DwarfDebug::addAccelType ( StringRef  Name,
const DIE Die,
char  Flags 
)

Add a label so that arange data can be generated for it.

Definition at line 607 of file DwarfDebug.h.

Referenced by llvm::DwarfCompileUnit::addLabelAddress(), llvm::DwarfCompileUnit::addLocalLabelAddress(), and llvm::DwarfCompileUnit::createGlobalVariableDIE().

void DwarfDebug::addDwarfTypeUnitType ( DwarfCompileUnit CU,
StringRef  Identifier,
DIE Die,
DICompositeType  CTy 
)
void DwarfDebug::beginFunction ( const MachineFunction MF) [override, virtual]
void DwarfDebug::beginInstruction ( const MachineInstr MI) [override, virtual]
void DwarfDebug::emitDebugLocEntry ( ByteStreamer Streamer,
const DebugLocEntry Entry 
)

Emit an entry for the debug loc section. This can be used to handle an entry that's going to be emitted into the debug loc section.

Definition at line 2107 of file DwarfDebug.cpp.

References emitDebugLocValue(), emitLocPieces(), llvm::DebugLocEntry::getValues(), and llvm::DebugLocEntry::Value::isVariablePiece().

Referenced by emitDebugLocEntryLocation().

Emit the location for a debug loc entry, including the size header.

Definition at line 2181 of file DwarfDebug.cpp.

References llvm::sys::path::begin(), emitDebugLocEntry(), and llvm::sys::path::end().

void DwarfDebug::emitDIE ( DIE Die)
void DwarfDebug::endFunction ( const MachineFunction MF) [override, virtual]
void DwarfDebug::endInstruction ( ) [override, virtual]
void DwarfDebug::endModule ( ) [override, virtual]

Returns the entries for the .debug_loc section.

Definition at line 643 of file DwarfDebug.h.

Referenced by llvm::DIELocList::EmitValue().

Returns the section symbol for the .debug_loc section.

Definition at line 632 of file DwarfDebug.h.

Referenced by llvm::DIELocList::EmitValue().

Returns the section symbol for the .debug_str section.

Definition at line 635 of file DwarfDebug.h.

Referenced by llvm::DwarfUnit::addLocalString().

DIE* llvm::DwarfDebug::getDIE ( const MDNode TypeMD) [inline]

Returns the previous CU that was being updated.

Definition at line 638 of file DwarfDebug.h.

Referenced by llvm::DwarfCompileUnit::addRange().

Return the TypeIdentifierMap.

Definition at line 667 of file DwarfDebug.h.

Referenced by llvm::DbgVariable::getType(), and llvm::DbgVariable::isBlockByrefVariable().

void llvm::DwarfDebug::insertDIE ( const MDNode TypeMD,
DIE Die 
) [inline]

isSubprogramContext - Return true if Context is either a subprogram or another context nested inside a subprogram.

Definition at line 302 of file DwarfDebug.cpp.

References llvm::DIDescriptor::isSubprogram(), llvm::DIDescriptor::isType(), and resolve().

Referenced by llvm::DwarfCompileUnit::createGlobalVariableDIE().

Find the DwarfCompileUnit for the given CU Die.

Definition at line 672 of file DwarfDebug.h.

References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::lookup().

Referenced by llvm::DIEEntry::EmitValue().

template<typename T >
T llvm::DwarfDebug::resolve ( DIRef< T Ref) const [inline]
void llvm::DwarfDebug::setPrevCU ( const DwarfCompileUnit PrevCU) [inline]

Definition at line 639 of file DwarfDebug.h.

Referenced by llvm::DwarfCompileUnit::addRange().

void llvm::DwarfDebug::setSymbolSize ( const MCSymbol Sym,
uint64_t  Size 
) [inline, override, virtual]

For symbols that have a size designated (e.g. common symbols), this tracks that size.

Implements llvm::AsmPrinterHandler.

Definition at line 611 of file DwarfDebug.h.

Returns whether or not to emit tables that dwarf consumers can use to accelerate lookup.

Definition at line 622 of file DwarfDebug.h.

Referenced by addAccelName(), addAccelNamespace(), addAccelObjC(), addAccelType(), and endModule().


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