LLVM  8.0.0svn
Dwarf.h
Go to the documentation of this file.
1 //===-- llvm/BinaryFormat/Dwarf.h ---Dwarf Constants-------------*- 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 /// \file
11 /// This file contains constants used for implementing Dwarf
12 /// debug support.
13 ///
14 /// For details on the Dwarf specfication see the latest DWARF Debugging
15 /// Information Format standard document on http://www.dwarfstd.org. This
16 /// file often includes support for non-released standard features.
17 //
18 //===----------------------------------------------------------------------===//
19 
20 #ifndef LLVM_BINARYFORMAT_DWARF_H
21 #define LLVM_BINARYFORMAT_DWARF_H
22 
23 #include "llvm/ADT/Optional.h"
24 #include "llvm/Support/Compiler.h"
25 #include "llvm/Support/DataTypes.h"
27 #include "llvm/Support/Format.h"
29 
30 namespace llvm {
31 class StringRef;
32 
33 namespace dwarf {
34 
35 //===----------------------------------------------------------------------===//
36 // DWARF constants as gleaned from the DWARF Debugging Information Format V.5
37 // reference manual http://www.dwarfstd.org/.
38 //
39 
40 // Do not mix the following two enumerations sets. DW_TAG_invalid changes the
41 // enumeration base type.
42 
44  // LLVM mock tags (see also llvm/BinaryFormat/Dwarf.def).
45  DW_TAG_invalid = ~0U, // Tag for invalid results.
46  DW_VIRTUALITY_invalid = ~0U, // Virtuality for invalid results.
47  DW_MACINFO_invalid = ~0U, // Macinfo type for invalid results.
48 
49  // Other constants.
50  DWARF_VERSION = 4, // Default dwarf version we output.
51  DW_PUBTYPES_VERSION = 2, // Section version number for .debug_pubtypes.
52  DW_PUBNAMES_VERSION = 2, // Section version number for .debug_pubnames.
53  DW_ARANGES_VERSION = 2, // Section version number for .debug_aranges.
54  // Identifiers we use to distinguish vendor extensions.
55  DWARF_VENDOR_DWARF = 0, // Defined in v2 or later of the DWARF standard.
62 };
63 
64 /// Constants that define the DWARF format as 32 or 64 bit.
65 enum DwarfFormat : uint8_t { DWARF32, DWARF64 };
66 
67 /// Special ID values that distinguish a CIE from a FDE in DWARF CFI.
68 /// Not inside an enum because a 64-bit value is needed.
69 /// @{
70 const uint32_t DW_CIE_ID = UINT32_MAX;
71 const uint64_t DW64_CIE_ID = UINT64_MAX;
72 /// @}
73 
74 /// Identifier of an invalid DIE offset in the .debug_info section.
75 const uint32_t DW_INVALID_OFFSET = UINT32_MAX;
76 
77 enum Tag : uint16_t {
78 #define HANDLE_DW_TAG(ID, NAME, VERSION, VENDOR) DW_TAG_##NAME = ID,
79 #include "llvm/BinaryFormat/Dwarf.def"
80  DW_TAG_lo_user = 0x4080,
81  DW_TAG_hi_user = 0xffff,
82  DW_TAG_user_base = 0x1000 ///< Recommended base for user tags.
83 };
84 
85 inline bool isType(Tag T) {
86  switch (T) {
87  case DW_TAG_array_type:
88  case DW_TAG_class_type:
89  case DW_TAG_interface_type:
90  case DW_TAG_enumeration_type:
91  case DW_TAG_pointer_type:
92  case DW_TAG_reference_type:
93  case DW_TAG_rvalue_reference_type:
94  case DW_TAG_string_type:
95  case DW_TAG_structure_type:
96  case DW_TAG_subroutine_type:
97  case DW_TAG_union_type:
98  case DW_TAG_ptr_to_member_type:
99  case DW_TAG_set_type:
100  case DW_TAG_subrange_type:
101  case DW_TAG_base_type:
102  case DW_TAG_const_type:
103  case DW_TAG_file_type:
104  case DW_TAG_packed_type:
105  case DW_TAG_volatile_type:
106  case DW_TAG_typedef:
107  return true;
108  default:
109  return false;
110  }
111 }
112 
113 /// Attributes.
114 enum Attribute : uint16_t {
115 #define HANDLE_DW_AT(ID, NAME, VERSION, VENDOR) DW_AT_##NAME = ID,
116 #include "llvm/BinaryFormat/Dwarf.def"
117  DW_AT_lo_user = 0x2000,
118  DW_AT_hi_user = 0x3fff,
119 };
120 
121 enum Form : uint16_t {
122 #define HANDLE_DW_FORM(ID, NAME, VERSION, VENDOR) DW_FORM_##NAME = ID,
123 #include "llvm/BinaryFormat/Dwarf.def"
124  DW_FORM_lo_user = 0x1f00, ///< Not specified by DWARF.
125 };
126 
128 #define HANDLE_DW_OP(ID, NAME, VERSION, VENDOR) DW_OP_##NAME = ID,
129 #include "llvm/BinaryFormat/Dwarf.def"
132  DW_OP_LLVM_fragment = 0x1000 ///< Only used in LLVM metadata.
133 };
134 
135 enum TypeKind : uint8_t {
136 #define HANDLE_DW_ATE(ID, NAME, VERSION, VENDOR) DW_ATE_##NAME = ID,
137 #include "llvm/BinaryFormat/Dwarf.def"
140 };
141 
143  // Decimal sign attribute values
149 };
150 
152  // Endianity attribute values
153 #define HANDLE_DW_END(ID, NAME) DW_END_##NAME = ID,
154 #include "llvm/BinaryFormat/Dwarf.def"
157 };
158 
160  // Accessibility codes
164 };
165 
167  // Visibility codes
168  DW_VIS_local = 0x01,
171 };
172 
174 #define HANDLE_DW_VIRTUALITY(ID, NAME) DW_VIRTUALITY_##NAME = ID,
175 #include "llvm/BinaryFormat/Dwarf.def"
177 };
178 
180 #define HANDLE_DW_DEFAULTED(ID, NAME) DW_DEFAULTED_##NAME = ID,
181 #include "llvm/BinaryFormat/Dwarf.def"
183 };
184 
186 #define HANDLE_DW_LANG(ID, NAME, VERSION, VENDOR) DW_LANG_##NAME = ID,
187 #include "llvm/BinaryFormat/Dwarf.def"
188  DW_LANG_lo_user = 0x8000,
190 };
191 
193  // Identifier case codes
198 };
199 
201 // Calling convention codes
202 #define HANDLE_DW_CC(ID, NAME) DW_CC_##NAME = ID,
203 #include "llvm/BinaryFormat/Dwarf.def"
206 };
207 
209  // Inline codes
214 };
215 
217  // Array ordering
220 };
221 
223  // Discriminant descriptor values
224  DW_DSC_label = 0x00,
226 };
227 
228 /// Line Number Standard Opcode Encodings.
229 enum LineNumberOps : uint8_t {
230 #define HANDLE_DW_LNS(ID, NAME) DW_LNS_##NAME = ID,
231 #include "llvm/BinaryFormat/Dwarf.def"
232 };
233 
234 /// Line Number Extended Opcode Encodings.
236 #define HANDLE_DW_LNE(ID, NAME) DW_LNE_##NAME = ID,
237 #include "llvm/BinaryFormat/Dwarf.def"
240 };
241 
243 #define HANDLE_DW_LNCT(ID, NAME) DW_LNCT_##NAME = ID,
244 #include "llvm/BinaryFormat/Dwarf.def"
245  DW_LNCT_lo_user = 0x2000,
246  DW_LNCT_hi_user = 0x3fff,
247 };
248 
250  // Macinfo Type Encodings
256 };
257 
258 /// DWARF v5 macro information entry type encodings.
260 #define HANDLE_DW_MACRO(ID, NAME) DW_MACRO_##NAME = ID,
261 #include "llvm/BinaryFormat/Dwarf.def"
264 };
265 
266 /// DWARF v5 range list entry encoding values.
268 #define HANDLE_DW_RLE(ID, NAME) DW_RLE_##NAME = ID,
269 #include "llvm/BinaryFormat/Dwarf.def"
270 };
271 
272 /// Call frame instruction encodings.
274 #define HANDLE_DW_CFA(ID, NAME) DW_CFA_##NAME = ID,
275 #include "llvm/BinaryFormat/Dwarf.def"
277 
280 };
281 
282 enum Constants {
283  // Children flag
286 
304 };
305 
306 /// Constants for location lists in DWARF v5.
307 enum LocationListEntry : unsigned char {
317 };
318 
319 /// Constants for the DW_APPLE_PROPERTY_attributes attribute.
320 /// Keep this list in sync with clang's DeclSpec.h ObjCPropertyAttributeKind!
322 #define HANDLE_DW_APPLE_PROPERTY(ID, NAME) DW_APPLE_PROPERTY_##NAME = ID,
323 #include "llvm/BinaryFormat/Dwarf.def"
324 };
325 
326 /// Constants for unit types in DWARF v5.
327 enum UnitType : unsigned char {
328 #define HANDLE_DW_UT(ID, NAME) DW_UT_##NAME = ID,
329 #include "llvm/BinaryFormat/Dwarf.def"
332 };
333 
334 enum Index {
335 #define HANDLE_DW_IDX(ID, NAME) DW_IDX_##NAME = ID,
336 #include "llvm/BinaryFormat/Dwarf.def"
337  DW_IDX_lo_user = 0x2000,
338  DW_IDX_hi_user = 0x3fff
339 };
340 
341 inline bool isUnitType(uint8_t UnitType) {
342  switch (UnitType) {
343  case DW_UT_compile:
344  case DW_UT_type:
345  case DW_UT_partial:
346  case DW_UT_skeleton:
347  case DW_UT_split_compile:
348  case DW_UT_split_type:
349  return true;
350  default:
351  return false;
352  }
353 }
354 
355 inline bool isUnitType(dwarf::Tag T) {
356  switch (T) {
357  case DW_TAG_compile_unit:
358  case DW_TAG_type_unit:
359  case DW_TAG_partial_unit:
360  case DW_TAG_skeleton_unit:
361  return true;
362  default:
363  return false;
364  }
365 }
366 
367 // Constants for the DWARF v5 Accelerator Table Proposal
369  // Data layout descriptors.
370  DW_ATOM_null = 0u, /// Marker as the end of a list of atoms.
371  DW_ATOM_die_offset = 1u, // DIE offset in the debug_info section.
372  DW_ATOM_cu_offset = 2u, // Offset of the compile unit header that contains the
373  // item in question.
374  DW_ATOM_die_tag = 3u, // A tag entry.
375  DW_ATOM_type_flags = 4u, // Set of flags for a type.
376 
377  DW_ATOM_type_type_flags = 5u, // Dsymutil type extension.
378  DW_ATOM_qual_name_hash = 6u, // Dsymutil qualified hash extension.
379 
380  // DW_ATOM_type_flags values.
381 
382  // Always set for C++, only set for ObjC if this is the @implementation for a
383  // class.
385 
386  // Hash functions.
387 
388  // Daniel J. Bernstein hash.
390 };
391 
392 // Constants for the GNU pubnames/pubtypes extensions supporting gdb index.
402 };
403 
405 
406 /// \defgroup DwarfConstantsDumping Dwarf constants dumping functions
407 ///
408 /// All these functions map their argument's value back to the
409 /// corresponding enumerator name or return an empty StringRef if the value
410 /// isn't known.
411 ///
412 /// @{
413 StringRef TagString(unsigned Tag);
414 StringRef ChildrenString(unsigned Children);
416 StringRef FormEncodingString(unsigned Encoding);
417 StringRef OperationEncodingString(unsigned Encoding);
418 StringRef AttributeEncodingString(unsigned Encoding);
419 StringRef DecimalSignString(unsigned Sign);
420 StringRef EndianityString(unsigned Endian);
421 StringRef AccessibilityString(unsigned Access);
423 StringRef VirtualityString(unsigned Virtuality);
425 StringRef CaseString(unsigned Case);
426 StringRef ConventionString(unsigned Convention);
427 StringRef InlineCodeString(unsigned Code);
428 StringRef ArrayOrderString(unsigned Order);
429 StringRef LNStandardString(unsigned Standard);
430 StringRef LNExtendedString(unsigned Encoding);
431 StringRef MacinfoString(unsigned Encoding);
432 StringRef RangeListEncodingString(unsigned Encoding);
433 StringRef CallFrameString(unsigned Encoding);
435 StringRef UnitTypeString(unsigned);
436 StringRef AtomTypeString(unsigned Atom);
439 StringRef IndexString(unsigned Idx);
440 /// @}
441 
442 /// \defgroup DwarfConstantsParsing Dwarf constants parsing functions
443 ///
444 /// These functions map their strings back to the corresponding enumeration
445 /// value or return 0 if there is none, except for these exceptions:
446 ///
447 /// \li \a getTag() returns \a DW_TAG_invalid on invalid input.
448 /// \li \a getVirtuality() returns \a DW_VIRTUALITY_invalid on invalid input.
449 /// \li \a getMacinfo() returns \a DW_MACINFO_invalid on invalid input.
450 ///
451 /// @{
452 unsigned getTag(StringRef TagString);
453 unsigned getOperationEncoding(StringRef OperationEncodingString);
454 unsigned getVirtuality(StringRef VirtualityString);
455 unsigned getLanguage(StringRef LanguageString);
456 unsigned getCallingConvention(StringRef LanguageString);
457 unsigned getAttributeEncoding(StringRef EncodingString);
458 unsigned getMacinfo(StringRef MacinfoString);
459 /// @}
460 
461 /// \defgroup DwarfConstantsVersioning Dwarf version for constants
462 ///
463 /// For constants defined by DWARF, returns the DWARF version when the constant
464 /// was first defined. For vendor extensions, if there is a version-related
465 /// policy for when to emit it, returns a version number for that policy.
466 /// Otherwise returns 0.
467 ///
468 /// @{
469 unsigned TagVersion(Tag T);
470 unsigned AttributeVersion(Attribute A);
471 unsigned FormVersion(Form F);
474 unsigned LanguageVersion(SourceLanguage L);
475 /// @}
476 
477 /// \defgroup DwarfConstantsVendor Dwarf "vendor" for constants
478 ///
479 /// These functions return an identifier describing "who" defined the constant,
480 /// either the DWARF standard itself or the vendor who defined the extension.
481 ///
482 /// @{
483 unsigned TagVendor(Tag T);
484 unsigned AttributeVendor(Attribute A);
485 unsigned FormVendor(Form F);
486 unsigned OperationVendor(LocationAtom O);
488 unsigned LanguageVendor(SourceLanguage L);
489 /// @}
490 
491 /// A helper struct providing information about the byte size of DW_FORM
492 /// values that vary in size depending on the DWARF version, address byte
493 /// size, or DWARF32/DWARF64.
494 struct FormParams {
495  uint16_t Version;
496  uint8_t AddrSize;
498 
499  /// The definition of the size of form DW_FORM_ref_addr depends on the
500  /// version. In DWARF v2 it's the size of an address; after that, it's the
501  /// size of a reference.
502  uint8_t getRefAddrByteSize() const {
503  if (Version == 2)
504  return AddrSize;
505  return getDwarfOffsetByteSize();
506  }
507 
508  /// The size of a reference is determined by the DWARF 32/64-bit format.
509  uint8_t getDwarfOffsetByteSize() const {
510  switch (Format) {
512  return 4;
514  return 8;
515  }
516  llvm_unreachable("Invalid Format value");
517  }
518 
519  explicit operator bool() const { return Version && AddrSize; }
520 };
521 
522 /// Get the fixed byte size for a given form.
523 ///
524 /// If the form has a fixed byte size, then an Optional with a value will be
525 /// returned. If the form is always encoded using a variable length storage
526 /// format (ULEB or SLEB numbers or blocks) then None will be returned.
527 ///
528 /// \param Form DWARF form to get the fixed byte size for.
529 /// \param Params DWARF parameters to help interpret forms.
530 /// \returns Optional<uint8_t> value with the fixed byte size or None if
531 /// \p Form doesn't have a fixed byte size.
533 
534 /// Tells whether the specified form is defined in the specified version,
535 /// or is an extension if extensions are allowed.
536 bool isValidFormForVersion(Form F, unsigned Version, bool ExtensionsOk = true);
537 
538 /// Returns the symbolic string representing Val when used as a value
539 /// for attribute Attr.
540 StringRef AttributeValueString(uint16_t Attr, unsigned Val);
541 
542 /// Returns the symbolic string representing Val when used as a value
543 /// for atom Atom.
544 StringRef AtomValueString(uint16_t Atom, unsigned Val);
545 
546 /// Describes an entry of the various gnu_pub* debug sections.
547 ///
548 /// The gnu_pub* kind looks like:
549 ///
550 /// 0-3 reserved
551 /// 4-6 symbol kind
552 /// 7 0 == global, 1 == static
553 ///
554 /// A gdb_index descriptor includes the above kind, shifted 24 bits up with the
555 /// offset of the cu within the debug_info section stored in those 24 bits.
560  : Kind(Kind), Linkage(Linkage) {}
562  : Kind(Kind), Linkage(GIEL_EXTERNAL) {}
563  explicit PubIndexEntryDescriptor(uint8_t Value)
564  : Kind(
565  static_cast<GDBIndexEntryKind>((Value & KIND_MASK) >> KIND_OFFSET)),
566  Linkage(static_cast<GDBIndexEntryLinkage>((Value & LINKAGE_MASK) >>
567  LINKAGE_OFFSET)) {}
568  uint8_t toBits() const {
569  return Kind << KIND_OFFSET | Linkage << LINKAGE_OFFSET;
570  }
571 
572 private:
573  enum {
574  KIND_OFFSET = 4,
575  KIND_MASK = 7 << KIND_OFFSET,
576  LINKAGE_OFFSET = 7,
577  LINKAGE_MASK = 1 << LINKAGE_OFFSET
578  };
579 };
580 
581 template <typename Enum> struct EnumTraits : public std::false_type {};
582 
583 template <> struct EnumTraits<Attribute> : public std::true_type {
584  static constexpr char Type[3] = "AT";
585  static constexpr StringRef (*StringFn)(unsigned) = &AttributeString;
586 };
587 
588 template <> struct EnumTraits<Form> : public std::true_type {
589  static constexpr char Type[5] = "FORM";
590  static constexpr StringRef (*StringFn)(unsigned) = &FormEncodingString;
591 };
592 
593 template <> struct EnumTraits<Index> : public std::true_type {
594  static constexpr char Type[4] = "IDX";
595  static constexpr StringRef (*StringFn)(unsigned) = &IndexString;
596 };
597 
598 template <> struct EnumTraits<Tag> : public std::true_type {
599  static constexpr char Type[4] = "TAG";
600  static constexpr StringRef (*StringFn)(unsigned) = &TagString;
601 };
602 } // End of namespace dwarf
603 
604 /// Dwarf constants format_provider
605 ///
606 /// Specialization of the format_provider template for dwarf enums. Unlike the
607 /// dumping functions above, these format unknown enumerator values as
608 /// DW_TYPE_unknown_1234 (e.g. DW_TAG_unknown_ffff).
609 template <typename Enum>
611  Enum, typename std::enable_if<dwarf::EnumTraits<Enum>::value>::type> {
612  static void format(const Enum &E, raw_ostream &OS, StringRef Style) {
614  if (Str.empty()) {
615  OS << "DW_" << dwarf::EnumTraits<Enum>::Type << "_unknown_"
616  << llvm::format("%x", E);
617  } else
618  OS << Str;
619  }
620 };
621 } // End of namespace llvm
622 
623 #endif
DecimalSignEncoding
Definition: Dwarf.h:142
MacinfoRecordType
Definition: Dwarf.h:249
LocationAtom
Definition: Dwarf.h:127
unsigned FormVersion(Form F)
Definition: Dwarf.cpp:116
StringRef ApplePropertyString(unsigned)
Definition: Dwarf.cpp:469
A helper struct providing information about the byte size of DW_FORM values that vary in size dependi...
Definition: Dwarf.h:494
PubIndexEntryDescriptor(GDBIndexEntryKind Kind)
Definition: Dwarf.h:561
StringRef IndexString(unsigned Idx)
Definition: Dwarf.cpp:585
LineNumberOps
Line Number Standard Opcode Encodings.
Definition: Dwarf.h:229
Not specified by DWARF.
Definition: Dwarf.h:124
This class represents lattice values for constants.
Definition: AllocatorList.h:24
StringRef AtomTypeString(unsigned Atom)
Definition: Dwarf.cpp:491
unsigned FormVendor(Form F)
Definition: Dwarf.cpp:127
bool isUnitType(uint8_t UnitType)
Definition: Dwarf.h:341
Attribute
Attributes.
Definition: Dwarf.h:114
StringRef LNExtendedString(unsigned Encoding)
Definition: Dwarf.cpp:407
StringRef LNStandardString(unsigned Standard)
Definition: Dwarf.cpp:396
unsigned TagVendor(Tag T)
Definition: Dwarf.cpp:51
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
Definition: Format.h:124
uint8_t getRefAddrByteSize() const
The definition of the size of form DW_FORM_ref_addr depends on the version.
Definition: Dwarf.h:502
GDBIndexEntryKind
Definition: Dwarf.h:393
F(f)
ArrayDimensionOrdering
Definition: Dwarf.h:216
ELFYAML::ELF_STV Visibility
Definition: ELFYAML.cpp:782
unsigned getVirtuality(StringRef VirtualityString)
Definition: Dwarf.cpp:291
constexpr char Language[]
Key for Kernel::Metadata::mLanguage.
InlineAttribute
Definition: Dwarf.h:208
CallFrameInfo
Call frame instruction encodings.
Definition: Dwarf.h:273
Definition: BitVector.h:938
EndianityEncoding
Definition: Dwarf.h:151
DwarfFormat
Constants that define the DWARF format as 32 or 64 bit.
Definition: Dwarf.h:65
LLVMConstants
Definition: Dwarf.h:43
unsigned TagVersion(Tag T)
Definition: Dwarf.cpp:40
unsigned AttributeVendor(Attribute A)
Definition: Dwarf.cpp:94
StringRef FormEncodingString(unsigned Encoding)
Definition: Dwarf.cpp:105
Only used in LLVM metadata.
Definition: Dwarf.h:132
PubIndexEntryDescriptor(uint8_t Value)
Definition: Dwarf.h:563
unsigned LanguageVendor(SourceLanguage L)
Definition: Dwarf.cpp:329
Describes an entry of the various gnu_pub* debug sections.
Definition: Dwarf.h:556
#define UINT64_MAX
Definition: DataTypes.h:83
MacroEntryType
DWARF v5 macro information entry type encodings.
Definition: Dwarf.h:259
StringRef AttributeString(unsigned Attribute)
Definition: Dwarf.cpp:72
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
Definition: StringRef.h:133
StringRef LanguageString(unsigned Language)
Definition: Dwarf.cpp:299
AccessAttribute
Definition: Dwarf.h:159
StringRef DecimalSignString(unsigned Sign)
Definition: Dwarf.cpp:223
StringRef AttributeValueString(uint16_t Attr, unsigned Val)
Returns the symbolic string representing Val when used as a value for attribute Attr.
Definition: Dwarf.cpp:543
unsigned LanguageVersion(SourceLanguage L)
Definition: Dwarf.cpp:318
StringRef GDBIndexEntryKindString(GDBIndexEntryKind Kind)
Definition: Dwarf.cpp:510
StringRef AccessibilityString(unsigned Access)
Definition: Dwarf.cpp:255
const uint32_t DW_INVALID_OFFSET
Identifier of an invalid DIE offset in the .debug_info section.
Definition: Dwarf.h:75
StringRef EndianityString(unsigned Endian)
Definition: Dwarf.cpp:239
StringRef AttributeEncodingString(unsigned Encoding)
Definition: Dwarf.cpp:182
The instances of the Type class are immutable: once they are created, they are never changed...
Definition: Type.h:46
StringRef CallFrameString(unsigned Encoding)
Definition: Dwarf.cpp:458
unsigned OperationVendor(LocationAtom O)
Definition: Dwarf.cpp:171
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
unsigned getCallingConvention(StringRef LanguageString)
Definition: Dwarf.cpp:365
SourceLanguage
Definition: Dwarf.h:185
unsigned getOperationEncoding(StringRef OperationEncodingString)
Definition: Dwarf.cpp:151
StringRef ArrayOrderString(unsigned Order)
Definition: Dwarf.cpp:386
Recommended base for user tags.
Definition: Dwarf.h:82
unsigned OperationVersion(LocationAtom O)
Definition: Dwarf.cpp:160
StringRef GDBIndexEntryLinkageString(GDBIndexEntryLinkage Linkage)
Definition: Dwarf.cpp:533
GDBIndexEntryLinkage Linkage
Definition: Dwarf.h:558
unsigned getLanguage(StringRef LanguageString)
Definition: Dwarf.cpp:310
StringRef RangeListEncodingString(unsigned Encoding)
Definition: Dwarf.cpp:447
VisibilityAttribute
Definition: Dwarf.h:166
LineNumberExtendedOps
Line Number Extended Opcode Encodings.
Definition: Dwarf.h:235
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
StringRef VirtualityString(unsigned Virtuality)
Definition: Dwarf.cpp:280
StringRef OperationEncodingString(unsigned Encoding)
Definition: Dwarf.cpp:138
const uint32_t DW_CIE_ID
Special ID values that distinguish a CIE from a FDE in DWARF CFI.
Definition: Dwarf.h:70
unsigned getTag(StringRef TagString)
Definition: Dwarf.cpp:32
UnitType
Constants for unit types in DWARF v5.
Definition: Dwarf.h:327
StringRef CaseString(unsigned Case)
Definition: Dwarf.cpp:340
ApplePropertyAttributes
Constants for the DW_APPLE_PROPERTY_attributes attribute.
Definition: Dwarf.h:321
unsigned AttributeVersion(Attribute A)
Definition: Dwarf.cpp:83
static void format(const Enum &E, raw_ostream &OS, StringRef Style)
Definition: Dwarf.h:612
AcceleratorTable
Definition: Dwarf.h:368
LocationListEntry
Constants for location lists in DWARF v5.
Definition: Dwarf.h:307
bool isType(Tag T)
Definition: Dwarf.h:85
PubIndexEntryDescriptor(GDBIndexEntryKind Kind, GDBIndexEntryLinkage Linkage)
Definition: Dwarf.h:559
unsigned AttributeEncodingVersion(TypeKind E)
Definition: Dwarf.cpp:201
StringRef VisibilityString(unsigned Visibility)
Definition: Dwarf.cpp:268
RangeListEntries
DWARF v5 range list entry encoding values.
Definition: Dwarf.h:267
StringRef UnitTypeString(unsigned)
Definition: Dwarf.cpp:480
StringRef AtomValueString(uint16_t Atom, unsigned Val)
Returns the symbolic string representing Val when used as a value for atom Atom.
Definition: Dwarf.cpp:574
Optional< uint8_t > getFixedFormByteSize(dwarf::Form Form, FormParams Params)
Get the fixed byte size for a given form.
Definition: Dwarf.cpp:596
StringRef TagString(unsigned Tag)
Definition: Dwarf.cpp:21
unsigned AttributeEncodingVendor(TypeKind E)
Definition: Dwarf.cpp:212
StringRef InlineCodeString(unsigned Code)
Definition: Dwarf.cpp:372
StringRef ConventionString(unsigned Convention)
Definition: Dwarf.cpp:354
unsigned getMacinfo(StringRef MacinfoString)
Definition: Dwarf.cpp:437
StringRef ChildrenString(unsigned Children)
Definition: Dwarf.cpp:62
bool isValidFormForVersion(Form F, unsigned Version, bool ExtensionsOk=true)
Tells whether the specified form is defined in the specified version, or is an extension if extension...
Definition: Dwarf.cpp:683
const unsigned Kind
CallingConvention
Definition: Dwarf.h:200
DwarfFormat Format
Definition: Dwarf.h:497
VirtualityAttribute
Definition: Dwarf.h:173
LLVM Value Representation.
Definition: Value.h:73
unsigned getAttributeEncoding(StringRef EncodingString)
Definition: Dwarf.cpp:193
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:46
GDBIndexEntryLinkage
Definition: Dwarf.h:404
DiscriminantList
Definition: Dwarf.h:222
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
StringRef MacinfoString(unsigned Encoding)
Definition: Dwarf.cpp:418
Marker as the end of a list of atoms.
Definition: Dwarf.h:371
LineNumberEntryFormat
Definition: Dwarf.h:242
CaseSensitivity
Definition: Dwarf.h:192
uint8_t getDwarfOffsetByteSize() const
The size of a reference is determined by the DWARF 32/64-bit format.
Definition: Dwarf.h:509
DefaultedMemberAttribute
Definition: Dwarf.h:179
const uint64_t DW64_CIE_ID
Definition: Dwarf.h:71