19 using namespace dwarf;
25 #define HANDLE_DW_TAG(ID, NAME, VERSION, VENDOR) \ 27 return "DW_TAG_" #NAME; 28 #include "llvm/BinaryFormat/Dwarf.def" 35 .Case(
"DW_TAG_" #NAME, DW_TAG_##NAME)
36 #include "llvm/BinaryFormat/Dwarf.def" 44 #define HANDLE_DW_TAG(ID, NAME, VERSION, VENDOR) \ 47 #include "llvm/BinaryFormat/Dwarf.def" 55 #define HANDLE_DW_TAG(ID, NAME, VERSION, VENDOR) \ 57 return DWARF_VENDOR_##VENDOR; 58 #include "llvm/BinaryFormat/Dwarf.def" 65 return "DW_CHILDREN_no";
67 return "DW_CHILDREN_yes";
76 #define HANDLE_DW_AT(ID, NAME, VERSION, VENDOR) \ 78 return "DW_AT_" #NAME; 79 #include "llvm/BinaryFormat/Dwarf.def" 87 #define HANDLE_DW_AT(ID, NAME, VERSION, VENDOR) \ 90 #include "llvm/BinaryFormat/Dwarf.def" 98 #define HANDLE_DW_AT(ID, NAME, VERSION, VENDOR) \ 100 return DWARF_VENDOR_##VENDOR; 101 #include "llvm/BinaryFormat/Dwarf.def" 109 #define HANDLE_DW_FORM(ID, NAME, VERSION, VENDOR) \ 110 case DW_FORM_##NAME: \ 111 return "DW_FORM_" #NAME; 112 #include "llvm/BinaryFormat/Dwarf.def" 120 #define HANDLE_DW_FORM(ID, NAME, VERSION, VENDOR) \ 121 case DW_FORM_##NAME: \ 123 #include "llvm/BinaryFormat/Dwarf.def" 131 #define HANDLE_DW_FORM(ID, NAME, VERSION, VENDOR) \ 132 case DW_FORM_##NAME: \ 133 return DWARF_VENDOR_##VENDOR; 134 #include "llvm/BinaryFormat/Dwarf.def" 142 #define HANDLE_DW_OP(ID, NAME, VERSION, VENDOR) \ 144 return "DW_OP_" #NAME; 145 #include "llvm/BinaryFormat/Dwarf.def" 147 return "DW_OP_LLVM_fragment";
154 .Case(
"DW_OP_" #NAME, DW_OP_##NAME)
155 #include "llvm/BinaryFormat/Dwarf.def" 164 #define HANDLE_DW_OP(ID, NAME, VERSION, VENDOR) \ 167 #include "llvm/BinaryFormat/Dwarf.def" 175 #define HANDLE_DW_OP(ID, NAME, VERSION, VENDOR) \ 177 return DWARF_VENDOR_##VENDOR; 178 #include "llvm/BinaryFormat/Dwarf.def" 186 #define HANDLE_DW_ATE(ID, NAME, VERSION, VENDOR) \ 187 case DW_ATE_##NAME: \ 188 return "DW_ATE_" #NAME; 189 #include "llvm/BinaryFormat/Dwarf.def" 196 .Case(
"DW_ATE_" #NAME, DW_ATE_##NAME)
197 #include "llvm/BinaryFormat/Dwarf.def" 205 #define HANDLE_DW_ATE(ID, NAME, VERSION, VENDOR) \ 206 case DW_ATE_##NAME: \ 208 #include "llvm/BinaryFormat/Dwarf.def" 216 #define HANDLE_DW_ATE(ID, NAME, VERSION, VENDOR) \ 217 case DW_ATE_##NAME: \ 218 return DWARF_VENDOR_##VENDOR; 219 #include "llvm/BinaryFormat/Dwarf.def" 226 return "DW_DS_unsigned";
228 return "DW_DS_leading_overpunch";
230 return "DW_DS_trailing_overpunch";
232 return "DW_DS_leading_separate";
234 return "DW_DS_trailing_separate";
242 return "DW_END_default";
246 return "DW_END_little";
248 return "DW_END_lo_user";
250 return "DW_END_hi_user";
259 return "DW_ACCESS_public";
261 return "DW_ACCESS_protected";
263 return "DW_ACCESS_private";
269 switch (Visibility) {
271 return "DW_VIS_local";
273 return "DW_VIS_exported";
275 return "DW_VIS_qualified";
281 switch (Virtuality) {
284 #define HANDLE_DW_VIRTUALITY(ID, NAME) \ 285 case DW_VIRTUALITY_##NAME: \ 286 return "DW_VIRTUALITY_" #NAME; 287 #include "llvm/BinaryFormat/Dwarf.def" 294 .Case(
"DW_VIRTUALITY_" #NAME, DW_VIRTUALITY_##NAME)
295 #include "llvm/BinaryFormat/Dwarf.def" 303 #define HANDLE_DW_LANG(ID, NAME, VERSION, VENDOR) \ 304 case DW_LANG_##NAME: \ 305 return "DW_LANG_" #NAME; 306 #include "llvm/BinaryFormat/Dwarf.def" 313 .Case(
"DW_LANG_" #NAME, DW_LANG_##NAME)
314 #include "llvm/BinaryFormat/Dwarf.def" 322 #define HANDLE_DW_LANG(ID, NAME, VERSION, VENDOR) \ 323 case DW_LANG_##NAME: \ 325 #include "llvm/BinaryFormat/Dwarf.def" 333 #define HANDLE_DW_LANG(ID, NAME, VERSION, VENDOR) \ 334 case DW_LANG_##NAME: \ 335 return DWARF_VENDOR_##VENDOR; 336 #include "llvm/BinaryFormat/Dwarf.def" 343 return "DW_ID_case_sensitive";
345 return "DW_ID_up_case";
347 return "DW_ID_down_case";
349 return "DW_ID_case_insensitive";
358 #define HANDLE_DW_CC(ID, NAME) \ 360 return "DW_CC_" #NAME; 361 #include "llvm/BinaryFormat/Dwarf.def" 367 #define
HANDLE_DW_CC(
ID, NAME) .Case(
"DW_CC_" #NAME, DW_CC_##NAME)
368 #include "llvm/BinaryFormat/Dwarf.def" 375 return "DW_INL_not_inlined";
377 return "DW_INL_inlined";
379 return "DW_INL_declared_not_inlined";
381 return "DW_INL_declared_inlined";
389 return "DW_ORD_row_major";
391 return "DW_ORD_col_major";
400 #define HANDLE_DW_LNS(ID, NAME) \ 401 case DW_LNS_##NAME: \ 402 return "DW_LNS_" #NAME; 403 #include "llvm/BinaryFormat/Dwarf.def" 411 #define HANDLE_DW_LNE(ID, NAME) \ 412 case DW_LNE_##NAME: \ 413 return "DW_LNE_" #NAME; 414 #include "llvm/BinaryFormat/Dwarf.def" 422 return "DW_MACINFO_define";
424 return "DW_MACINFO_undef";
426 return "DW_MACINFO_start_file";
428 return "DW_MACINFO_end_file";
430 return "DW_MACINFO_vendor_ext";
432 return "DW_MACINFO_invalid";
451 #define HANDLE_DW_RLE(ID, NAME) \ 452 case DW_RLE_##NAME: \ 453 return "DW_RLE_" #NAME; 454 #include "llvm/BinaryFormat/Dwarf.def" 462 #define HANDLE_DW_CFA(ID, NAME) \ 463 case DW_CFA_##NAME: \ 464 return "DW_CFA_" #NAME; 465 #include "llvm/BinaryFormat/Dwarf.def" 473 #define HANDLE_DW_APPLE_PROPERTY(ID, NAME) \ 474 case DW_APPLE_PROPERTY_##NAME: \ 475 return "DW_APPLE_PROPERTY_" #NAME; 476 #include "llvm/BinaryFormat/Dwarf.def" 484 #define HANDLE_DW_UT(ID, NAME) \ 486 return "DW_UT_" #NAME; 487 #include "llvm/BinaryFormat/Dwarf.def" 494 return "DW_ATOM_null";
496 return "DW_ATOM_die_offset";
498 return "DW_ATOM_cu_offset";
500 return "DW_ATOM_die_tag";
503 return "DW_ATOM_type_flags";
505 return "DW_ATOM_qual_name_hash";
545 case DW_AT_accessibility:
547 case DW_AT_virtuality:
553 case DW_AT_decimal_sign:
555 case DW_AT_endianity:
557 case DW_AT_visibility:
559 case DW_AT_identifier_case:
561 case DW_AT_calling_convention:
567 case DW_AT_APPLE_runtime_class:
589 #define HANDLE_DW_IDX(ID, NAME) \ 590 case DW_IDX_##NAME: \ 591 return "DW_IDX_" #NAME; 592 #include "llvm/BinaryFormat/Dwarf.def" 611 case DW_FORM_ref_udata:
612 case DW_FORM_indirect:
613 case DW_FORM_exprloc:
616 case DW_FORM_loclistx:
617 case DW_FORM_rnglistx:
618 case DW_FORM_GNU_addr_index:
619 case DW_FORM_GNU_str_index:
622 case DW_FORM_ref_addr:
645 case DW_FORM_ref_sup4:
651 case DW_FORM_GNU_ref_alt:
652 case DW_FORM_GNU_strp_alt:
653 case DW_FORM_line_strp:
654 case DW_FORM_sec_offset:
655 case DW_FORM_strp_sup:
662 case DW_FORM_ref_sig8:
663 case DW_FORM_ref_sup8:
666 case DW_FORM_flag_present:
672 case DW_FORM_implicit_const:
687 return FV > 0 && FV <=
Version;
#define HANDLE_DW_TAG(ID, NAME, VERSION, VENDOR)
unsigned FormVersion(Form F)
StringRef ApplePropertyString(unsigned)
StringRef IndexString(unsigned Idx)
Compute iterated dominance frontiers using a linear time algorithm.
StringRef AtomTypeString(unsigned Atom)
unsigned FormVendor(Form F)
#define HANDLE_DW_OP(ID, NAME, VERSION, VENDOR)
StringRef LNExtendedString(unsigned Encoding)
StringRef LNStandardString(unsigned Standard)
unsigned TagVendor(Tag T)
ELFYAML::ELF_STV Visibility
unsigned getVirtuality(StringRef VirtualityString)
constexpr char Language[]
Key for Kernel::Metadata::mLanguage.
#define HANDLE_DW_ATE(ID, NAME, VERSION, VENDOR)
unsigned TagVersion(Tag T)
StringRef FormEncodingString(unsigned Encoding)
unsigned AttributeVendor(Attribute A)
Only used in LLVM metadata.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE R Default(T Value)
unsigned LanguageVendor(SourceLanguage L)
StringRef AttributeString(unsigned Attribute)
StringRef LanguageString(unsigned Language)
StringRef DecimalSignString(unsigned Sign)
StringRef AttributeValueString(uint16_t Attr, unsigned Val)
Returns the symbolic string representing Val when used as a value for attribute Attr.
unsigned LanguageVersion(SourceLanguage L)
A switch()-like statement whose cases are string literals.
StringRef GDBIndexEntryKindString(GDBIndexEntryKind Kind)
#define HANDLE_DW_VIRTUALITY(ID, NAME)
StringRef AccessibilityString(unsigned Access)
StringRef EndianityString(unsigned Endian)
StringRef AttributeEncodingString(unsigned Encoding)
StringRef CallFrameString(unsigned Encoding)
unsigned OperationVendor(LocationAtom O)
unsigned getCallingConvention(StringRef LanguageString)
unsigned getOperationEncoding(StringRef OperationEncodingString)
StringRef ArrayOrderString(unsigned Order)
unsigned OperationVersion(LocationAtom O)
#define HANDLE_DW_CC(ID, NAME)
StringRef GDBIndexEntryLinkageString(GDBIndexEntryLinkage Linkage)
unsigned getLanguage(StringRef LanguageString)
StringRef RangeListEncodingString(unsigned Encoding)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
StringRef VirtualityString(unsigned Virtuality)
StringRef OperationEncodingString(unsigned Encoding)
unsigned getTag(StringRef TagString)
StringRef CaseString(unsigned Case)
unsigned AttributeVersion(Attribute A)
unsigned AttributeEncodingVersion(TypeKind E)
StringRef VisibilityString(unsigned Visibility)
This file contains constants used for implementing Dwarf debug support.
StringRef UnitTypeString(unsigned)
LLVM_ATTRIBUTE_ALWAYS_INLINE StringSwitch & Case(StringLiteral S, T Value)
StringRef AtomValueString(uint16_t Atom, unsigned Val)
Returns the symbolic string representing Val when used as a value for atom Atom.
Optional< uint8_t > getFixedFormByteSize(dwarf::Form Form, FormParams Params)
Get the fixed byte size for a given form.
StringRef TagString(unsigned Tag)
unsigned AttributeEncodingVendor(TypeKind E)
StringRef InlineCodeString(unsigned Code)
StringRef ConventionString(unsigned Convention)
#define HANDLE_DW_LANG(ID, NAME, VERSION, VENDOR)
unsigned getMacinfo(StringRef MacinfoString)
StringRef ChildrenString(unsigned Children)
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...
unsigned getAttributeEncoding(StringRef EncodingString)
StringRef - Represent a constant reference to a string, i.e.
StringRef MacinfoString(unsigned Encoding)
Marker as the end of a list of atoms.