LLVM API Documentation
#include "DwarfDebug.h"
#include "DIE.h"
#include "DIEHash.h"
#include "DwarfAccelTable.h"
#include "DwarfCompileUnit.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/DIBuilder.h"
#include "llvm/DebugInfo.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.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/ErrorHandling.h"
#include "llvm/Support/FormattedStream.h"
#include "llvm/Support/MD5.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Timer.h"
#include "llvm/Support/ValueHandle.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"
Go to the source code of this file.
Classes | |
struct | SymbolCUSorter |
struct | ArangeSpan |
Namespaces | |
llvm | |
List of target independent CodeGen pass IDs. | |
Macros | |
#define | DEBUG_TYPE "dwarfdebug" |
Enumerations | |
enum | DefaultOnOff |
Functions | |
static unsigned | getDwarfVersionFromModule (const Module *M) |
Return Dwarf Version by checking module flags. More... | |
static MCSymbol * | emitSectionSym (AsmPrinter *Asm, const MCSection *Section, const char *SymbolStem=0) |
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 | addSubprogramNames (CompileUnit *TheCU, DISubprogram SP, DIE *Die) |
static StringRef | getDIEStringAttr (DIE *Die, unsigned Attr) |
Grabs the string in whichever attribute is passed in and returns a reference to it. Returns "" if the attribute doesn't exist. More... | |
static bool | isContainedInAnonNamespace (DIE *Die) |
Return true if the current DIE is contained within an anonymous namespace. More... | |
static bool | shouldAddODRHash (CompileUnit *CU, DIE *Die) |
static bool | isDbgValueInDefinedReg (const MachineInstr *MI) |
static DotDebugLocEntry | getDebugLocEntry (AsmPrinter *Asm, const MCSymbol *FLabel, const MCSymbol *SLabel, const MachineInstr *MI) |
static MDNode * | getScopeNode (DebugLoc DL, const LLVMContext &Ctx) |
static DebugLoc | getFnDebugLoc (DebugLoc DL, const LLVMContext &Ctx) |
static dwarf::PubIndexEntryDescriptor | computeIndexValue (CompileUnit *CU, DIE *Die) |
computeIndexValue - Compute the gdb index value for the DIE and CU. More... | |
static bool | CUSort (const CompileUnit *A, const CompileUnit *B) |
Variables | |
static cl::opt< bool > | DisableDebugInfoPrinting ("disable-debug-info-print", cl::Hidden, cl::desc("Disable debug info printing")) |
static cl::opt< bool > | UnknownLocations ("use-unknown-locations", cl::Hidden, cl::desc("Make an absence of debug location information explicit."), cl::init(false)) |
static cl::opt< bool > | GenerateODRHash ("generate-odr-hash", cl::Hidden, cl::desc("Add an ODR hash to external type DIEs."), cl::init(false)) |
static cl::opt< bool > | GenerateCUHash ("generate-cu-hash", cl::Hidden, cl::desc("Add the CU hash as the dwo_id."), 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 > | 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 cl::opt< DefaultOnOff > | SplitDwarf ("split-dwarf", cl::Hidden, cl::desc("Output prototype dwarf split debug info."), cl::values(clEnumVal(Default,"Default for platform"), clEnumVal(Enable,"Enabled"), clEnumVal(Disable,"Disabled"), clEnumValEnd), cl::init(Default)) |
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"), clEnumValEnd), cl::init(Default)) |
static const char *const | DWARFGroupName = "DWARF Emission" |
static const char *const | DbgTimerName = "DWARF Debug Writer" |
static const unsigned | InitAbbreviationsSetSize = 9 |
#define DEBUG_TYPE "dwarfdebug" |
Definition at line 14 of file DwarfDebug.cpp.
enum DefaultOnOff |
Definition at line 77 of file DwarfDebug.cpp.
|
static |
Definition at line 330 of file DwarfDebug.cpp.
References llvm::CompileUnit::addAccelName(), llvm::CompileUnit::addAccelObjC(), llvm::tgtok::Class, llvm::DISubprogram::getLinkageName(), llvm::DISubprogram::getName(), getObjCClassCategory(), getObjCMethodName(), llvm::DISubprogram::isDefinition(), and isObjCClass().
|
static |
computeIndexValue - Compute the gdb index value for the DIE and CU.
Definition at line 2389 of file DwarfDebug.cpp.
References llvm::dwarf::DW_LANG_C_plus_plus, llvm::DIE::findAttribute(), llvm::CompileUnit::getLanguage(), llvm::DIE::getTag(), llvm::dwarf::GIEK_FUNCTION, llvm::dwarf::GIEK_NONE, llvm::dwarf::GIEK_TYPE, llvm::dwarf::GIEK_VARIABLE, llvm::dwarf::GIEL_EXTERNAL, and llvm::dwarf::GIEL_STATIC.
|
static |
Definition at line 2768 of file DwarfDebug.cpp.
References llvm::CompileUnit::getUniqueID().
|
static |
Definition at line 228 of file DwarfDebug.cpp.
References llvm::MCStreamer::EmitLabel(), llvm::AsmPrinter::GetTempSymbol(), llvm::AsmPrinter::OutStreamer, and llvm::MCStreamer::SwitchSection().
|
static |
Definition at line 1322 of file DwarfDebug.cpp.
References llvm::MachineOperand::getCImm(), llvm::MachineOperand::getFPImm(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isCImm(), llvm::MachineOperand::isFPImm(), llvm::MachineOperand::isImm(), llvm::MachineOperand::isReg(), llvm_unreachable, and llvm::MachineLocation::set().
Grabs the string in whichever attribute is passed in and returns a reference to it. Returns "" if the attribute doesn't exist.
Definition at line 1009 of file DwarfDebug.cpp.
References llvm::DIE::findAttribute().
Referenced by isContainedInAnonNamespace(), and shouldAddODRHash().
Return Dwarf Version by checking module flags.
Definition at line 174 of file DwarfDebug.cpp.
References llvm::Module::getModuleFlag().
Referenced by llvm::DwarfDebug::DwarfDebug().
|
static |
Definition at line 1575 of file DwarfDebug.cpp.
References llvm::DebugLoc::get(), llvm::getDISubprogram(), llvm::DISubprogram::getLineNumber(), llvm::DISubprogram::getScopeLineNumber(), getScopeNode(), and llvm::DIDescriptor::isSubprogram().
Referenced by llvm::DwarfDebug::beginFunction().
Definition at line 302 of file DwarfDebug.cpp.
References llvm::StringRef::find(), hasObjCCategory(), and llvm::StringRef::slice().
Referenced by addSubprogramNames().
Definition at line 315 of file DwarfDebug.cpp.
References llvm::StringRef::find(), and llvm::StringRef::slice().
Referenced by addSubprogramNames().
|
static |
Definition at line 1567 of file DwarfDebug.cpp.
References llvm::DebugLoc::getFromDILocation(), llvm::DebugLoc::getInlinedAt(), and llvm::DebugLoc::getScope().
Referenced by getFnDebugLoc().
Definition at line 296 of file DwarfDebug.cpp.
References llvm::StringRef::find(), isObjCClass(), and llvm::StringRef::npos.
Referenced by getObjCClassCategory().
Return true if the current DIE is contained within an anonymous namespace.
Definition at line 1019 of file DwarfDebug.cpp.
References getDIEStringAttr(), llvm::DIE::getParent(), and llvm::DIE::getTag().
Referenced by shouldAddODRHash().
|
static |
Definition at line 1313 of file DwarfDebug.cpp.
References llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineInstr::isDebugValue(), llvm::MachineOperand::isImm(), and llvm::MachineOperand::isReg().
Referenced by llvm::DwarfDebug::beginFunction().
Definition at line 292 of file DwarfDebug.cpp.
References llvm::StringRef::startswith().
Referenced by addSubprogramNames(), and hasObjCCategory().
Definition at line 320 of file DwarfDebug.cpp.
References llvm::MCSection::getLabelBeginName().
|
static |
Test if the current CU language is C++ and that we have a named type that is not contained in an anonymous namespace.
Definition at line 1034 of file DwarfDebug.cpp.
References llvm::dwarf::DW_LANG_C_plus_plus, getDIEStringAttr(), llvm::CompileUnit::getLanguage(), and isContainedInAnonNamespace().
|
static |
Definition at line 109 of file DwarfDebug.cpp.
Referenced by llvm::DwarfDebug::DwarfDebug().
|
static |
Referenced by llvm::DwarfDebug::beginModule().
|
static |
Referenced by llvm::DwarfDebug::DwarfDebug().
|
static |
Definition at line 108 of file DwarfDebug.cpp.
Referenced by llvm::DwarfDebug::DwarfDebug().
|
static |
Referenced by llvm::DwarfDebug::DwarfDebug().
|
static |
|
static |
Referenced by llvm::DwarfDebug::endModule().
|
static |
|
static |
Definition at line 115 of file DwarfDebug.cpp.
|
static |
Referenced by llvm::DwarfDebug::DwarfDebug().