LLVM  10.0.0svn
Dwarf.h
Go to the documentation of this file.
1 //===-- llvm/BinaryFormat/Dwarf.h ---Dwarf Constants-------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 /// \file
10 /// This file contains constants used for implementing Dwarf
11 /// debug support.
12 ///
13 /// For details on the Dwarf specfication see the latest DWARF Debugging
14 /// Information Format standard document on http://www.dwarfstd.org. This
15 /// file often includes support for non-released standard features.
16 //
17 //===----------------------------------------------------------------------===//
18 
19 #ifndef LLVM_BINARYFORMAT_DWARF_H
20 #define LLVM_BINARYFORMAT_DWARF_H
21 
22 #include "llvm/ADT/Optional.h"
23 #include "llvm/Support/Compiler.h"
24 #include "llvm/Support/DataTypes.h"
26 #include "llvm/Support/Format.h"
28 #include "llvm/ADT/Triple.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  DW_OP_LLVM_convert = 0x1001, ///< Only used in LLVM metadata.
134  DW_OP_LLVM_tag_offset = 0x1002, ///< Only used in LLVM metadata.
135 };
136 
137 enum TypeKind : uint8_t {
138 #define HANDLE_DW_ATE(ID, NAME, VERSION, VENDOR) DW_ATE_##NAME = ID,
139 #include "llvm/BinaryFormat/Dwarf.def"
142 };
143 
145  // Decimal sign attribute values
151 };
152 
154  // Endianity attribute values
155 #define HANDLE_DW_END(ID, NAME) DW_END_##NAME = ID,
156 #include "llvm/BinaryFormat/Dwarf.def"
159 };
160 
162  // Accessibility codes
166 };
167 
169  // Visibility codes
170  DW_VIS_local = 0x01,
173 };
174 
176 #define HANDLE_DW_VIRTUALITY(ID, NAME) DW_VIRTUALITY_##NAME = ID,
177 #include "llvm/BinaryFormat/Dwarf.def"
179 };
180 
182 #define HANDLE_DW_DEFAULTED(ID, NAME) DW_DEFAULTED_##NAME = ID,
183 #include "llvm/BinaryFormat/Dwarf.def"
185 };
186 
188 #define HANDLE_DW_LANG(ID, NAME, LOWER_BOUND, VERSION, VENDOR) \
189  DW_LANG_##NAME = ID,
190 #include "llvm/BinaryFormat/Dwarf.def"
191  DW_LANG_lo_user = 0x8000,
193 };
194 
196  // Identifier case codes
201 };
202 
204 // Calling convention codes
205 #define HANDLE_DW_CC(ID, NAME) DW_CC_##NAME = ID,
206 #include "llvm/BinaryFormat/Dwarf.def"
209 };
210 
212  // Inline codes
217 };
218 
220  // Array ordering
223 };
224 
226  // Discriminant descriptor values
227  DW_DSC_label = 0x00,
229 };
230 
231 /// Line Number Standard Opcode Encodings.
232 enum LineNumberOps : uint8_t {
233 #define HANDLE_DW_LNS(ID, NAME) DW_LNS_##NAME = ID,
234 #include "llvm/BinaryFormat/Dwarf.def"
235 };
236 
237 /// Line Number Extended Opcode Encodings.
239 #define HANDLE_DW_LNE(ID, NAME) DW_LNE_##NAME = ID,
240 #include "llvm/BinaryFormat/Dwarf.def"
243 };
244 
246 #define HANDLE_DW_LNCT(ID, NAME) DW_LNCT_##NAME = ID,
247 #include "llvm/BinaryFormat/Dwarf.def"
248  DW_LNCT_lo_user = 0x2000,
249  DW_LNCT_hi_user = 0x3fff,
250 };
251 
253  // Macinfo Type Encodings
259 };
260 
261 /// DWARF v5 macro information entry type encodings.
263 #define HANDLE_DW_MACRO(ID, NAME) DW_MACRO_##NAME = ID,
264 #include "llvm/BinaryFormat/Dwarf.def"
267 };
268 
269 /// DWARF v5 range list entry encoding values.
271 #define HANDLE_DW_RLE(ID, NAME) DW_RLE_##NAME = ID,
272 #include "llvm/BinaryFormat/Dwarf.def"
273 };
274 
275 /// Call frame instruction encodings.
277 #define HANDLE_DW_CFA(ID, NAME) DW_CFA_##NAME = ID,
278 #define HANDLE_DW_CFA_PRED(ID, NAME, ARCH) DW_CFA_##NAME = ID,
279 #include "llvm/BinaryFormat/Dwarf.def"
281 
284 };
285 
286 enum Constants {
287  // Children flag
290 
308 };
309 
310 /// Constants for location lists in DWARF v5.
311 enum LocationListEntry : unsigned char {
321 };
322 
323 /// Constants for the DW_APPLE_PROPERTY_attributes attribute.
324 /// Keep this list in sync with clang's DeclSpec.h ObjCPropertyAttributeKind!
326 #define HANDLE_DW_APPLE_PROPERTY(ID, NAME) DW_APPLE_PROPERTY_##NAME = ID,
327 #include "llvm/BinaryFormat/Dwarf.def"
328 };
329 
330 /// Constants for unit types in DWARF v5.
331 enum UnitType : unsigned char {
332 #define HANDLE_DW_UT(ID, NAME) DW_UT_##NAME = ID,
333 #include "llvm/BinaryFormat/Dwarf.def"
336 };
337 
338 enum Index {
339 #define HANDLE_DW_IDX(ID, NAME) DW_IDX_##NAME = ID,
340 #include "llvm/BinaryFormat/Dwarf.def"
341  DW_IDX_lo_user = 0x2000,
342  DW_IDX_hi_user = 0x3fff
343 };
344 
345 inline bool isUnitType(uint8_t UnitType) {
346  switch (UnitType) {
347  case DW_UT_compile:
348  case DW_UT_type:
349  case DW_UT_partial:
350  case DW_UT_skeleton:
351  case DW_UT_split_compile:
352  case DW_UT_split_type:
353  return true;
354  default:
355  return false;
356  }
357 }
358 
359 inline bool isUnitType(dwarf::Tag T) {
360  switch (T) {
361  case DW_TAG_compile_unit:
362  case DW_TAG_type_unit:
363  case DW_TAG_partial_unit:
364  case DW_TAG_skeleton_unit:
365  return true;
366  default:
367  return false;
368  }
369 }
370 
371 // Constants for the DWARF v5 Accelerator Table Proposal
373  // Data layout descriptors.
374  DW_ATOM_null = 0u, /// Marker as the end of a list of atoms.
375  DW_ATOM_die_offset = 1u, // DIE offset in the debug_info section.
376  DW_ATOM_cu_offset = 2u, // Offset of the compile unit header that contains the
377  // item in question.
378  DW_ATOM_die_tag = 3u, // A tag entry.
379  DW_ATOM_type_flags = 4u, // Set of flags for a type.
380 
381  DW_ATOM_type_type_flags = 5u, // Dsymutil type extension.
382  DW_ATOM_qual_name_hash = 6u, // Dsymutil qualified hash extension.
383 
384  // DW_ATOM_type_flags values.
385 
386  // Always set for C++, only set for ObjC if this is the @implementation for a
387  // class.
389 
390  // Hash functions.
391 
392  // Daniel J. Bernstein hash.
394 };
395 
396 // Constants for the GNU pubnames/pubtypes extensions supporting gdb index.
406 };
407 
409 
410 /// \defgroup DwarfConstantsDumping Dwarf constants dumping functions
411 ///
412 /// All these functions map their argument's value back to the
413 /// corresponding enumerator name or return an empty StringRef if the value
414 /// isn't known.
415 ///
416 /// @{
417 StringRef TagString(unsigned Tag);
418 StringRef ChildrenString(unsigned Children);
420 StringRef FormEncodingString(unsigned Encoding);
421 StringRef OperationEncodingString(unsigned Encoding);
422 StringRef AttributeEncodingString(unsigned Encoding);
423 StringRef DecimalSignString(unsigned Sign);
424 StringRef EndianityString(unsigned Endian);
425 StringRef AccessibilityString(unsigned Access);
427 StringRef VirtualityString(unsigned Virtuality);
429 StringRef CaseString(unsigned Case);
430 StringRef ConventionString(unsigned Convention);
431 StringRef InlineCodeString(unsigned Code);
432 StringRef ArrayOrderString(unsigned Order);
433 StringRef LNStandardString(unsigned Standard);
434 StringRef LNExtendedString(unsigned Encoding);
435 StringRef MacinfoString(unsigned Encoding);
436 StringRef RangeListEncodingString(unsigned Encoding);
437 StringRef CallFrameString(unsigned Encoding, Triple::ArchType Arch);
439 StringRef UnitTypeString(unsigned);
440 StringRef AtomTypeString(unsigned Atom);
443 StringRef IndexString(unsigned Idx);
444 /// @}
445 
446 /// \defgroup DwarfConstantsParsing Dwarf constants parsing functions
447 ///
448 /// These functions map their strings back to the corresponding enumeration
449 /// value or return 0 if there is none, except for these exceptions:
450 ///
451 /// \li \a getTag() returns \a DW_TAG_invalid on invalid input.
452 /// \li \a getVirtuality() returns \a DW_VIRTUALITY_invalid on invalid input.
453 /// \li \a getMacinfo() returns \a DW_MACINFO_invalid on invalid input.
454 ///
455 /// @{
456 unsigned getTag(StringRef TagString);
457 unsigned getOperationEncoding(StringRef OperationEncodingString);
458 unsigned getVirtuality(StringRef VirtualityString);
459 unsigned getLanguage(StringRef LanguageString);
460 unsigned getCallingConvention(StringRef LanguageString);
461 unsigned getAttributeEncoding(StringRef EncodingString);
462 unsigned getMacinfo(StringRef MacinfoString);
463 /// @}
464 
465 /// \defgroup DwarfConstantsVersioning Dwarf version for constants
466 ///
467 /// For constants defined by DWARF, returns the DWARF version when the constant
468 /// was first defined. For vendor extensions, if there is a version-related
469 /// policy for when to emit it, returns a version number for that policy.
470 /// Otherwise returns 0.
471 ///
472 /// @{
473 unsigned TagVersion(Tag T);
474 unsigned AttributeVersion(Attribute A);
475 unsigned FormVersion(Form F);
478 unsigned LanguageVersion(SourceLanguage L);
479 /// @}
480 
481 /// \defgroup DwarfConstantsVendor Dwarf "vendor" for constants
482 ///
483 /// These functions return an identifier describing "who" defined the constant,
484 /// either the DWARF standard itself or the vendor who defined the extension.
485 ///
486 /// @{
487 unsigned TagVendor(Tag T);
488 unsigned AttributeVendor(Attribute A);
489 unsigned FormVendor(Form F);
490 unsigned OperationVendor(LocationAtom O);
492 unsigned LanguageVendor(SourceLanguage L);
493 /// @}
494 
496 
497 /// A helper struct providing information about the byte size of DW_FORM
498 /// values that vary in size depending on the DWARF version, address byte
499 /// size, or DWARF32/DWARF64.
500 struct FormParams {
501  uint16_t Version;
502  uint8_t AddrSize;
504 
505  /// The definition of the size of form DW_FORM_ref_addr depends on the
506  /// version. In DWARF v2 it's the size of an address; after that, it's the
507  /// size of a reference.
508  uint8_t getRefAddrByteSize() const {
509  if (Version == 2)
510  return AddrSize;
511  return getDwarfOffsetByteSize();
512  }
513 
514  /// The size of a reference is determined by the DWARF 32/64-bit format.
515  uint8_t getDwarfOffsetByteSize() const {
516  switch (Format) {
518  return 4;
520  return 8;
521  }
522  llvm_unreachable("Invalid Format value");
523  }
524 
525  explicit operator bool() const { return Version && AddrSize; }
526 };
527 
528 /// Get the fixed byte size for a given form.
529 ///
530 /// If the form has a fixed byte size, then an Optional with a value will be
531 /// returned. If the form is always encoded using a variable length storage
532 /// format (ULEB or SLEB numbers or blocks) then None will be returned.
533 ///
534 /// \param Form DWARF form to get the fixed byte size for.
535 /// \param Params DWARF parameters to help interpret forms.
536 /// \returns Optional<uint8_t> value with the fixed byte size or None if
537 /// \p Form doesn't have a fixed byte size.
539 
540 /// Tells whether the specified form is defined in the specified version,
541 /// or is an extension if extensions are allowed.
542 bool isValidFormForVersion(Form F, unsigned Version, bool ExtensionsOk = true);
543 
544 /// Returns the symbolic string representing Val when used as a value
545 /// for attribute Attr.
546 StringRef AttributeValueString(uint16_t Attr, unsigned Val);
547 
548 /// Returns the symbolic string representing Val when used as a value
549 /// for atom Atom.
550 StringRef AtomValueString(uint16_t Atom, unsigned Val);
551 
552 /// Describes an entry of the various gnu_pub* debug sections.
553 ///
554 /// The gnu_pub* kind looks like:
555 ///
556 /// 0-3 reserved
557 /// 4-6 symbol kind
558 /// 7 0 == global, 1 == static
559 ///
560 /// A gdb_index descriptor includes the above kind, shifted 24 bits up with the
561 /// offset of the cu within the debug_info section stored in those 24 bits.
566  : Kind(Kind), Linkage(Linkage) {}
568  : Kind(Kind), Linkage(GIEL_EXTERNAL) {}
569  explicit PubIndexEntryDescriptor(uint8_t Value)
570  : Kind(
571  static_cast<GDBIndexEntryKind>((Value & KIND_MASK) >> KIND_OFFSET)),
572  Linkage(static_cast<GDBIndexEntryLinkage>((Value & LINKAGE_MASK) >>
573  LINKAGE_OFFSET)) {}
574  uint8_t toBits() const {
575  return Kind << KIND_OFFSET | Linkage << LINKAGE_OFFSET;
576  }
577 
578 private:
579  enum {
580  KIND_OFFSET = 4,
581  KIND_MASK = 7 << KIND_OFFSET,
582  LINKAGE_OFFSET = 7,
583  LINKAGE_MASK = 1 << LINKAGE_OFFSET
584  };
585 };
586 
587 template <typename Enum> struct EnumTraits : public std::false_type {};
588 
589 template <> struct EnumTraits<Attribute> : public std::true_type {
590  static constexpr char Type[3] = "AT";
591  static constexpr StringRef (*StringFn)(unsigned) = &AttributeString;
592 };
593 
594 template <> struct EnumTraits<Form> : public std::true_type {
595  static constexpr char Type[5] = "FORM";
596  static constexpr StringRef (*StringFn)(unsigned) = &FormEncodingString;
597 };
598 
599 template <> struct EnumTraits<Index> : public std::true_type {
600  static constexpr char Type[4] = "IDX";
601  static constexpr StringRef (*StringFn)(unsigned) = &IndexString;
602 };
603 
604 template <> struct EnumTraits<Tag> : public std::true_type {
605  static constexpr char Type[4] = "TAG";
606  static constexpr StringRef (*StringFn)(unsigned) = &TagString;
607 };
608 } // End of namespace dwarf
609 
610 /// Dwarf constants format_provider
611 ///
612 /// Specialization of the format_provider template for dwarf enums. Unlike the
613 /// dumping functions above, these format unknown enumerator values as
614 /// DW_TYPE_unknown_1234 (e.g. DW_TAG_unknown_ffff).
615 template <typename Enum>
617  Enum, typename std::enable_if<dwarf::EnumTraits<Enum>::value>::type> {
618  static void format(const Enum &E, raw_ostream &OS, StringRef Style) {
620  if (Str.empty()) {
621  OS << "DW_" << dwarf::EnumTraits<Enum>::Type << "_unknown_"
622  << llvm::format("%x", E);
623  } else
624  OS << Str;
625  }
626 };
627 } // End of namespace llvm
628 
629 #endif
DecimalSignEncoding
Definition: Dwarf.h:144
MacinfoRecordType
Definition: Dwarf.h:252
LocationAtom
Definition: Dwarf.h:127
unsigned FormVersion(Form F)
Definition: Dwarf.cpp:116
StringRef ApplePropertyString(unsigned)
Definition: Dwarf.cpp:504
A helper struct providing information about the byte size of DW_FORM values that vary in size dependi...
Definition: Dwarf.h:500
PubIndexEntryDescriptor(GDBIndexEntryKind Kind)
Definition: Dwarf.h:567
StringRef IndexString(unsigned Idx)
Definition: Dwarf.cpp:620
LineNumberOps
Line Number Standard Opcode Encodings.
Definition: Dwarf.h:232
Not specified by DWARF.
Definition: Dwarf.h:124
This class represents lattice values for constants.
Definition: AllocatorList.h:23
StringRef AtomTypeString(unsigned Atom)
Definition: Dwarf.cpp:526
unsigned FormVendor(Form F)
Definition: Dwarf.cpp:127
bool isUnitType(uint8_t UnitType)
Definition: Dwarf.h:345
Attribute
Attributes.
Definition: Dwarf.h:114
StringRef LNExtendedString(unsigned Encoding)
Definition: Dwarf.cpp:424
StringRef LNStandardString(unsigned Standard)
Definition: Dwarf.cpp:413
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:123
uint8_t getRefAddrByteSize() const
The definition of the size of form DW_FORM_ref_addr depends on the version.
Definition: Dwarf.h:508
Only used in LLVM metadata.
Definition: Dwarf.h:133
GDBIndexEntryKind
Definition: Dwarf.h:397
F(f)
ArrayDimensionOrdering
Definition: Dwarf.h:219
ELFYAML::ELF_STV Visibility
Definition: ELFYAML.cpp:876
Optional< unsigned > LanguageLowerBound(SourceLanguage L)
Definition: Dwarf.cpp:346
unsigned getVirtuality(StringRef VirtualityString)
Definition: Dwarf.cpp:297
constexpr char Language[]
Key for Kernel::Metadata::mLanguage.
StringRef CallFrameString(unsigned Encoding, Triple::ArchType Arch)
Definition: Dwarf.cpp:475
InlineAttribute
Definition: Dwarf.h:211
CallFrameInfo
Call frame instruction encodings.
Definition: Dwarf.h:276
Definition: BitVector.h:937
EndianityEncoding
Definition: Dwarf.h:153
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:569
LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
Definition: StringRef.h:126
unsigned LanguageVendor(SourceLanguage L)
Definition: Dwarf.cpp:335
Describes an entry of the various gnu_pub* debug sections.
Definition: Dwarf.h:562
#define UINT64_MAX
Definition: DataTypes.h:83
MacroEntryType
DWARF v5 macro information entry type encodings.
Definition: Dwarf.h:262
StringRef AttributeString(unsigned Attribute)
Definition: Dwarf.cpp:72
StringRef LanguageString(unsigned Language)
Definition: Dwarf.cpp:305
AccessAttribute
Definition: Dwarf.h:161
StringRef DecimalSignString(unsigned Sign)
Definition: Dwarf.cpp:229
StringRef AttributeValueString(uint16_t Attr, unsigned Val)
Returns the symbolic string representing Val when used as a value for attribute Attr.
Definition: Dwarf.cpp:578
unsigned LanguageVersion(SourceLanguage L)
Definition: Dwarf.cpp:324
StringRef GDBIndexEntryKindString(GDBIndexEntryKind Kind)
Definition: Dwarf.cpp:545
StringRef AccessibilityString(unsigned Access)
Definition: Dwarf.cpp:261
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:245
StringRef AttributeEncodingString(unsigned Encoding)
Definition: Dwarf.cpp:188
The instances of the Type class are immutable: once they are created, they are never changed...
Definition: Type.h:45
unsigned OperationVendor(LocationAtom O)
Definition: Dwarf.cpp:177
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
unsigned getCallingConvention(StringRef LanguageString)
Definition: Dwarf.cpp:382
Only used in LLVM metadata.
Definition: Dwarf.h:134
SourceLanguage
Definition: Dwarf.h:187
unsigned getOperationEncoding(StringRef OperationEncodingString)
Definition: Dwarf.cpp:155
StringRef ArrayOrderString(unsigned Order)
Definition: Dwarf.cpp:403
Recommended base for user tags.
Definition: Dwarf.h:82
unsigned OperationVersion(LocationAtom O)
Definition: Dwarf.cpp:166
StringRef GDBIndexEntryLinkageString(GDBIndexEntryLinkage Linkage)
Definition: Dwarf.cpp:568
GDBIndexEntryLinkage Linkage
Definition: Dwarf.h:564
unsigned getLanguage(StringRef LanguageString)
Definition: Dwarf.cpp:316
StringRef RangeListEncodingString(unsigned Encoding)
Definition: Dwarf.cpp:464
VisibilityAttribute
Definition: Dwarf.h:168
LineNumberExtendedOps
Line Number Extended Opcode Encodings.
Definition: Dwarf.h:238
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
StringRef VirtualityString(unsigned Virtuality)
Definition: Dwarf.cpp:286
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:331
StringRef CaseString(unsigned Case)
Definition: Dwarf.cpp:357
ApplePropertyAttributes
Constants for the DW_APPLE_PROPERTY_attributes attribute.
Definition: Dwarf.h:325
unsigned AttributeVersion(Attribute A)
Definition: Dwarf.cpp:83
static void format(const Enum &E, raw_ostream &OS, StringRef Style)
Definition: Dwarf.h:618
AcceleratorTable
Definition: Dwarf.h:372
LocationListEntry
Constants for location lists in DWARF v5.
Definition: Dwarf.h:311
bool isType(Tag T)
Definition: Dwarf.h:85
PubIndexEntryDescriptor(GDBIndexEntryKind Kind, GDBIndexEntryLinkage Linkage)
Definition: Dwarf.h:565
unsigned AttributeEncodingVersion(TypeKind E)
Definition: Dwarf.cpp:207
StringRef VisibilityString(unsigned Visibility)
Definition: Dwarf.cpp:274
RangeListEntries
DWARF v5 range list entry encoding values.
Definition: Dwarf.h:270
StringRef UnitTypeString(unsigned)
Definition: Dwarf.cpp:515
StringRef AtomValueString(uint16_t Atom, unsigned Val)
Returns the symbolic string representing Val when used as a value for atom Atom.
Definition: Dwarf.cpp:609
Optional< uint8_t > getFixedFormByteSize(dwarf::Form Form, FormParams Params)
Get the fixed byte size for a given form.
Definition: Dwarf.cpp:631
StringRef TagString(unsigned Tag)
Definition: Dwarf.cpp:21
unsigned AttributeEncodingVendor(TypeKind E)
Definition: Dwarf.cpp:218
StringRef InlineCodeString(unsigned Code)
Definition: Dwarf.cpp:389
StringRef ConventionString(unsigned Convention)
Definition: Dwarf.cpp:371
unsigned getMacinfo(StringRef MacinfoString)
Definition: Dwarf.cpp:454
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:718
CallingConvention
Definition: Dwarf.h:203
DwarfFormat Format
Definition: Dwarf.h:503
VirtualityAttribute
Definition: Dwarf.h:175
LLVM Value Representation.
Definition: Value.h:72
unsigned getAttributeEncoding(StringRef EncodingString)
Definition: Dwarf.cpp:199
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:45
GDBIndexEntryLinkage
Definition: Dwarf.h:408
DiscriminantList
Definition: Dwarf.h:225
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48
StringRef MacinfoString(unsigned Encoding)
Definition: Dwarf.cpp:435
Marker as the end of a list of atoms.
Definition: Dwarf.h:375
LineNumberEntryFormat
Definition: Dwarf.h:245
CaseSensitivity
Definition: Dwarf.h:195
uint8_t getDwarfOffsetByteSize() const
The size of a reference is determined by the DWARF 32/64-bit format.
Definition: Dwarf.h:515
DefaultedMemberAttribute
Definition: Dwarf.h:181
const uint64_t DW64_CIE_ID
Definition: Dwarf.h:71