LLVM API Documentation

Classes | Defines | Enumerations | Functions | Variables
DwarfDebug.cpp File Reference
#include "ByteStreamer.h"
#include "DwarfDebug.h"
#include "DIE.h"
#include "DIEHash.h"
#include "DwarfUnit.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/Triple.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DIBuilder.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/ValueHandle.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Dwarf.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FormattedStream.h"
#include "llvm/Support/LEB128.h"
#include "llvm/Support/MD5.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Timer.h"
#include "llvm/Target/TargetFrameLowering.h"
#include "llvm/Target/TargetLoweringObjectFile.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Target/TargetSubtargetInfo.h"
Include dependency graph for DwarfDebug.cpp:

Go to the source code of this file.

Classes

struct  ArangeSpan

Defines

#define DEBUG_TYPE   "dwarfdebug"

Enumerations

enum  DefaultOnOff

Functions

static MCSymbolemitSectionSym (AsmPrinter *Asm, const MCSection *Section, const char *SymbolStem=nullptr)
static bool isObjCClass (StringRef Name)
static bool hasObjCCategory (StringRef Name)
static void getObjCClassCategory (StringRef In, StringRef &Class, StringRef &Category)
static StringRef getObjCMethodName (StringRef In)
static bool SectionSort (const MCSection *A, const MCSection *B)
static void addSectionLabel (AsmPrinter &Asm, DwarfUnit &U, DIE &D, dwarf::Attribute A, const MCSymbol *L, const MCSymbol *Sec)
static std::unique_ptr< DIEconstructVariableDIE (DwarfCompileUnit &TheCU, DbgVariable &DV, const LexicalScope &Scope, DIE *&ObjectPointer)
static DebugLocEntry::Value getDebugLocValue (const MachineInstr *MI)
static bool piecesOverlap (DIVariable P1, DIVariable P2)
 Determine whether two variable pieces overlap.
static DebugLoc findPrologueEndLoc (const MachineFunction *MF)
static
dwarf::PubIndexEntryDescriptor 
computeIndexValue (DwarfUnit *CU, const DIE *Die)
 computeIndexValue - Compute the gdb index value for the DIE and CU.
static uint64_t makeTypeSignature (StringRef Identifier)

Variables

static cl::opt< boolDisableDebugInfoPrinting ("disable-debug-info-print", cl::Hidden, cl::desc("Disable debug info printing"))
static cl::opt< boolUnknownLocations ("use-unknown-locations", cl::Hidden, cl::desc("Make an absence of debug location information explicit."), cl::init(false))
static cl::opt< boolGenerateGnuPubSections ("generate-gnu-dwarf-pub-sections", cl::Hidden, cl::desc("Generate GNU-style pubnames and pubtypes"), cl::init(false))
static cl::opt< boolGenerateARangeSection ("generate-arange-section", cl::Hidden, cl::desc("Generate dwarf aranges"), cl::init(false))
static cl::opt< DefaultOnOffDwarfAccelTables ("dwarf-accel-tables", cl::Hidden, cl::desc("Output prototype dwarf accelerator tables."), cl::values(clEnumVal(Default,"Default for platform"), clEnumVal(Enable,"Enabled"), clEnumVal(Disable,"Disabled"), clEnumValEnd), cl::init(Default))
static cl::opt< DefaultOnOffSplitDwarf ("split-dwarf", cl::Hidden, cl::desc("Output DWARF5 split debug info."), cl::values(clEnumVal(Default,"Default for platform"), clEnumVal(Enable,"Enabled"), clEnumVal(Disable,"Disabled"), clEnumValEnd), cl::init(Default))
static cl::opt< DefaultOnOffDwarfPubSections ("generate-dwarf-pub-sections", cl::Hidden, cl::desc("Generate DWARF pubnames and pubtypes sections"), cl::values(clEnumVal(Default,"Default for platform"), clEnumVal(Enable,"Enabled"), clEnumVal(Disable,"Disabled"), clEnumValEnd), cl::init(Default))
static const char *const DWARFGroupName = "DWARF Emission"
static const char *const DbgTimerName = "DWARF Debug Writer"
static LLVM_CONSTEXPR
DwarfAccelTable::Atom 
TypeAtoms []

Define Documentation

#define DEBUG_TYPE   "dwarfdebug"

Definition at line 54 of file DwarfDebug.cpp.


Enumeration Type Documentation

Definition at line 76 of file DwarfDebug.cpp.


Function Documentation

static void addSectionLabel ( AsmPrinter Asm,
DwarfUnit U,
DIE D,
dwarf::Attribute  A,
const MCSymbol L,
const MCSymbol Sec 
) [static]
static dwarf::PubIndexEntryDescriptor computeIndexValue ( DwarfUnit CU,
const DIE Die 
) [static]
static std::unique_ptr<DIE> constructVariableDIE ( DwarfCompileUnit TheCU,
DbgVariable DV,
const LexicalScope Scope,
DIE *&  ObjectPointer 
) [static]
static MCSymbol* emitSectionSym ( AsmPrinter Asm,
const MCSection Section,
const char *  SymbolStem = nullptr 
) [static]
static DebugLoc findPrologueEndLoc ( const MachineFunction MF) [static]
static void getObjCClassCategory ( StringRef  In,
StringRef Class,
StringRef Category 
) [static]
static StringRef getObjCMethodName ( StringRef  In) [static]
static bool hasObjCCategory ( StringRef  Name) [static]

Definition at line 242 of file DwarfDebug.cpp.

References llvm::StringRef::find(), isObjCClass(), and llvm::StringRef::npos.

Referenced by getObjCClassCategory().

static bool isObjCClass ( StringRef  Name) [static]
static uint64_t makeTypeSignature ( StringRef  Identifier) [static]

Definition at line 2526 of file DwarfDebug.cpp.

References llvm::MD5::final(), and llvm::MD5::update().

Referenced by llvm::DwarfDebug::addDwarfTypeUnitType().

static bool piecesOverlap ( DIVariable  P1,
DIVariable  P2 
) [static]

Determine whether two variable pieces overlap.

Definition at line 1214 of file DwarfDebug.cpp.

References llvm::DIVariable::getPieceOffset(), llvm::DIVariable::getPieceSize(), and llvm::DIVariable::isVariablePiece().

Referenced by llvm::DwarfDebug::beginFunction().

static bool SectionSort ( const MCSection A,
const MCSection B 
) [static]

Definition at line 267 of file DwarfDebug.cpp.

References llvm::MCSection::getLabelBeginName().


Variable Documentation

const char* const DbgTimerName = "DWARF Debug Writer" [static]

Definition at line 104 of file DwarfDebug.cpp.

Referenced by llvm::DwarfDebug::DwarfDebug().

cl::opt<bool> DisableDebugInfoPrinting("disable-debug-info-print", cl::Hidden, cl::desc("Disable debug info printing")) [static]
cl::opt<DefaultOnOff> DwarfAccelTables("dwarf-accel-tables", cl::Hidden, cl::desc("Output prototype dwarf accelerator tables."), cl::values(clEnumVal(Default,"Default for platform"),clEnumVal(Enable,"Enabled"),clEnumVal(Disable,"Disabled"), clEnumValEnd), cl::init(Default)) [static]
const char* const DWARFGroupName = "DWARF Emission" [static]

Definition at line 103 of file DwarfDebug.cpp.

Referenced by llvm::DwarfDebug::DwarfDebug().

cl::opt<DefaultOnOff> DwarfPubSections("generate-dwarf-pub-sections", cl::Hidden, cl::desc("Generate DWARF pubnames and pubtypes sections"), cl::values(clEnumVal(Default,"Default for platform"),clEnumVal(Enable,"Enabled"),clEnumVal(Disable,"Disabled"), clEnumValEnd), cl::init(Default)) [static]
cl::opt<bool> GenerateARangeSection("generate-arange-section", cl::Hidden, cl::desc("Generate dwarf aranges"), cl::init(false)) [static]
cl::opt<bool> GenerateGnuPubSections("generate-gnu-dwarf-pub-sections", cl::Hidden, cl::desc("Generate GNU-style pubnames and pubtypes"), cl::init(false)) [static]
cl::opt<DefaultOnOff> SplitDwarf("split-dwarf", cl::Hidden, cl::desc("Output DWARF5 split debug info."), cl::values(clEnumVal(Default,"Default for platform"),clEnumVal(Enable,"Enabled"),clEnumVal(Disable,"Disabled"), clEnumValEnd), cl::init(Default)) [static]
cl::opt<bool> UnknownLocations("use-unknown-locations", cl::Hidden, cl::desc("Make an absence of debug location information explicit."), cl::init(false)) [static]