LLVM  7.0.0svn
DWARFUnit.h
Go to the documentation of this file.
1 //===- DWARFUnit.h ----------------------------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_DEBUGINFO_DWARF_DWARFUNIT_H
11 #define LLVM_DEBUGINFO_DWARF_DWARFUNIT_H
12 
13 #include "llvm/ADT/Optional.h"
14 #include "llvm/ADT/STLExtras.h"
15 #include "llvm/ADT/SmallVector.h"
16 #include "llvm/ADT/StringRef.h"
27 #include <algorithm>
28 #include <cassert>
29 #include <cstddef>
30 #include <cstdint>
31 #include <map>
32 #include <memory>
33 #include <utility>
34 #include <vector>
35 
36 namespace llvm {
37 
38 class DWARFAbbreviationDeclarationSet;
39 class DWARFContext;
40 class DWARFDebugAbbrev;
41 class DWARFUnit;
42 
43 /// Base class for all DWARFUnitSection classes. This provides the
44 /// functionality common to all unit types.
46 public:
47  /// Returns the Unit that contains the given section offset in the
48  /// same section this Unit originated from.
49  virtual DWARFUnit *getUnitForOffset(uint32_t Offset) const = 0;
51 
52  void parse(DWARFContext &C, const DWARFSection &Section);
53  void parseDWO(DWARFContext &C, const DWARFSection &DWOSection,
54  bool Lazy = false);
55 
56 protected:
57  ~DWARFUnitSectionBase() = default;
58 
59  virtual void parseImpl(DWARFContext &Context, const DWARFObject &Obj,
60  const DWARFSection &Section,
61  const DWARFDebugAbbrev *DA, const DWARFSection *RS,
62  StringRef SS, const DWARFSection &SOS,
63  const DWARFSection *AOS, const DWARFSection &LS,
64  bool isLittleEndian, bool isDWO, bool Lazy) = 0;
65 };
66 
69 
70 /// Concrete instance of DWARFUnitSection, specialized for one Unit type.
71 template<typename UnitType>
72 class DWARFUnitSection final : public SmallVector<std::unique_ptr<UnitType>, 1>,
73  public DWARFUnitSectionBase {
74  bool Parsed = false;
75  std::function<std::unique_ptr<UnitType>(uint32_t)> Parser;
76 
77 public:
79  using iterator = typename UnitVector::iterator;
81 
83  auto *CU = std::upper_bound(
84  this->begin(), this->end(), Offset,
85  [](uint32_t LHS, const std::unique_ptr<UnitType> &RHS) {
86  return LHS < RHS->getNextUnitOffset();
87  });
88  if (CU != this->end() && (*CU)->getOffset() <= Offset)
89  return CU->get();
90  return nullptr;
91  }
93  const auto *CUOff = E.getOffset(DW_SECT_INFO);
94  if (!CUOff)
95  return nullptr;
96 
97  auto Offset = CUOff->Offset;
98 
99  auto *CU = std::upper_bound(
100  this->begin(), this->end(), CUOff->Offset,
101  [](uint32_t LHS, const std::unique_ptr<UnitType> &RHS) {
102  return LHS < RHS->getNextUnitOffset();
103  });
104  if (CU != this->end() && (*CU)->getOffset() <= Offset)
105  return CU->get();
106 
107  if (!Parser)
108  return nullptr;
109 
110  auto U = Parser(Offset);
111  if (!U)
112  U = nullptr;
113 
114  auto *NewCU = U.get();
115  this->insert(CU, std::move(U));
116  return NewCU;
117  }
118 
119 private:
120  void parseImpl(DWARFContext &Context, const DWARFObject &Obj,
121  const DWARFSection &Section, const DWARFDebugAbbrev *DA,
122  const DWARFSection *RS, StringRef SS, const DWARFSection &SOS,
123  const DWARFSection *AOS, const DWARFSection &LS, bool LE,
124  bool IsDWO, bool Lazy) override {
125  if (Parsed)
126  return;
127  DWARFDataExtractor Data(Obj, Section, LE, 0);
128  if (!Parser) {
129  const DWARFUnitIndex *Index = nullptr;
130  if (IsDWO)
131  Index = &getDWARFUnitIndex(Context, UnitType::Section);
132  Parser = [=, &Context, &Section, &SOS,
133  &LS](uint32_t Offset) -> std::unique_ptr<UnitType> {
134  if (!Data.isValidOffset(Offset))
135  return nullptr;
136  auto U = llvm::make_unique<UnitType>(
137  Context, Section, DA, RS, SS, SOS, AOS, LS, LE, IsDWO, *this,
138  Index ? Index->getFromOffset(Offset) : nullptr);
139  if (!U->extract(Data, &Offset))
140  return nullptr;
141  return U;
142  };
143  }
144  if (Lazy)
145  return;
146  auto I = this->begin();
147  uint32_t Offset = 0;
148  while (Data.isValidOffset(Offset)) {
149  if (I != this->end() && (*I)->getOffset() == Offset) {
150  ++I;
151  continue;
152  }
153  auto U = Parser(Offset);
154  if (!U)
155  break;
156  Offset = U->getNextUnitOffset();
157  I = std::next(this->insert(I, std::move(U)));
158  }
159  Parsed = true;
160  }
161 };
162 
163 /// Represents base address of the CU.
164 struct BaseAddress {
165  uint64_t Address;
166  uint64_t SectionIndex;
167 };
168 
169 /// Represents a unit's contribution to the string offsets table.
171  uint64_t Base = 0;
172  uint64_t Size = 0;
173  /// Format and version.
175 
176  StrOffsetsContributionDescriptor(uint64_t Base, uint64_t Size,
178  : Base(Base), Size(Size), FormParams({Version, 0, Format}) {}
179 
180  uint8_t getVersion() const { return FormParams.Version; }
181  dwarf::DwarfFormat getFormat() const { return FormParams.Format; }
182  uint8_t getDwarfOffsetByteSize() const {
183  return FormParams.getDwarfOffsetByteSize();
184  }
185  /// Determine whether a contribution to the string offsets table is
186  /// consistent with the relevant section size and that its length is
187  /// a multiple of the size of one of its entries.
189  validateContributionSize(DWARFDataExtractor &DA);
190 };
191 
192 class DWARFUnit {
194  /// Section containing this DWARFUnit.
195  const DWARFSection &InfoSection;
196 
197  const DWARFDebugAbbrev *Abbrev;
198  const DWARFSection *RangeSection;
199  uint32_t RangeSectionBase;
200  const DWARFSection &LineSection;
201  StringRef StringSection;
202  const DWARFSection &StringOffsetSection;
203  const DWARFSection *AddrOffsetSection;
204  uint32_t AddrOffsetSectionBase = 0;
205  bool isLittleEndian;
206  bool isDWO;
207  const DWARFUnitSectionBase &UnitSection;
208 
209  // Version, address size, and DWARF format.
210  dwarf::FormParams FormParams;
211  /// Start, length, and DWARF format of the unit's contribution to the string
212  /// offsets table (DWARF v5).
213  Optional<StrOffsetsContributionDescriptor> StringOffsetsTableContribution;
214 
216  uint32_t Length;
217  mutable const DWARFAbbreviationDeclarationSet *Abbrevs;
218  uint64_t AbbrOffset;
219  uint8_t UnitType;
221  /// The compile unit debug information entry items.
222  std::vector<DWARFDebugInfoEntry> DieArray;
223 
224  /// Map from range's start address to end address and corresponding DIE.
225  /// IntervalMap does not support range removal, as a result, we use the
226  /// std::map::upper_bound for address range lookup.
227  std::map<uint64_t, std::pair<uint64_t, DWARFDie>> AddrDieMap;
228 
229  using die_iterator_range =
231 
232  std::shared_ptr<DWARFUnit> DWO;
233 
234  const DWARFUnitIndex::Entry *IndexEntry;
235 
236  uint32_t getDIEIndex(const DWARFDebugInfoEntry *Die) {
237  auto First = DieArray.data();
238  assert(Die >= First && Die < First + DieArray.size());
239  return Die - First;
240  }
241 
242 protected:
243  virtual bool extractImpl(const DWARFDataExtractor &debug_info,
244  uint32_t *offset_ptr);
245 
246  /// Size in bytes of the unit header.
247  virtual uint32_t getHeaderSize() const { return getVersion() <= 4 ? 11 : 12; }
248 
249  /// Find the unit's contribution to the string offsets table and determine its
250  /// length and form. The given offset is expected to be derived from the unit
251  /// DIE's DW_AT_str_offsets_base attribute.
253  determineStringOffsetsTableContribution(DWARFDataExtractor &DA,
254  uint64_t Offset);
255 
256  /// Find the unit's contribution to the string offsets table and determine its
257  /// length and form. The given offset is expected to be 0 in a dwo file or,
258  /// in a dwp file, the start of the unit's contribution to the string offsets
259  /// table section (as determined by the index table).
261  determineStringOffsetsTableContributionDWO(DWARFDataExtractor &DA,
262  uint64_t Offset);
263 
264 public:
265  DWARFUnit(DWARFContext &Context, const DWARFSection &Section,
266  const DWARFDebugAbbrev *DA, const DWARFSection *RS, StringRef SS,
267  const DWARFSection &SOS, const DWARFSection *AOS,
268  const DWARFSection &LS, bool LE, bool IsDWO,
269  const DWARFUnitSectionBase &UnitSection,
270  const DWARFUnitIndex::Entry *IndexEntry = nullptr);
271 
272  virtual ~DWARFUnit();
273 
274  DWARFContext& getContext() const { return Context; }
275 
276  const DWARFSection &getLineSection() const { return LineSection; }
277  StringRef getStringSection() const { return StringSection; }
279  return StringOffsetSection;
280  }
281 
283  AddrOffsetSection = AOS;
284  AddrOffsetSectionBase = Base;
285  }
286 
287  /// Recursively update address to Die map.
288  void updateAddressDieMap(DWARFDie Die);
289 
291  RangeSection = RS;
292  RangeSectionBase = Base;
293  }
294 
295  bool getAddrOffsetSectionItem(uint32_t Index, uint64_t &Result) const;
296  bool getStringOffsetSectionItem(uint32_t Index, uint64_t &Result) const;
297 
298  DWARFDataExtractor getDebugInfoExtractor() const;
299 
301  return DataExtractor(StringSection, false, 0);
302  }
303 
304  bool extract(const DWARFDataExtractor &debug_info, uint32_t *offset_ptr);
305 
306  /// extractRangeList - extracts the range list referenced by this compile
307  /// unit from .debug_ranges section. Returns true on success.
308  /// Requires that compile unit is already extracted.
309  bool extractRangeList(uint32_t RangeListOffset,
310  DWARFDebugRangeList &RangeList) const;
311  void clear();
312  uint32_t getOffset() const { return Offset; }
313  uint32_t getNextUnitOffset() const { return Offset + Length + 4; }
314  uint32_t getLength() const { return Length; }
315 
318  return StringOffsetsTableContribution;
319  }
320  const dwarf::FormParams &getFormParams() const { return FormParams; }
321  uint16_t getVersion() const { return FormParams.Version; }
322  dwarf::DwarfFormat getFormat() const { return FormParams.Format; }
323  uint8_t getAddressByteSize() const { return FormParams.AddrSize; }
324  uint8_t getRefAddrByteSize() const { return FormParams.getRefAddrByteSize(); }
325  uint8_t getDwarfOffsetByteSize() const {
326  return FormParams.getDwarfOffsetByteSize();
327  }
328 
330  assert(StringOffsetsTableContribution);
331  return StringOffsetsTableContribution->getDwarfOffsetByteSize();
332  }
333 
334  uint64_t getStringOffsetsBase() const {
335  assert(StringOffsetsTableContribution);
336  return StringOffsetsTableContribution->Base;
337  }
338 
339  const DWARFAbbreviationDeclarationSet *getAbbreviations() const;
340 
341  uint8_t getUnitType() const { return UnitType; }
342 
343  static bool isMatchingUnitTypeAndTag(uint8_t UnitType, dwarf::Tag Tag) {
344  switch (UnitType) {
345  case dwarf::DW_UT_compile:
346  return Tag == dwarf::DW_TAG_compile_unit;
347  case dwarf::DW_UT_type:
348  return Tag == dwarf::DW_TAG_type_unit;
349  case dwarf::DW_UT_partial:
350  return Tag == dwarf::DW_TAG_partial_unit;
351  case dwarf::DW_UT_skeleton:
352  return Tag == dwarf::DW_TAG_skeleton_unit;
353  case dwarf::DW_UT_split_compile:
354  case dwarf::DW_UT_split_type:
355  return dwarf::isUnitType(Tag);
356  }
357  return false;
358  }
359 
360  /// \brief Return the number of bytes for the header of a unit of
361  /// UnitType type.
362  ///
363  /// This function must be called with a valid unit type which in
364  /// DWARF5 is defined as one of the following six types.
365  static uint32_t getDWARF5HeaderSize(uint8_t UnitType) {
366  switch (UnitType) {
367  case dwarf::DW_UT_compile:
368  case dwarf::DW_UT_partial:
369  return 12;
370  case dwarf::DW_UT_skeleton:
371  case dwarf::DW_UT_split_compile:
372  return 20;
373  case dwarf::DW_UT_type:
374  case dwarf::DW_UT_split_type:
375  return 24;
376  }
377  llvm_unreachable("Invalid UnitType.");
378  }
379 
380  llvm::Optional<BaseAddress> getBaseAddress() const { return BaseAddr; }
381 
382  void setBaseAddress(BaseAddress BaseAddr) { this->BaseAddr = BaseAddr; }
383 
384  DWARFDie getUnitDIE(bool ExtractUnitDIEOnly = true) {
385  extractDIEsIfNeeded(ExtractUnitDIEOnly);
386  if (DieArray.empty())
387  return DWARFDie();
388  return DWARFDie(this, &DieArray[0]);
389  }
390 
391  const char *getCompilationDir();
392  Optional<uint64_t> getDWOId();
393 
394  void collectAddressRanges(DWARFAddressRangesVector &CURanges);
395 
396  /// Returns subprogram DIE with address range encompassing the provided
397  /// address. The pointer is alive as long as parsed compile unit DIEs are not
398  /// cleared.
399  DWARFDie getSubroutineForAddress(uint64_t Address);
400 
401  /// getInlinedChainForAddress - fetches inlined chain for a given address.
402  /// Returns empty chain if there is no subprogram containing address. The
403  /// chain is valid as long as parsed compile unit DIEs are not cleared.
404  void getInlinedChainForAddress(uint64_t Address,
405  SmallVectorImpl<DWARFDie> &InlinedChain);
406 
407  /// getUnitSection - Return the DWARFUnitSection containing this unit.
408  const DWARFUnitSectionBase &getUnitSection() const { return UnitSection; }
409 
410  /// \brief Returns the number of DIEs in the unit. Parses the unit
411  /// if necessary.
412  unsigned getNumDIEs() {
413  extractDIEsIfNeeded(false);
414  return DieArray.size();
415  }
416 
417  /// \brief Return the index of a DIE inside the unit's DIE vector.
418  ///
419  /// It is illegal to call this method with a DIE that hasn't be
420  /// created by this unit. In other word, it's illegal to call this
421  /// method on a DIE that isn't accessible by following
422  /// children/sibling links starting from this unit's getUnitDIE().
424  return getDIEIndex(D.getDebugInfoEntry());
425  }
426 
427  /// \brief Return the DIE object at the given index.
428  DWARFDie getDIEAtIndex(unsigned Index) {
429  assert(Index < DieArray.size());
430  return DWARFDie(this, &DieArray[Index]);
431  }
432 
434  DWARFDie getSibling(const DWARFDebugInfoEntry *Die);
435  DWARFDie getFirstChild(const DWARFDebugInfoEntry *Die);
436 
437  /// \brief Return the DIE object for a given offset inside the
438  /// unit's DIE vector.
439  ///
440  /// The unit needs to have its DIEs extracted for this method to work.
442  extractDIEsIfNeeded(false);
443  assert(!DieArray.empty());
444  auto it = std::lower_bound(
445  DieArray.begin(), DieArray.end(), Offset,
446  [](const DWARFDebugInfoEntry &LHS, uint32_t Offset) {
447  return LHS.getOffset() < Offset;
448  });
449  if (it != DieArray.end() && it->getOffset() == Offset)
450  return DWARFDie(this, &*it);
451  return DWARFDie();
452  }
453 
455  if (IndexEntry)
456  if (const auto *Contrib = IndexEntry->getOffset(DW_SECT_LINE))
457  return Contrib->Offset;
458  return 0;
459  }
460 
462  extractDIEsIfNeeded(false);
463  return die_iterator_range(DieArray.begin(), DieArray.end());
464  }
465 
466 private:
467  /// Size in bytes of the .debug_info data associated with this compile unit.
468  size_t getDebugInfoSize() const { return Length + 4 - getHeaderSize(); }
469 
470  /// extractDIEsIfNeeded - Parses a compile unit and indexes its DIEs if it
471  /// hasn't already been done. Returns the number of DIEs parsed at this call.
472  size_t extractDIEsIfNeeded(bool CUDieOnly);
473 
474  /// extractDIEsToVector - Appends all parsed DIEs to a vector.
475  void extractDIEsToVector(bool AppendCUDie, bool AppendNonCUDIEs,
476  std::vector<DWARFDebugInfoEntry> &DIEs) const;
477 
478  /// clearDIEs - Clear parsed DIEs to keep memory usage low.
479  void clearDIEs(bool KeepCUDie);
480 
481  /// parseDWO - Parses .dwo file for current compile unit. Returns true if
482  /// it was actually constructed.
483  bool parseDWO();
484 };
485 
486 } // end namespace llvm
487 
488 #endif // LLVM_DEBUGINFO_DWARF_DWARFUNIT_H
static bool isMatchingUnitTypeAndTag(uint8_t UnitType, dwarf::Tag Tag)
Definition: DWARFUnit.h:343
uint64_t CallInst * C
const_iterator end(StringRef path)
Get end iterator over path.
Definition: Path.cpp:245
A helper struct providing information about the byte size of DW_FORM values that vary in size dependi...
Definition: Dwarf.h:495
LLVMContext & Context
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
Definition: Path.cpp:236
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
Represents a unit&#39;s contribution to the string offsets table.
Definition: DWARFUnit.h:170
bool isUnitType(uint8_t UnitType)
Definition: Dwarf.h:342
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
dwarf::DwarfFormat getFormat() const
Definition: DWARFUnit.h:322
uint8_t getRefAddrByteSize() const
The definition of the size of form DW_FORM_ref_addr depends on the version.
Definition: Dwarf.h:503
void parseDWO(DWARFContext &C, const DWARFSection &DWOSection, bool Lazy=false)
Definition: DWARFUnit.cpp:41
void setAddrOffsetSection(const DWARFSection *AOS, uint32_t Base)
Definition: DWARFUnit.h:282
void setBaseAddress(BaseAddress BaseAddr)
Definition: DWARFUnit.h:382
const Optional< StrOffsetsContributionDescriptor > & getStringOffsetsTableContribution() const
Definition: DWARFUnit.h:317
uint8_t getRefAddrByteSize() const
Definition: DWARFUnit.h:324
dwarf::DwarfFormat getFormat() const
Definition: DWARFUnit.h:181
uint8_t getDwarfStringOffsetsByteSize() const
Definition: DWARFUnit.h:329
UnitType * getUnitForIndexEntry(const DWARFUnitIndex::Entry &E) override
Definition: DWARFUnit.h:92
const dwarf::FormParams & getFormParams() const
Definition: DWARFUnit.h:320
uint32_t getNextUnitOffset() const
Definition: DWARFUnit.h:313
DwarfFormat
Constants that define the DWARF format as 32 or 64 bit.
Definition: Dwarf.h:65
const DWARFSection & getLineSection() const
Definition: DWARFUnit.h:276
virtual uint32_t getHeaderSize() const
Size in bytes of the unit header.
Definition: DWARFUnit.h:247
const DWARFDebugInfoEntry * getDebugInfoEntry() const
Definition: DWARFDie.h:53
uint8_t getAddressByteSize() const
Definition: DWARFUnit.h:323
UnitType * getUnitForOffset(uint32_t Offset) const override
Returns the Unit that contains the given section offset in the same section this Unit originated from...
Definition: DWARFUnit.h:82
unsigned getNumDIEs()
Returns the number of DIEs in the unit.
Definition: DWARFUnit.h:412
uint64_t Address
Definition: DWARFUnit.h:165
void parse(DWARFContext &C, const DWARFSection &Section)
Definition: DWARFUnit.cpp:33
auto lower_bound(R &&Range, ForwardIt I) -> decltype(adl_begin(Range))
Provide wrappers to std::lower_bound which take ranges instead of having to pass begin/end explicitly...
Definition: STLExtras.h:942
const DWARFSection & getStringOffsetSection() const
Definition: DWARFUnit.h:278
uint16_t getVersion() const
Definition: DWARFUnit.h:321
virtual DWARFUnit * getUnitForOffset(uint32_t Offset) const =0
Returns the Unit that contains the given section offset in the same section this Unit originated from...
die_iterator_range dies()
Definition: DWARFUnit.h:461
Utility class that carries the DWARF compile/type unit and the debug info entry in an object...
Definition: DWARFDie.h:43
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
DWARFSectionKind
static uint32_t getDWARF5HeaderSize(uint8_t UnitType)
Return the number of bytes for the header of a unit of UnitType type.
Definition: DWARFUnit.h:365
StringRef getStringSection() const
Definition: DWARFUnit.h:277
uint32_t getDIEIndex(const DWARFDie &D)
Return the index of a DIE inside the unit&#39;s DIE vector.
Definition: DWARFUnit.h:423
DWARFContext & getContext() const
Definition: DWARFUnit.h:274
void setRangesSection(const DWARFSection *RS, uint32_t Base)
Definition: DWARFUnit.h:290
const DWARFUnitIndex & getDWARFUnitIndex(DWARFContext &Context, DWARFSectionKind Kind)
Definition: DWARFUnit.cpp:425
StrOffsetsContributionDescriptor(uint64_t Base, uint64_t Size, uint8_t Version, dwarf::DwarfFormat Format)
Definition: DWARFUnit.h:176
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
uint64_t SectionIndex
Definition: DWARFUnit.h:166
UnitType
Constants for unit types in DWARF v5.
Definition: Dwarf.h:328
llvm::Optional< BaseAddress > getBaseAddress() const
Definition: DWARFUnit.h:380
A DataExtractor (typically for an in-memory copy of an object-file section) plus a relocation map for...
uint64_t getStringOffsetsBase() const
Definition: DWARFUnit.h:334
DWARFDie getUnitDIE(bool ExtractUnitDIEOnly=true)
Definition: DWARFUnit.h:384
Represents base address of the CU.
Definition: DWARFUnit.h:164
This is a &#39;vector&#39; (really, a variable-sized array), optimized for the case when the array is small...
Definition: SmallVector.h:862
Concrete instance of DWARFUnitSection, specialized for one Unit type.
Definition: DWARFUnit.h:72
DWARFContext This data structure is the top level entity that deals with dwarf debug information pars...
Definition: DWARFContext.h:59
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
A range adaptor for a pair of iterators.
This file contains constants used for implementing Dwarf debug support.
uint32_t getLength() const
Definition: DWARFUnit.h:314
loop extract
static void clear(coro::Shape &Shape)
Definition: Coroutines.cpp:211
DataExtractor getStringExtractor() const
Definition: DWARFUnit.h:300
DWARFDie getDIEAtIndex(unsigned Index)
Return the DIE object at the given index.
Definition: DWARFUnit.h:428
#define I(x, y, z)
Definition: MD5.cpp:58
const DWARFUnitSectionBase & getUnitSection() const
getUnitSection - Return the DWARFUnitSection containing this unit.
Definition: DWARFUnit.h:408
uint32_t getOffset() const
Definition: DWARFUnit.h:312
bool isValidOffset(uint32_t offset) const
Test the validity of offset.
const unsigned Kind
uint8_t getUnitType() const
Definition: DWARFUnit.h:341
DWARFDie getDIEForOffset(uint32_t Offset)
Return the DIE object for a given offset inside the unit&#39;s DIE vector.
Definition: DWARFUnit.h:441
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
DwarfFormat Format
Definition: Dwarf.h:498
Base class for all DWARFUnitSection classes.
Definition: DWARFUnit.h:45
std::vector< DWARFAddressRange > DWARFAddressRangesVector
DWARFAddressRangesVector - represents a set of absolute address ranges.
DWARFDebugInfoEntry - A DIE with only the minimum required data.
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
virtual void parseImpl(DWARFContext &Context, const DWARFObject &Obj, const DWARFSection &Section, const DWARFDebugAbbrev *DA, const DWARFSection *RS, StringRef SS, const DWARFSection &SOS, const DWARFSection *AOS, const DWARFSection &LS, bool isLittleEndian, bool isDWO, bool Lazy)=0
static const Function * getParent(const Value *V)
const Entry * getFromOffset(uint32_t Offset) const
const SectionContribution * getOffset(DWARFSectionKind Sec) const
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
uint8_t getDwarfOffsetByteSize() const
The size of a reference is determined by the DWARF 32/64-bit format.
Definition: Dwarf.h:510
const uint64_t Version
Definition: InstrProf.h:895
uint8_t getDwarfOffsetByteSize() const
Definition: DWARFUnit.h:325
uint32_t getLineTableOffset() const
Definition: DWARFUnit.h:454
virtual DWARFUnit * getUnitForIndexEntry(const DWARFUnitIndex::Entry &E)=0