14 #ifndef LLVM_DEBUGINFO_DICONTEXT_H 15 #define LLVM_DEBUGINFO_DICONTEXT_H 32 static constexpr
const char *
const BadString =
"<invalid>";
45 DILineInfo() : FileName(BadString), FunctionName(BadString) {}
48 return Line == RHS.
Line && Column == RHS.
Column &&
54 return !(*
this == RHS);
58 return std::tie(FileName, FunctionName, Line, Column, StartLine,
68 if (FileName != BadString)
69 OS <<
"file '" << FileName <<
"', ";
70 if (FunctionName != BadString)
71 OS <<
"function '" << FunctionName <<
"', ";
72 OS <<
"line " << Line <<
", ";
73 OS <<
"column " << Column <<
", ";
74 OS <<
"start line " << StartLine <<
'\n';
94 return &Frames[
Index];
123 uint64_t DeclLine = 0;
144 : FLIKind(FLIKind), FNKind(FNKind) {}
149 #define HANDLE_DWARF_SECTION(ENUM_NAME, ELF_NAME, CMDLINE_NAME) \ 151 #include "llvm/BinaryFormat/Dwarf.def" 152 #undef HANDLE_DWARF_SECTION 156 static_assert(
DIDT_ID_Count <= 32,
"section types overflow storage");
162 #define HANDLE_DWARF_SECTION(ENUM_NAME, ELF_NAME, CMDLINE_NAME) \ 163 DIDT_##ENUM_NAME = 1U << DIDT_ID_##ENUM_NAME, 164 #include "llvm/BinaryFormat/Dwarf.def" 165 #undef HANDLE_DWARF_SECTION 173 unsigned ChildRecurseDepth = -1U;
174 unsigned ParentRecurseDepth = -1U;
176 uint8_t AddrSize = 4;
177 bool ShowAddresses =
true;
178 bool ShowChildren =
false;
179 bool ShowParents =
false;
180 bool ShowForm =
false;
181 bool SummarizeTypes =
false;
182 bool Verbose =
false;
183 bool DisplayRawContents =
false;
196 if (ChildRecurseDepth == -1U && !ShowChildren)
198 if (ParentRecurseDepth == -1U && !ShowParents)
233 virtual std::vector<DILocal>
282 virtual std::unique_ptr<LoadedObjectInfo> clone()
const = 0;
285 template <
typename Derived,
typename Base = LoadedObjectInfo>
292 template <
typename... Ts>
295 std::unique_ptr<llvm::LoadedObjectInfo>
clone()
const override {
296 return std::make_unique<Derived>(
static_cast<const Derived &
>(*this));
302 #endif // LLVM_DEBUGINFO_DICONTEXT_H
Optional< StringRef > Source
bool operator!=(const DILineInfo &RHS) const
DILineInfo * getMutableFrame(unsigned Index)
Optional< int64_t > FrameOffset
This class represents lattice values for constants.
virtual bool getLoadedSectionContents(const object::SectionRef &Sec, StringRef &Data) const
If conveniently available, return the content of the given Section.
void push_back(const T &Elt)
Optional< uint64_t > TagOffset
void addFrame(const DILineInfo &Frame)
DINameKind
A DINameKind is passed to name search methods to specify a preference regarding the type of name reso...
A format-neutral container for source line information.
static constexpr const char *const Addr2LineBadString
bool operator<(const DILineInfo &RHS) const
virtual uint64_t getSectionLoadAddress(const object::SectionRef &Sec) const
Obtain the Load Address of a section by SectionRef.
DIContextKind getKind() const
virtual bool verify(raw_ostream &OS, DIDumpOptions DumpOpts={})
uint32_t getNumberOfFrames() const
unsigned ParentRecurseDepth
Container for dump options that control which debug information will be dumped.
Controls which fields of DILineInfo container should be filled with data.
DIDumpOptions noImplicitRecursion() const
Return the options with RecurseDepth set to 0 unless explicitly required.
bool operator==(const DILineInfo &RHS) const
DIContext(DIContextKind K)
A format-neutral container for inlined code description.
LoadedObjectInfoHelper(Ts &&... Args)
static constexpr const char *const BadString
void dump(raw_ostream &OS)
DILineInfoSpecifier(FileLineInfoKind FLIKind=FileLineInfoKind::Default, FunctionNameKind FNKind=FunctionNameKind::None)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
DIDumpType
Selects which debug sections get dumped.
An inferface for inquiring the load address of a loaded object file to be used by the DIContext imple...
std::unique_ptr< llvm::LoadedObjectInfo > clone() const override
DIDumpTypeCounter
This is just a helper to programmatically construct DIDumpType.
Optional< uint64_t > Size
unsigned ChildRecurseDepth
static DIDumpOptions getForSingleDIE()
Return default option set for printing a single DIE without children.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
const DILineInfo & getFrame(unsigned Index) const
This class implements an extremely fast bulk output stream that can only output to a stream...
StringRef - Represent a constant reference to a string, i.e.
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
Container for description of a global variable.
This is a value type class that represents a single section in the list of sections in the object fil...