LLVM  4.0.0
Classes | Macros | Enumerations | Functions | Variables
DwarfDebug.cpp File Reference
#include "DwarfDebug.h"
#include "ByteStreamer.h"
#include "DIEHash.h"
#include "DebugLocEntry.h"
#include "DwarfCompileUnit.h"
#include "DwarfExpression.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/DIE.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/IR/Constants.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/MCDwarf.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/Support/raw_ostream.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
 

Macros

#define DEBUG_TYPE   "dwarfdebug"
 

Enumerations

enum  DefaultOnOff
 
enum  LinkageNameOption { DefaultLinkageNames, AllLinkageNames, AbstractLinkageNames }
 

Functions

static bool isObjCClass (StringRef Name)
 
static bool hasObjCCategory (StringRef Name)
 
static void getObjCClassCategory (StringRef In, StringRef &Class, StringRef &Category)
 
static StringRef getObjCMethodName (StringRef In)
 
template<typename Func >
static void forBothCUs (DwarfCompileUnit &CU, Func F)
 
static SmallVectorImpl
< DwarfCompileUnit::GlobalExpr > & 
sortGlobalExprs (SmallVectorImpl< DwarfCompileUnit::GlobalExpr > &GVEs)
 Sort and unique GVEs by comparing their fragment offset. More...
 
static DebugLocEntry::Value getDebugLocValue (const MachineInstr *MI)
 
static bool validAtEntry (const MachineInstr *MInsn)
 
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. More...
 
static void emitDebugLocValue (const AsmPrinter &AP, const DIBasicType *BT, ByteStreamer &Streamer, const DebugLocEntry::Value &Value, DwarfExpression &DwarfExpr)
 

Variables

static cl::opt< boolDisableDebugInfoPrinting ("disable-debug-info-print", cl::Hidden, cl::desc("Disable debug info printing"))
 
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< DefaultOnOffUnknownLocations ("use-unknown-locations", cl::Hidden, cl::desc("Make an absence of debug location information explicit."), cl::values(clEnumVal(Default,"At top of block or after label"), clEnumVal(Enable,"In all cases"), clEnumVal(Disable,"Never")), cl::init(Default))
 
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")), 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")), 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")), cl::init(Default))
 
static cl::opt< LinkageNameOptionDwarfLinkageNames ("dwarf-linkage-names", cl::Hidden, cl::desc("Which DWARF linkage-name attributes to emit."), cl::values(clEnumValN(DefaultLinkageNames,"Default","Default for platform"), clEnumValN(AllLinkageNames,"All","All"), clEnumValN(AbstractLinkageNames,"Abstract","Abstract subprograms")), cl::init(DefaultLinkageNames))
 
static const char *const DWARFGroupName = "dwarf"
 
static const char *const DWARFGroupDescription = "DWARF Emission"
 
static const char *const DbgTimerName = "writer"
 
static const char *const DbgTimerDescription = "DWARF Debug Writer"
 
static const DwarfAccelTable::Atom TypeAtoms []
 

Macro Definition Documentation

#define DEBUG_TYPE   "dwarfdebug"

Definition at line 59 of file DwarfDebug.cpp.

Enumeration Type Documentation

Definition at line 76 of file DwarfDebug.cpp.

Enumerator
DefaultLinkageNames 
AllLinkageNames 
AbstractLinkageNames 

Definition at line 110 of file DwarfDebug.cpp.

Function Documentation

static dwarf::PubIndexEntryDescriptor computeIndexValue ( DwarfUnit CU,
const DIE Die 
)
static
static void emitDebugLocValue ( const AsmPrinter AP,
const DIBasicType BT,
ByteStreamer Streamer,
const DebugLocEntry::Value Value,
DwarfExpression DwarfExpr 
)
static
static DebugLoc findPrologueEndLoc ( const MachineFunction MF)
static

Definition at line 1127 of file DwarfDebug.cpp.

References llvm::MachineInstr::FrameSetup, MBB, and MI.

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

template<typename Func >
static void forBothCUs ( DwarfCompileUnit CU,
Func  F 
)
static
static DebugLocEntry::Value getDebugLocValue ( const MachineInstr MI)
static
static void getObjCClassCategory ( StringRef  In,
StringRef Class,
StringRef Category 
)
static
static StringRef getObjCMethodName ( StringRef  In)
static
static bool hasObjCCategory ( StringRef  Name)
static
static bool isObjCClass ( StringRef  Name)
static
static bool validAtEntry ( const MachineInstr MInsn)
static

Variable Documentation

const char* const DbgTimerDescription = "DWARF Debug Writer"
static

Definition at line 128 of file DwarfDebug.cpp.

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

const char* const DbgTimerName = "writer"
static

Definition at line 127 of file DwarfDebug.cpp.

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

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")), cl::init(Default))
static
const char* const DWARFGroupDescription = "DWARF Emission"
static

Definition at line 126 of file DwarfDebug.cpp.

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

const char* const DWARFGroupName = "dwarf"
static

Definition at line 125 of file DwarfDebug.cpp.

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

cl::opt<LinkageNameOption> DwarfLinkageNames("dwarf-linkage-names", cl::Hidden, cl::desc("Which DWARF linkage-name attributes to emit."), cl::values(clEnumValN(DefaultLinkageNames,"Default","Default for platform"),clEnumValN(AllLinkageNames,"All","All"),clEnumValN(AbstractLinkageNames,"Abstract","Abstract subprograms")), cl::init(DefaultLinkageNames))
static
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")), 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")), cl::init(Default))
static
const DwarfAccelTable::Atom TypeAtoms[]
static
cl::opt<DefaultOnOff> UnknownLocations("use-unknown-locations", cl::Hidden, cl::desc("Make an absence of debug location information explicit."), cl::values(clEnumVal(Default,"At top of block or after label"),clEnumVal(Enable,"In all cases"), clEnumVal(Disable,"Never")), cl::init(Default))
static