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