LLVM API Documentation
#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"
Go to the source code of this file.
Classes | |
| struct | ArangeSpan |
Defines | |
| #define | DEBUG_TYPE "dwarfdebug" |
Enumerations | |
| enum | DefaultOnOff |
Functions | |
| static MCSymbol * | emitSectionSym (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< DIE > | constructVariableDIE (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< 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 > | 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< 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 DWARF5 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 LLVM_CONSTEXPR DwarfAccelTable::Atom | TypeAtoms [] |
| #define DEBUG_TYPE "dwarfdebug" |
Definition at line 54 of file DwarfDebug.cpp.
| enum DefaultOnOff |
Definition at line 76 of file DwarfDebug.cpp.
| static void addSectionLabel | ( | AsmPrinter & | Asm, |
| DwarfUnit & | U, | ||
| DIE & | D, | ||
| dwarf::Attribute | A, | ||
| const MCSymbol * | L, | ||
| const MCSymbol * | Sec | ||
| ) | [static] |
Definition at line 352 of file DwarfDebug.cpp.
References llvm::DwarfUnit::addSectionDelta(), llvm::DwarfUnit::addSectionLabel(), llvm::MCAsmInfo::doesDwarfUseRelocationsAcrossSections(), and llvm::AsmPrinter::MAI.
| static dwarf::PubIndexEntryDescriptor computeIndexValue | ( | DwarfUnit * | CU, |
| const DIE * | Die | ||
| ) | [static] |
computeIndexValue - Compute the gdb index value for the DIE and CU.
Definition at line 1935 of file DwarfDebug.cpp.
References llvm::dwarf::DW_AT_external, llvm::dwarf::DW_AT_specification, llvm::dwarf::DW_LANG_C_plus_plus, llvm::dwarf::DW_TAG_base_type, llvm::dwarf::DW_TAG_class_type, llvm::dwarf::DW_TAG_constant, llvm::dwarf::DW_TAG_enumeration_type, llvm::dwarf::DW_TAG_enumerator, llvm::dwarf::DW_TAG_namespace, llvm::dwarf::DW_TAG_structure_type, llvm::dwarf::DW_TAG_subprogram, llvm::dwarf::DW_TAG_subrange_type, llvm::dwarf::DW_TAG_typedef, llvm::dwarf::DW_TAG_union_type, llvm::dwarf::DW_TAG_variable, llvm::DIE::findAttribute(), getEntry(), 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 std::unique_ptr<DIE> constructVariableDIE | ( | DwarfCompileUnit & | TheCU, |
| DbgVariable & | DV, | ||
| const LexicalScope & | Scope, | ||
| DIE *& | ObjectPointer | ||
| ) | [static] |
Definition at line 446 of file DwarfDebug.cpp.
References llvm::DwarfUnit::constructVariableDIE(), llvm::LexicalScope::isAbstractScope(), and llvm::DbgVariable::isObjectPointer().
| static MCSymbol* emitSectionSym | ( | AsmPrinter * | Asm, |
| const MCSection * | Section, | ||
| const char * | SymbolStem = nullptr |
||
| ) | [static] |
Definition at line 227 of file DwarfDebug.cpp.
References llvm::MCStreamer::EmitLabel(), llvm::AsmPrinter::GetTempSymbol(), llvm::AsmPrinter::OutStreamer, and llvm::MCStreamer::SwitchSection().
| static DebugLoc findPrologueEndLoc | ( | const MachineFunction * | MF | ) | [static] |
Definition at line 1505 of file DwarfDebug.cpp.
References llvm::MachineInstr::FrameSetup, llvm::MachineInstr::getDebugLoc(), llvm::MachineInstr::getFlag(), llvm::MachineInstr::isDebugValue(), and llvm::DebugLoc::isUnknown().
Referenced by llvm::DwarfDebug::beginFunction().
| static DebugLocEntry::Value getDebugLocValue | ( | const MachineInstr * | MI | ) | [static] |
Definition at line 1189 of file DwarfDebug.cpp.
References llvm::MachineOperand::getCImm(), llvm::MachineInstr::getDebugVariable(), 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().
| static void getObjCClassCategory | ( | StringRef | In, |
| StringRef & | Class, | ||
| StringRef & | Category | ||
| ) | [static] |
Definition at line 249 of file DwarfDebug.cpp.
References llvm::StringRef::find(), hasObjCCategory(), and llvm::StringRef::slice().
Referenced by llvm::DwarfDebug::addSubprogramNames().
| static StringRef getObjCMethodName | ( | StringRef | In | ) | [static] |
Definition at line 262 of file DwarfDebug.cpp.
References llvm::StringRef::find(), and llvm::StringRef::slice().
Referenced by llvm::DwarfDebug::addSubprogramNames().
| 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] |
Definition at line 238 of file DwarfDebug.cpp.
References llvm::StringRef::startswith().
Referenced by llvm::DwarfDebug::addSubprogramNames(), and hasObjCCategory().
| 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().
Definition at line 267 of file DwarfDebug.cpp.
References llvm::MCSection::getLabelBeginName().
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] |
Referenced by llvm::DwarfDebug::beginModule().
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] |
Referenced by llvm::DwarfDebug::DwarfDebug().
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] |
Referenced by llvm::DwarfDebug::DwarfDebug().
cl::opt<bool> GenerateARangeSection("generate-arange-section", cl::Hidden, cl::desc("Generate dwarf aranges"), cl::init(false)) [static] |
Referenced by llvm::DwarfDebug::endModule().
cl::opt<bool> GenerateGnuPubSections("generate-gnu-dwarf-pub-sections", cl::Hidden, cl::desc("Generate GNU-style pubnames and pubtypes"), cl::init(false)) [static] |
Referenced by llvm::DwarfDebug::endModule().
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] |
Referenced by llvm::DwarfDebug::DwarfDebug().
LLVM_CONSTEXPR DwarfAccelTable::Atom TypeAtoms[] [static] |
{
DwarfAccelTable::Atom(dwarf::DW_ATOM_die_offset, dwarf::DW_FORM_data4),
DwarfAccelTable::Atom(dwarf::DW_ATOM_die_tag, dwarf::DW_FORM_data2),
DwarfAccelTable::Atom(dwarf::DW_ATOM_type_flags, dwarf::DW_FORM_data1)}
Definition at line 164 of file DwarfDebug.cpp.
cl::opt<bool> UnknownLocations("use-unknown-locations", cl::Hidden, cl::desc("Make an absence of debug location information explicit."), cl::init(false)) [static] |
Referenced by llvm::DwarfDebug::beginInstruction().