|
LLVM
5.0.0
|
#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/BinaryFormat/Dwarf.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/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"Go to the source code of this file.
Classes | |
| struct | ArangeSpan |
Macros | |
| #define | DEBUG_TYPE "dwarfdebug" |
Enumerations | |
| enum | DefaultOnOff |
| enum | LinkageNameOption { DefaultLinkageNames, AllLinkageNames, AbstractLinkageNames } |
Variables | |
| static cl::opt< bool > | DisableDebugInfoPrinting ("disable-debug-info-print", cl::Hidden, cl::desc("Disable debug info printing")) |
| 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< bool > | GenerateARangeSection ("generate-arange-section", cl::Hidden, cl::desc("Generate dwarf aranges"), cl::init(false)) |
| static cl::opt< bool > | SplitDwarfCrossCuReferences ("split-dwarf-cross-cu-references", cl::Hidden, cl::desc("Enable cross-cu references in DWO files"), cl::init(false)) |
| 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 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 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< 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 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 [] |
| #define DEBUG_TYPE "dwarfdebug" |
Definition at line 58 of file DwarfDebug.cpp.
| enum DefaultOnOff |
Definition at line 79 of file DwarfDebug.cpp.
| enum LinkageNameOption |
| Enumerator | |
|---|---|
| DefaultLinkageNames | |
| AllLinkageNames | |
| AbstractLinkageNames | |
Definition at line 105 of file DwarfDebug.cpp.
|
static |
computeIndexValue - Compute the gdb index value for the DIE and CU.
Definition at line 1391 of file DwarfDebug.cpp.
References llvm::DIE::findAttribute(), llvm::DwarfUnit::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 1538 of file DwarfDebug.cpp.
References llvm::DwarfExpression::addExpression(), llvm::DwarfExpression::addFragmentOffset(), llvm::DwarfExpression::addMachineRegExpression(), llvm::DwarfExpression::addSignedConstant(), llvm::DwarfExpression::addUnsignedConstant(), llvm::SmallVectorImpl< T >::append(), llvm::APFloat::bitcastToAPInt(), llvm::DIExpression::elements_begin(), llvm::DIExpression::elements_end(), llvm::DebugLocEntry::Value::getConstantFP(), llvm::DIBasicType::getEncoding(), llvm::DebugLocEntry::Value::getExpression(), llvm::DebugLocEntry::Value::getInt(), llvm::DebugLocEntry::Value::getLoc(), llvm::MachineLocation::getOffset(), llvm::MachineLocation::getReg(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), llvm::ConstantFP::getValueAPF(), llvm::DebugLocEntry::Value::isConstantFP(), llvm::MachineLocation::isIndirect(), llvm::DebugLocEntry::Value::isInt(), llvm::DebugLocEntry::Value::isLocation(), llvm::AsmPrinter::MF, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), and llvm::DwarfExpression::setMemoryLocationKind().
Referenced by llvm::DebugLocEntry::finalize().
|
static |
Definition at line 1185 of file DwarfDebug.cpp.
References llvm::MachineInstr::FrameSetup, and MI.
Referenced by llvm::DwarfDebug::beginFunctionImpl().
|
static |
Definition at line 356 of file DwarfDebug.cpp.
References F, llvm::DwarfUnit::getCUNode(), llvm::DwarfCompileUnit::getSkeleton(), and llvm::DICompileUnit::getSplitDebugInlining().
|
static |
Definition at line 804 of file DwarfDebug.cpp.
References assert(), llvm::MachineOperand::getCImm(), llvm::MachineInstr::getDebugExpression(), 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().
Definition at line 294 of file DwarfDebug.cpp.
References llvm::StringRef::find(), hasObjCCategory(), and llvm::StringRef::slice().
Referenced by llvm::DwarfDebug::addSubprogramNames().
Definition at line 306 of file DwarfDebug.cpp.
References llvm::StringRef::find(), and llvm::StringRef::slice().
Referenced by llvm::DwarfDebug::addSubprogramNames().
Definition at line 287 of file DwarfDebug.cpp.
References llvm::StringRef::find(), isObjCClass(), and llvm::StringRef::npos.
Referenced by getObjCClassCategory(), and llvm::isBitcodeContainingObjCCategory().
Definition at line 283 of file DwarfDebug.cpp.
References llvm::StringRef::startswith().
Referenced by llvm::DwarfDebug::addSubprogramNames(), and hasObjCCategory().
|
static |
Sort and unique GVEs by comparing their fragment offset.
Definition at line 503 of file DwarfDebug.cpp.
References A, B, llvm::SmallVectorTemplateCommon< T >::begin(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::SmallVectorImpl< T >::erase(), llvm::DwarfCompileUnit::GlobalExpr::Expr, llvm::DIExpression::getFragmentInfo(), and llvm::parallel::sort().
Referenced by llvm::DwarfDebug::beginModule().
|
static |
Determine whether a singular DBG_VALUE is valid for the entirety of its enclosing lexical scope.
The check ensures there are no other instructions in the same lexical scope preceding the DBG_VALUE and that its range is either open or otherwise rolls off the end of the scope.
Definition at line 979 of file DwarfDebug.cpp.
References assert(), llvm::DL, llvm::LexicalScopes::findLexicalScope(), llvm::MachineInstr::FrameSetup, llvm::MachineInstr::getDebugLoc(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::LexicalScope::getRanges(), and llvm::MachineOperand::isImm().
Definition at line 123 of file DwarfDebug.cpp.
Referenced by llvm::DwarfDebug::beginModule().
Definition at line 122 of file DwarfDebug.cpp.
Referenced by llvm::DwarfDebug::beginModule().
|
static |
Referenced by llvm::DwarfDebug::beginModule().
|
static |
Referenced by llvm::DwarfDebug::DwarfDebug().
Definition at line 121 of file DwarfDebug.cpp.
Referenced by llvm::DwarfDebug::beginModule().
Definition at line 120 of file DwarfDebug.cpp.
Referenced by llvm::DwarfDebug::beginModule().
|
static |
Referenced by llvm::DwarfDebug::DwarfDebug().
|
static |
Referenced by llvm::DwarfDebug::hasDwarfPubSections().
|
static |
Referenced by llvm::DwarfDebug::endModule().
|
static |
Referenced by llvm::DwarfDebug::endModule(), and llvm::DwarfDebug::hasDwarfPubSections().
|
static |
Referenced by llvm::DwarfDebug::shareAcrossDWOCUs().
|
static |
Definition at line 212 of file DwarfDebug.cpp.
|
static |
Referenced by llvm::DwarfDebug::beginInstruction().
1.8.6