diff --git a/src/dwarf/dwarf.c b/src/dwarf/dwarf.c index 2d9a66e9..86bd56a4 100644 --- a/src/dwarf/dwarf.c +++ b/src/dwarf/dwarf.c @@ -6,7 +6,7 @@ dw_reg_size_from_code_x64(DW_Reg reg_code) { switch (reg_code) { #define X(reg_name_dw, reg_code_dw, reg_name_rdi, reg_pos, reg_size) case DW_RegX64_##reg_name_dw: return reg_size; - DW_Regs_X64_XList(X) + DW_Regs_X64_XList #undef X } return 0; @@ -17,7 +17,7 @@ dw_reg_pos_from_code_x64(DW_Reg reg_code) { switch (reg_code) { #define X(reg_name_dw, reg_code_dw, reg_name_rdi, reg_pos, reg_size) case DW_RegX64_##reg_name_dw: return reg_pos; - DW_Regs_X64_XList(X) + DW_Regs_X64_XList #undef X } return max_U64; @@ -84,7 +84,7 @@ dw_attrib_class_from_attrib_v2(DW_AttribKind k) { switch (k) { #define X(_N,_C) case DW_AttribKind_##_N: return _C; - DW_AttribKind_ClassFlags_V2_XList(X) + DW_AttribKind_ClassFlags_V2_XList #undef X } return DW_AttribClass_Null; @@ -95,7 +95,7 @@ dw_attrib_class_from_attrib_v3(DW_AttribKind k) { switch (k) { #define X(_N,_C) case DW_AttribKind_##_N: return _C; - DW_AttribKind_ClassFlags_V3_XList(X) + DW_AttribKind_ClassFlags_V3_XList #undef X } return DW_AttribClass_Null; @@ -106,7 +106,7 @@ dw_attrib_class_from_attrib_v4(DW_AttribKind k) { switch (k) { #define X(_N,_C) case DW_AttribKind_##_N: return _C; - DW_AttribKind_ClassFlags_V4_XList(X) + DW_AttribKind_ClassFlags_V4_XList #undef X } return DW_AttribClass_Null; @@ -117,7 +117,7 @@ dw_attrib_class_from_attrib_v5(DW_AttribKind k) { switch (k) { #define X(_N,_C) case DW_AttribKind_##_N: return _C; - DW_AttribKind_ClassFlags_V5_XList(X) + DW_AttribKind_ClassFlags_V5_XList #undef X } return DW_AttribClass_Null; @@ -128,7 +128,7 @@ dw_attrib_class_from_attrib_gnu(DW_AttribKind k) { switch (k) { #define X(_N,_C) case DW_AttribKind_##_N: return _C; - DW_AttribKind_ClassFlags_GNU_XList(X) + DW_AttribKind_ClassFlags_GNU_XList #undef X } return DW_AttribClass_Null; @@ -139,7 +139,7 @@ dw_attrib_class_from_attrib_llvm(DW_AttribKind k) { switch (k) { #define X(_N,_C) case DW_AttribKind_##_N: return _C; - DW_AttribKind_ClassFlags_LLVM_XList(X) + DW_AttribKind_ClassFlags_LLVM_XList #undef X } return DW_AttribClass_Null; @@ -150,7 +150,7 @@ dw_attrib_class_from_attrib_apple(DW_AttribKind k) { switch (k) { #define X(_N,_C) case DW_AttribKind_##_N: return _C; - DW_AttribKind_ClassFlags_APPLE_XList(X) + DW_AttribKind_ClassFlags_APPLE_XList #undef X } return DW_AttribClass_Null; @@ -161,7 +161,7 @@ dw_attrib_class_from_attrib_mips(DW_AttribKind k) { switch (k) { #define X(_N,_C) case DW_AttribKind_##_N: return _C; - DW_AttribKind_ClassFlags_MIPS_XList(X) + DW_AttribKind_ClassFlags_MIPS_XList #undef X } return DW_AttribClass_Null; @@ -215,28 +215,28 @@ dw_attrib_class_from_form_kind(DW_Version ver, DW_FormKind k) #define X(_N,_C) case DW_Form_##_N: return _C; switch (k) { - DW_Form_AttribClass_GNU_XList(X) + DW_Form_AttribClass_GNU_XList } switch (ver) { case DW_Version_5: { switch (k) { - DW_Form_AttribClass_V5_XList(X) + DW_Form_AttribClass_V5_XList } } break; case DW_Version_4: { switch (k) { - DW_Form_AttribClass_V4_XList(X) + DW_Form_AttribClass_V4_XList } } break; case DW_Version_3: { switch (k) { - DW_Form_AttribClass_V2_XList(X) + DW_Form_AttribClass_V2_XList } } break; case DW_Version_2: { switch (k) { - DW_Form_AttribClass_V2_XList(X) + DW_Form_AttribClass_V2_XList } } break; case DW_Version_1: { @@ -261,7 +261,7 @@ dw_name_string_from_section_kind(DW_SectionKind k) { switch (k) { #define X(_N,_L,_M,_D) case DW_Section_##_N: return str8_lit(_L); - DW_SectionKind_XList(X) + DW_SectionKind_XList #undef X } return str8_zero(); @@ -272,7 +272,7 @@ dw_mach_name_string_from_section_kind(DW_SectionKind k) { switch (k) { #define X(_N,_L,_M,_D) case DW_Section_##_N: return str8_lit(_M); - DW_SectionKind_XList(X) + DW_SectionKind_XList #undef X } return str8_zero(); @@ -283,7 +283,7 @@ dw_dwo_name_string_from_section_kind(DW_SectionKind k) { switch (k) { #define X(_N,_L,_M,_D) case DW_Section_##_N: return str8_lit(_D); - DW_SectionKind_XList(X) + DW_SectionKind_XList #undef X } return str8_zero(); @@ -460,7 +460,7 @@ dw_operand_count_from_cfa_opcode(DW_CFA_Opcode opcode) { switch (opcode) { #define X(_N, _ID, ...) case _ID: { local_persist DW_CFA_OperandType t[] = { DW_CFA_OperandType_Null, __VA_ARGS__ }; return ArrayCount(t)-1; } - DW_CFA_Kind_XList(X) + DW_CFA_Kind_XList #undef X default: { NotImplemented; } break; } @@ -513,7 +513,7 @@ dw_operand_types_from_cfa_op(DW_CFA_Opcode opcode) { switch (opcode) { #define X(_N, _ID, ...) case _ID: { local_persist DW_CFA_OperandType t[] = { DW_CFA_OperandType_Null, __VA_ARGS__ }; return &t[0] + 1; } - DW_CFA_Kind_XList(X) + DW_CFA_Kind_XList #undef X default: { NotImplemented; } break; } @@ -581,9 +581,9 @@ dw_string_from_tag_kind(Arena *arena, DW_TagKind kind) switch (kind) { case DW_TagKind_Null: return str8_lit("Null"); #define X(_N,_ID) case DW_TagKind_##_N: return str8_lit(Stringify(_N)); - DW_TagKind_V3_XList(X) - DW_TagKind_V5_XList(X) - DW_TagKind_GNU_XList(X) + DW_TagKind_V3_XList + DW_TagKind_V5_XList + DW_TagKind_GNU_XList #undef X } return push_str8f(arena, "%llx", kind); @@ -611,10 +611,10 @@ dw_string_from_attrib_kind(Arena *arena, DW_Version ver, DW_Ext ext, DW_AttribKi { default:{}break; case DW_Ext_Null: break; - case DW_Ext_GNU: switch (kind) { DW_AttribKind_GNU_XList(X) } break; - case DW_Ext_LLVM: switch (kind) { DW_AttribKind_LLVM_XList(X) } break; - case DW_Ext_APPLE: switch (kind) { DW_AttribKind_APPLE_XList(X) } break; - case DW_Ext_MIPS: switch (kind) { DW_AttribKind_MIPS_XList(X) } break; + case DW_Ext_GNU: switch (kind) { DW_AttribKind_GNU_XList } break; + case DW_Ext_LLVM: switch (kind) { DW_AttribKind_LLVM_XList } break; + case DW_Ext_APPLE: switch (kind) { DW_AttribKind_APPLE_XList } break; + case DW_Ext_MIPS: switch (kind) { DW_AttribKind_MIPS_XList } break; } } } @@ -627,10 +627,10 @@ dw_string_from_attrib_kind(Arena *arena, DW_Version ver, DW_Ext ext, DW_AttribKi DW_Version version = retry ? DW_Version_5 : ver; switch(version) { - case DW_Version_5: { switch(kind) { DW_AttribKind_V5_XList(X) } } // fall-through - case DW_Version_4: { switch(kind) { DW_AttribKind_V4_XList(X) } } // fall-through - case DW_Version_3: { switch(kind) { DW_AttribKind_V3_XList(X) } } // fall-through - case DW_Version_2: { switch(kind) { DW_AttribKind_V2_XList(X) } } // fall-through + case DW_Version_5: { switch(kind) { DW_AttribKind_V5_XList } } // fall-through + case DW_Version_4: { switch(kind) { DW_AttribKind_V4_XList } } // fall-through + case DW_Version_3: { switch(kind) { DW_AttribKind_V3_XList } } // fall-through + case DW_Version_2: { switch(kind) { DW_AttribKind_V2_XList } } // fall-through case DW_Version_1: {}break; case DW_Version_Null:{}break; default:{}break; @@ -655,18 +655,18 @@ dw_string_from_form_kind(Arena *arena, DW_Version ver, DW_FormKind kind) switch (ver) { case DW_Version_5: { switch (kind) { - DW_Form_V5_XList(X) + DW_Form_V5_XList } } // fall-through case DW_Version_4: { switch (kind) { - DW_Form_V4_XList(X) + DW_Form_V4_XList } } // fall-through case DW_Version_3: case DW_Version_2: { switch (kind) { - DW_Form_V2_XList(X) + DW_Form_V2_XList } } // fall-through case DW_Version_Null: break; @@ -681,7 +681,7 @@ dw_string_from_language(Arena *arena, DW_Language kind) { switch (kind) { #define X(_N,_ID) case DW_Language_##_N: return str8_lit(Stringify(_N)); - DW_Language_XList(X) + DW_Language_XList #undef X } return push_str8f(arena, "%x", kind); @@ -692,7 +692,7 @@ dw_string_from_inl(Arena *arena, DW_InlKind kind) { switch (kind) { #define X(_N,_ID) case _ID: return str8_lit(Stringify(_N)); - DW_Inl_XList(X) + DW_Inl_XList #undef X } return push_str8f(arena, "%x", kind); @@ -703,7 +703,7 @@ dw_string_from_access_kind(Arena *arena, DW_AccessKind kind) { switch (kind) { #define X(_N,_ID) case _ID: return str8_lit(Stringify(_N)); - DW_AccessKind_XList(X) + DW_AccessKind_XList #undef X } return push_str8f(arena, "%llx", kind); @@ -714,7 +714,7 @@ dw_string_from_calling_convetion(Arena *arena, DW_CallingConventionKind kind) { switch (kind) { #define X(_N,_ID) case _ID: return str8_lit(Stringify(_N)); - DW_CallingConventionKind_XList(X) + DW_CallingConventionKind_XList #undef X } return push_str8f(arena, "%llx", kind); @@ -725,7 +725,7 @@ dw_string_from_attrib_type_encoding(Arena *arena, DW_ATE kind) { switch (kind) { #define X(_N,_ID) case _ID: return str8_lit(Stringify(_N)); - DW_ATE_XList(X) + DW_ATE_XList #undef X } return push_str8f(arena, "%llx", kind); @@ -736,7 +736,7 @@ dw_string_from_std_opcode(Arena *arena, DW_StdOpcode kind) { switch (kind) { #define X(_N,_ID) case DW_StdOpcode_##_N: return str8_lit(Stringify(_N)); - DW_StdOpcode_XList(X) + DW_StdOpcode_XList #undef X } return push_str8f(arena, "%x", kind); @@ -747,7 +747,7 @@ dw_string_from_ext_opcode(Arena *arena, DW_ExtOpcode kind) { switch (kind) { #define X(_N,_ID) case DW_ExtOpcode_##_N: return str8_lit(Stringify(_N)); - DW_ExtOpcode_XList(X) + DW_ExtOpcode_XList #undef X default: InvalidPath; break; } @@ -784,7 +784,7 @@ dw_string_from_register(Arena *arena, Arch arch, U64 reg_id) case Arch_x64: { switch (reg_id) { #define X(_N, _ID, ...) case DW_RegX64_##_N: reg_str = str8_lit(Stringify(_N)); break; - DW_Regs_X64_XList(X) + DW_Regs_X64_XList #undef X } } break; @@ -804,7 +804,7 @@ dw_string_from_cfa_opcode(DW_CFA_Opcode opcode) { switch (opcode) { #define X(_NAME, _ID, ...) case _ID: return str8_lit(Stringify(_NAME)); - DW_CFA_Kind_XList(X) + DW_CFA_Kind_XList #undef X default: InvalidPath; break; } diff --git a/src/dwarf/dwarf.h b/src/dwarf/dwarf.h index 94dd6ade..349e8b35 100644 --- a/src/dwarf/dwarf.h +++ b/src/dwarf/dwarf.h @@ -39,239 +39,239 @@ typedef enum DW_Format #define DW_SentinelFromSize(address_size) ((address_size) == 4 ? max_U32 : (address_size) == 8 ? max_U64 : 0) -#define DW_SectionKind_XList(X )\ -X(Null, "", "", "" )\ -X(Abbrev, ".debug_abbrev", "__debug_abbrev", ".debug_abbrev.dwo" )\ -X(ARanges, ".debug_aranges", "__debug_aranges", ".debug_aranges.dwo" )\ -X(Frame, ".debug_frame", "__debug_frame", ".debug_frame.dwo" )\ -X(Info, ".debug_info", "__debug_info", ".debug_info.dwo" )\ -X(Line, ".debug_line", "__debug_line", ".debug_line.dwo" )\ -X(Loc, ".debug_loc", "__debug_loc", ".debug_loc.dwo" )\ -X(MacInfo, ".debug_macinfo", "__debug_macinfo", ".debug_macinfo.dwo" )\ -X(PubNames, ".debug_pubnames", "__debug_pubnames", ".debug_pubnames.dwo" )\ -X(PubTypes, ".debug_pubtypes", "__debug_pubtypes", ".debug_pubtypes.dwo" )\ -X(Ranges, ".debug_ranges", "__debug_ranges", ".debug_ranges.dwo" )\ -X(Str, ".debug_str", "__debug_str", ".debug_str.dwo" )\ -X(Addr, ".debug_addr", "__debug_addr", ".debug_addr.dwo" )\ -X(LocLists, ".debug_loclists", "__debug_loclists", ".debug_loclists.dwo" )\ -X(RngLists, ".debug_rnglists", "__debug_rnglists", ".debug_rnglists.dwo" )\ -X(StrOffsets, ".debug_str_offsets", "__debug_str_offsets", ".debug_str_offsets.dwo")\ -X(LineStr, ".debug_line_str", "__debug_line_str", ".debug_line_str.dwo" )\ -X(Names, ".debug_names", "__debug_names", ".debug_names.dwo" ) +#define DW_SectionKind_XList \ + X(Null, "", "", "" ) \ + X(Abbrev, ".debug_abbrev", "__debug_abbrev", ".debug_abbrev.dwo" ) \ + X(ARanges, ".debug_aranges", "__debug_aranges", ".debug_aranges.dwo" ) \ + X(Frame, ".debug_frame", "__debug_frame", ".debug_frame.dwo" ) \ + X(Info, ".debug_info", "__debug_info", ".debug_info.dwo" ) \ + X(Line, ".debug_line", "__debug_line", ".debug_line.dwo" ) \ + X(Loc, ".debug_loc", "__debug_loc", ".debug_loc.dwo" ) \ + X(MacInfo, ".debug_macinfo", "__debug_macinfo", ".debug_macinfo.dwo" ) \ + X(PubNames, ".debug_pubnames", "__debug_pubnames", ".debug_pubnames.dwo" ) \ + X(PubTypes, ".debug_pubtypes", "__debug_pubtypes", ".debug_pubtypes.dwo" ) \ + X(Ranges, ".debug_ranges", "__debug_ranges", ".debug_ranges.dwo" ) \ + X(Str, ".debug_str", "__debug_str", ".debug_str.dwo" ) \ + X(Addr, ".debug_addr", "__debug_addr", ".debug_addr.dwo" ) \ + X(LocLists, ".debug_loclists", "__debug_loclists", ".debug_loclists.dwo" ) \ + X(RngLists, ".debug_rnglists", "__debug_rnglists", ".debug_rnglists.dwo" ) \ + X(StrOffsets, ".debug_str_offsets", "__debug_str_offsets", ".debug_str_offsets.dwo") \ + X(LineStr, ".debug_line_str", "__debug_line_str", ".debug_line_str.dwo" ) \ + X(Names, ".debug_names", "__debug_names", ".debug_names.dwo" ) typedef U64 DW_SectionKind; typedef enum DW_SectionKindEnum { #define X(_N,...) DW_Section_##_N, - DW_SectionKind_XList(X) + DW_SectionKind_XList #undef X DW_Section_Count } DW_SectionKindEnum; -#define DW_Language_XList(X) \ -X(Null, 0x00) \ -X(C89, 0x01) \ -X(C, 0x02) \ -X(Ada83, 0x03) \ -X(CPlusPlus, 0x04) \ -X(Cobol74, 0x05) \ -X(Cobol85, 0x06) \ -X(Fortran77, 0x07) \ -X(Fortran90, 0x08) \ -X(Pascal83, 0x09) \ -X(Modula2, 0x0A) \ -X(Java, 0x0B) \ -X(C99, 0x0C) \ -X(Ada95, 0x0D) \ -X(Fortran95, 0x0E) \ -X(PLI, 0x0F) \ -X(ObjC, 0x10) \ -X(ObjCPlusPlus, 0x11) \ -X(UPC, 0x12) \ -X(D, 0x13) \ -X(Python, 0x14) \ -X(OpenCL, 0x15) \ -X(Go, 0x16) \ -X(Modula3, 0x17) \ -X(Haskell, 0x18) \ -X(CPlusPlus03, 0x19) \ -X(CPlusPlus11, 0x1a) \ -X(OCaml, 0x1b) \ -X(Rust, 0x1c) \ -X(C11, 0x1d) \ -X(Swift, 0x1e) \ -X(Julia, 0x1f) \ -X(Dylan, 0x20) \ -X(CPlusPlus14, 0x21) \ -X(Fortran03, 0x22) \ -X(Fortran08, 0x23) \ -X(RenderScript, 0x24) \ -X(BLISS, 0x25) \ -X(MipsAssembler, 0x8001) \ -X(GoogleRenderScript, 0x8E57) \ -X(SunAssembler, 0x9001) \ -X(BorlandDelphi, 0xB000) +#define DW_Language_XList \ + X(Null, 0x00) \ + X(C89, 0x01) \ + X(C, 0x02) \ + X(Ada83, 0x03) \ + X(CPlusPlus, 0x04) \ + X(Cobol74, 0x05) \ + X(Cobol85, 0x06) \ + X(Fortran77, 0x07) \ + X(Fortran90, 0x08) \ + X(Pascal83, 0x09) \ + X(Modula2, 0x0A) \ + X(Java, 0x0B) \ + X(C99, 0x0C) \ + X(Ada95, 0x0D) \ + X(Fortran95, 0x0E) \ + X(PLI, 0x0F) \ + X(ObjC, 0x10) \ + X(ObjCPlusPlus, 0x11) \ + X(UPC, 0x12) \ + X(D, 0x13) \ + X(Python, 0x14) \ + X(OpenCL, 0x15) \ + X(Go, 0x16) \ + X(Modula3, 0x17) \ + X(Haskell, 0x18) \ + X(CPlusPlus03, 0x19) \ + X(CPlusPlus11, 0x1a) \ + X(OCaml, 0x1b) \ + X(Rust, 0x1c) \ + X(C11, 0x1d) \ + X(Swift, 0x1e) \ + X(Julia, 0x1f) \ + X(Dylan, 0x20) \ + X(CPlusPlus14, 0x21) \ + X(Fortran03, 0x22) \ + X(Fortran08, 0x23) \ + X(RenderScript, 0x24) \ + X(BLISS, 0x25) \ + X(MipsAssembler, 0x8001) \ + X(GoogleRenderScript, 0x8E57) \ + X(SunAssembler, 0x9001) \ + X(BorlandDelphi, 0xB000) typedef U32 DW_Language; typedef enum DW_LanguageEnum { #define X(_N, _ID) DW_Language_##_N = _ID, - DW_Language_XList(X) + DW_Language_XList #undef X DW_Language_UserLo = 0x8000, DW_Language_UserHi = 0xffff, } DW_LanguageEnum; -#define DW_Inl_XList(X) \ -X(NotInlined, 0) \ -X(Inlined, 1) \ -X(DeclaredNotInlined, 2) \ -X(DeclaredInlined, 3) +#define DW_Inl_XList \ + X(NotInlined, 0) \ + X(Inlined, 1) \ + X(DeclaredNotInlined, 2) \ + X(DeclaredInlined, 3) typedef U32 DW_InlKind; typedef enum DW_InlKindEnum { #define X(_N,_ID) DW_Inl_##_N = _ID, - DW_Inl_XList(X) + DW_Inl_XList #undef X } DW_InlKindEnum; -#define DW_StdOpcode_XList(X) \ -X(ExtendedOpcode, 0x00) \ -X(Copy, 0x01) \ -X(AdvancePc, 0x02) \ -X(AdvanceLine, 0x03) \ -X(SetFile, 0x04) \ -X(SetColumn, 0x05) \ -X(NegateStmt, 0x06) \ -X(SetBasicBlock, 0x07) \ -X(ConstAddPc, 0x08) \ -X(FixedAdvancePc, 0x09) \ -X(SetPrologueEnd, 0x0A) \ -X(SetEpilogueBegin, 0x0B) \ -X(SetIsa, 0x0C) \ +#define DW_StdOpcode_XList \ + X(ExtendedOpcode, 0x00) \ + X(Copy, 0x01) \ + X(AdvancePc, 0x02) \ + X(AdvanceLine, 0x03) \ + X(SetFile, 0x04) \ + X(SetColumn, 0x05) \ + X(NegateStmt, 0x06) \ + X(SetBasicBlock, 0x07) \ + X(ConstAddPc, 0x08) \ + X(FixedAdvancePc, 0x09) \ + X(SetPrologueEnd, 0x0A) \ + X(SetEpilogueBegin, 0x0B) \ + X(SetIsa, 0x0C) \ typedef enum DW_StdOpcode { #define X(_N,_ID) DW_StdOpcode_##_N = _ID, - DW_StdOpcode_XList(X) + DW_StdOpcode_XList #undef X } DW_StdOpcode; -#define DW_ExtOpcode_XList(X) \ -X(Undefined, 0x00) \ -X(EndSequence, 0x01) \ -X(SetAddress, 0x02) \ -X(DefineFile, 0x03) \ -X(SetDiscriminator, 0x04) \ -X(UserLo, 0x80) \ -X(UserHi, 0xff) +#define DW_ExtOpcode_XList \ + X(Undefined, 0x00) \ + X(EndSequence, 0x01) \ + X(SetAddress, 0x02) \ + X(DefineFile, 0x03) \ + X(SetDiscriminator, 0x04) \ + X(UserLo, 0x80) \ + X(UserHi, 0xff) typedef enum DW_ExtOpcode { #define X(_N,_ID) DW_ExtOpcode_##_N = _ID, - DW_ExtOpcode_XList(X) + DW_ExtOpcode_XList #undef X } DW_ExtOpcode; -#define DW_IDCaseKind_XList(X) \ -X(CaseSensitive, 0x00) \ -X(UpCase, 0x01) \ -X(DownCase, 0x02) \ -X(CaseInsensitive, 0x03) +#define DW_IDCaseKind_XList \ + X(CaseSensitive, 0x00) \ + X(UpCase, 0x01) \ + X(DownCase, 0x02) \ + X(CaseInsensitive, 0x03) typedef U64 DW_IDCaseKind; typedef enum DW_IDCaseKindEnum { #define X(_N,_ID) DW_IDCase_##_N = _ID, - DW_IDCaseKind_XList(X) + DW_IDCaseKind_XList #undef X } DW_IDCaseKindEnum; -#define DW_TagKind_V3_XList(X) \ -X(ArrayType, 0x01) \ -X(ClassType, 0x02) \ -X(EntryPoint, 0x03) \ -X(EnumerationType, 0x04) \ -X(FormalParameter, 0x05) \ -X(ImportedDeclaration, 0x08) \ -X(Label, 0x0a) \ -X(LexicalBlock, 0x0b) \ -X(Member, 0x0d) \ -X(PointerType, 0x0f) \ -X(ReferenceType, 0x10) \ -X(CompileUnit, 0x11) \ -X(StringType, 0x12) \ -X(StructureType, 0x13) \ -X(SubroutineType, 0x15) \ -X(Typedef, 0x16) \ -X(UnionType, 0x17) \ -X(UnspecifiedParameters, 0x18) \ -X(Variant, 0x19) \ -X(CommonBlock, 0x1a) \ -X(CommonInclusion, 0x1b) \ -X(Inheritance, 0x1c) \ -X(InlinedSubroutine, 0x1d) \ -X(Module, 0x1e) \ -X(PtrToMemberType, 0x1f) \ -X(SetType, 0x20) \ -X(SubrangeType, 0x21) \ -X(WithStmt, 0x22) \ -X(AccessDeclaration, 0x23) \ -X(BaseType, 0x24) \ -X(CatchBlock, 0x25) \ -X(ConstType, 0x26) \ -X(Constant, 0x27) \ -X(Enumerator, 0x28) \ -X(FileType, 0x29) \ -X(Friend, 0x2a) \ -X(NameList, 0x2b) \ -X(NameListItem, 0x2c) \ -X(PackedType, 0x2d) \ -X(SubProgram, 0x2e) \ -X(TemplateTypeParameter, 0x2f) \ -X(TemplateValueParameter, 0x30) \ -X(ThrownType, 0x31) \ -X(TryBlock, 0x32) \ -X(VariantPart, 0x33) \ -X(Variable, 0x34) \ -X(VolatileType, 0x35) \ -X(DwarfProcedure, 0x36) \ -X(RestrictType, 0x37) \ -X(InterfaceType, 0x38) \ -X(Namespace, 0x39) \ -X(ImportedModule, 0x3a) \ -X(UnspecifiedType, 0x3b) \ -X(PartialUnit, 0x3c) \ -X(ImportedUnit, 0x3d) \ -X(Condition, 0x3f) \ -X(SharedType, 0x40) +#define DW_TagKind_V3_XList \ + X(ArrayType, 0x01) \ + X(ClassType, 0x02) \ + X(EntryPoint, 0x03) \ + X(EnumerationType, 0x04) \ + X(FormalParameter, 0x05) \ + X(ImportedDeclaration, 0x08) \ + X(Label, 0x0a) \ + X(LexicalBlock, 0x0b) \ + X(Member, 0x0d) \ + X(PointerType, 0x0f) \ + X(ReferenceType, 0x10) \ + X(CompileUnit, 0x11) \ + X(StringType, 0x12) \ + X(StructureType, 0x13) \ + X(SubroutineType, 0x15) \ + X(Typedef, 0x16) \ + X(UnionType, 0x17) \ + X(UnspecifiedParameters, 0x18) \ + X(Variant, 0x19) \ + X(CommonBlock, 0x1a) \ + X(CommonInclusion, 0x1b) \ + X(Inheritance, 0x1c) \ + X(InlinedSubroutine, 0x1d) \ + X(Module, 0x1e) \ + X(PtrToMemberType, 0x1f) \ + X(SetType, 0x20) \ + X(SubrangeType, 0x21) \ + X(WithStmt, 0x22) \ + X(AccessDeclaration, 0x23) \ + X(BaseType, 0x24) \ + X(CatchBlock, 0x25) \ + X(ConstType, 0x26) \ + X(Constant, 0x27) \ + X(Enumerator, 0x28) \ + X(FileType, 0x29) \ + X(Friend, 0x2a) \ + X(NameList, 0x2b) \ + X(NameListItem, 0x2c) \ + X(PackedType, 0x2d) \ + X(SubProgram, 0x2e) \ + X(TemplateTypeParameter, 0x2f) \ + X(TemplateValueParameter, 0x30) \ + X(ThrownType, 0x31) \ + X(TryBlock, 0x32) \ + X(VariantPart, 0x33) \ + X(Variable, 0x34) \ + X(VolatileType, 0x35) \ + X(DwarfProcedure, 0x36) \ + X(RestrictType, 0x37) \ + X(InterfaceType, 0x38) \ + X(Namespace, 0x39) \ + X(ImportedModule, 0x3a) \ + X(UnspecifiedType, 0x3b) \ + X(PartialUnit, 0x3c) \ + X(ImportedUnit, 0x3d) \ + X(Condition, 0x3f) \ + X(SharedType, 0x40) -#define DW_TagKind_V5_XList(X) \ -X(TypeUnit, 0x41) \ -X(RValueReferenceType, 0x42) \ -X(TemplateAlias, 0x43) \ -X(CoarrayType, 0x44) \ -X(GenericSubrange, 0x45) \ -X(DynamicType, 0x46) \ -X(AtomicType, 0x47) \ -X(CallSite, 0x48) \ -X(CallSiteParameter, 0x49) \ -X(SkeletonUnit, 0x4A) \ -X(ImmutableType, 0x4B) +#define DW_TagKind_V5_XList \ + X(TypeUnit, 0x41) \ + X(RValueReferenceType, 0x42) \ + X(TemplateAlias, 0x43) \ + X(CoarrayType, 0x44) \ + X(GenericSubrange, 0x45) \ + X(DynamicType, 0x46) \ + X(AtomicType, 0x47) \ + X(CallSite, 0x48) \ + X(CallSiteParameter, 0x49) \ + X(SkeletonUnit, 0x4A) \ + X(ImmutableType, 0x4B) -#define DW_TagKind_GNU_XList(X) \ -X(GNU_CallSite, 0x4109) \ -X(GNU_CallSiteParameter, 0x410a) +#define DW_TagKind_GNU_XList \ + X(GNU_CallSite, 0x4109) \ + X(GNU_CallSiteParameter, 0x410a) typedef U64 DW_TagKind; typedef enum DW_TagKindEnum { DW_TagKind_Null, #define X(_N,_ID) DW_TagKind_##_N = _ID, - DW_TagKind_V3_XList(X) - DW_TagKind_V5_XList(X) - DW_TagKind_GNU_XList(X) + DW_TagKind_V3_XList + DW_TagKind_V5_XList + DW_TagKind_GNU_XList #undef X DW_TagKind_UserLo = 0x4080, DW_TagKind_UserHi = 0xffff @@ -279,999 +279,993 @@ typedef enum DW_TagKindEnum //- Attrib Class Encodings -#define DW_AttribClass_V3_XList(X) \ -X(Null, 0) \ -X(Undefined, 1) \ -X(Address, 2) \ -X(Block, 3) \ -X(Const, 4) \ -X(ExprLoc, 5) \ -X(Flag, 6) \ -X(LinePtr, 7) \ -X(LocListPtr, 8) \ -X(MacPtr, 9) \ -X(RngListPtr, 10) \ -X(Reference, 11) \ -X(String, 12) +#define DW_AttribClass_V3_XList \ + X(Null, 0) \ + X(Undefined, 1) \ + X(Address, 2) \ + X(Block, 3) \ + X(Const, 4) \ + X(ExprLoc, 5) \ + X(Flag, 6) \ + X(LinePtr, 7) \ + X(LocListPtr, 8) \ + X(MacPtr, 9) \ + X(RngListPtr, 10) \ + X(Reference, 11) \ + X(String, 12) -#define DW_AttribClass_V4_XList(X) \ -X(LocList, 13) \ -X(RngList, 14) +#define DW_AttribClass_V4_XList \ + X(LocList, 13) \ + X(RngList, 14) -#define DW_AttribClass_V5_XList(X) \ -X(StrOffsetsPtr, 15) \ -X(AddrPtr, 16) +#define DW_AttribClass_V5_XList \ + X(StrOffsetsPtr, 15) \ + X(AddrPtr, 16) typedef U32 DW_AttribClass; typedef enum DW_AttribClassEnum { #define X(_N,_ID) DW_AttribClass_##_N = (1 << _ID), - DW_AttribClass_V3_XList(X) - DW_AttribClass_V4_XList(X) - DW_AttribClass_V5_XList(X) + DW_AttribClass_V3_XList + DW_AttribClass_V4_XList + DW_AttribClass_V5_XList #undef X + DW_AttribClass_AllPtrs = DW_AttribClass_AddrPtr|DW_AttribClass_LinePtr|DW_AttribClass_LocList|DW_AttribClass_LocListPtr| DW_AttribClass_MacPtr| DW_AttribClass_RngList| DW_AttribClass_RngListPtr| DW_AttribClass_StrOffsetsPtr, } DW_AttribClassEnum; //- Form Encodings -#define DW_Form_V2_XList(X) \ -X(Addr, 0x1) \ -X(Block2, 0x3) \ -X(Block4, 0x4) \ -X(Data2, 0x5) \ -X(Data4, 0x6) \ -X(Data8, 0x7) \ -X(String, 0x8) \ -X(Block, 0x9) \ -X(Block1, 0xa) \ -X(Data1, 0xb) \ -X(Flag, 0xc) \ -X(SData, 0xd) \ -X(Strp, 0xe) \ -X(UData, 0xf) \ -X(RefAddr, 0x10) \ -X(Ref1, 0x11) \ -X(Ref2, 0x12) \ -X(Ref4, 0x13) \ -X(Ref8, 0x14) \ -X(RefUData, 0x15) \ -X(Indirect, 0x16) +#define DW_Form_V2_XList \ + X(Addr, 0x1) \ + X(Block2, 0x3) \ + X(Block4, 0x4) \ + X(Data2, 0x5) \ + X(Data4, 0x6) \ + X(Data8, 0x7) \ + X(String, 0x8) \ + X(Block, 0x9) \ + X(Block1, 0xa) \ + X(Data1, 0xb) \ + X(Flag, 0xc) \ + X(SData, 0xd) \ + X(Strp, 0xe) \ + X(UData, 0xf) \ + X(RefAddr, 0x10) \ + X(Ref1, 0x11) \ + X(Ref2, 0x12) \ + X(Ref4, 0x13) \ + X(Ref8, 0x14) \ + X(RefUData, 0x15) \ + X(Indirect, 0x16) -#define DW_Form_AttribClass_V2_XList(X) \ -X(Addr, DW_AttribClass_Address) \ -X(Block2, DW_AttribClass_Block) \ -X(Block4, DW_AttribClass_Block) \ -X(Data2, DW_AttribClass_Const) \ -X(Data4, DW_AttribClass_Const) \ -X(Data8, DW_AttribClass_Const) \ -X(String, DW_AttribClass_String) \ -X(Block, DW_AttribClass_Block) \ -X(Block1, DW_AttribClass_Block) \ -X(Data1, DW_AttribClass_Const) \ -X(Flag, DW_AttribClass_Flag) \ -X(SData, DW_AttribClass_Const) \ -X(Strp, DW_AttribClass_String) \ -X(UData, DW_AttribClass_Const) \ -X(RefAddr, DW_AttribClass_Reference) \ -X(Ref1, DW_AttribClass_Reference) \ -X(Ref2, DW_AttribClass_Reference) \ -X(Ref4, DW_AttribClass_Reference) \ -X(Ref8, DW_AttribClass_Reference) \ -X(RefUData, DW_AttribClass_Reference) \ -X(Indirect, DW_AttribClass_Null) +#define DW_Form_AttribClass_V2_XList \ + X(Addr, DW_AttribClass_Address) \ + X(Block2, DW_AttribClass_Block) \ + X(Block4, DW_AttribClass_Block) \ + X(Data2, DW_AttribClass_Const) \ + X(Data4, DW_AttribClass_Const) \ + X(Data8, DW_AttribClass_Const) \ + X(String, DW_AttribClass_String) \ + X(Block, DW_AttribClass_Block) \ + X(Block1, DW_AttribClass_Block) \ + X(Data1, DW_AttribClass_Const) \ + X(Flag, DW_AttribClass_Flag) \ + X(SData, DW_AttribClass_Const) \ + X(Strp, DW_AttribClass_String) \ + X(UData, DW_AttribClass_Const) \ + X(RefAddr, DW_AttribClass_Reference) \ + X(Ref1, DW_AttribClass_Reference) \ + X(Ref2, DW_AttribClass_Reference) \ + X(Ref4, DW_AttribClass_Reference) \ + X(Ref8, DW_AttribClass_Reference) \ + X(RefUData, DW_AttribClass_Reference) \ + X(Indirect, DW_AttribClass_Null) -#define DW_Form_V4_XList(X) \ -X(SecOffset, 0x17) \ -X(ExprLoc, 0x18) \ -X(FlagPresent, 0x19) \ -X(RefSig8, 0x20) +#define DW_Form_V4_XList \ + X(SecOffset, 0x17) \ + X(ExprLoc, 0x18) \ + X(FlagPresent, 0x19) \ + X(RefSig8, 0x20) -#define DW_Form_AttribClass_V4_XList(X) \ -X(Addr, DW_AttribClass_Address) \ -X(Block2, DW_AttribClass_Block) \ -X(Block4, DW_AttribClass_Block) \ -X(Data2, DW_AttribClass_Const) \ -X(Data4, DW_AttribClass_Const) \ -X(Data8, DW_AttribClass_Const) \ -X(String, DW_AttribClass_String) \ -X(Block, DW_AttribClass_Block) \ -X(Block1, DW_AttribClass_Block) \ -X(Data1, DW_AttribClass_Const) \ -X(Flag, DW_AttribClass_Flag) \ -X(SData, DW_AttribClass_Const) \ -X(Strp, DW_AttribClass_String) \ -X(UData, DW_AttribClass_Const) \ -X(RefAddr, DW_AttribClass_Reference) \ -X(Ref1, DW_AttribClass_Reference) \ -X(Ref2, DW_AttribClass_Reference) \ -X(Ref4, DW_AttribClass_Reference) \ -X(Ref8, DW_AttribClass_Reference) \ -X(RefUData, DW_AttribClass_Reference) \ -X(Indirect, DW_AttribClass_Null) \ -X(SecOffset, DW_AttribClass_LinePtr|DW_AttribClass_LocListPtr|DW_AttribClass_MacPtr|DW_AttribClass_RngListPtr) \ -X(ExprLoc, DW_AttribClass_ExprLoc) \ -X(FlagPresent, DW_AttribClass_Flag) \ -X(RefSig8, DW_AttribClass_Reference) +#define DW_Form_AttribClass_V4_XList \ + X(Addr, DW_AttribClass_Address) \ + X(Block2, DW_AttribClass_Block) \ + X(Block4, DW_AttribClass_Block) \ + X(Data2, DW_AttribClass_Const) \ + X(Data4, DW_AttribClass_Const) \ + X(Data8, DW_AttribClass_Const) \ + X(String, DW_AttribClass_String) \ + X(Block, DW_AttribClass_Block) \ + X(Block1, DW_AttribClass_Block) \ + X(Data1, DW_AttribClass_Const) \ + X(Flag, DW_AttribClass_Flag) \ + X(SData, DW_AttribClass_Const) \ + X(Strp, DW_AttribClass_String) \ + X(UData, DW_AttribClass_Const) \ + X(RefAddr, DW_AttribClass_Reference) \ + X(Ref1, DW_AttribClass_Reference) \ + X(Ref2, DW_AttribClass_Reference) \ + X(Ref4, DW_AttribClass_Reference) \ + X(Ref8, DW_AttribClass_Reference) \ + X(RefUData, DW_AttribClass_Reference) \ + X(Indirect, DW_AttribClass_Null) \ + X(SecOffset, DW_AttribClass_LinePtr|DW_AttribClass_LocListPtr|DW_AttribClass_MacPtr|DW_AttribClass_RngListPtr) \ + X(ExprLoc, DW_AttribClass_ExprLoc) \ + X(FlagPresent, DW_AttribClass_Flag) \ + X(RefSig8, DW_AttribClass_Reference) -#define DW_Form_V5_XList(X) \ -X(Strx, 0x1a) \ -X(Addrx, 0x1b) \ -X(RefSup4, 0x1c) \ -X(StrpSup, 0x1d) \ -X(Data16, 0x1e) \ -X(LineStrp, 0x1f) \ -X(ImplicitConst, 0x21) \ -X(LocListx, 0x22) \ -X(RngListx, 0x23) \ -X(RefSup8, 0x24) \ -X(Strx1, 0x25) \ -X(Strx2, 0x26) \ -X(Strx3, 0x27) \ -X(Strx4, 0x28) \ -X(Addrx1, 0x29) \ -X(Addrx2, 0x2a) \ -X(Addrx3, 0x2b) \ -X(Addrx4, 0x2c) +#define DW_Form_V5_XList \ + X(Strx, 0x1a) \ + X(Addrx, 0x1b) \ + X(RefSup4, 0x1c) \ + X(StrpSup, 0x1d) \ + X(Data16, 0x1e) \ + X(LineStrp, 0x1f) \ + X(ImplicitConst, 0x21) \ + X(LocListx, 0x22) \ + X(RngListx, 0x23) \ + X(RefSup8, 0x24) \ + X(Strx1, 0x25) \ + X(Strx2, 0x26) \ + X(Strx3, 0x27) \ + X(Strx4, 0x28) \ + X(Addrx1, 0x29) \ + X(Addrx2, 0x2a) \ + X(Addrx3, 0x2b) \ + X(Addrx4, 0x2c) -#define DW_Form_AttribClass_V5_XList(X) \ -X(Addr, DW_AttribClass_Address) \ -X(Block2, DW_AttribClass_Block) \ -X(Block4, DW_AttribClass_Block) \ -X(Data2, DW_AttribClass_Const) \ -X(Data4, DW_AttribClass_Const) \ -X(Data8, DW_AttribClass_Const) \ -X(String, DW_AttribClass_String) \ -X(Block, DW_AttribClass_Block) \ -X(Block1, DW_AttribClass_Block) \ -X(Data1, DW_AttribClass_Const) \ -X(Flag, DW_AttribClass_Flag) \ -X(SData, DW_AttribClass_Const) \ -X(Strp, DW_AttribClass_String) \ -X(UData, DW_AttribClass_Const) \ -X(RefAddr, DW_AttribClass_Reference) \ -X(Ref1, DW_AttribClass_Reference) \ -X(Ref2, DW_AttribClass_Reference) \ -X(Ref4, DW_AttribClass_Reference) \ -X(Ref8, DW_AttribClass_Reference) \ -X(RefUData, DW_AttribClass_Reference) \ -X(Indirect, DW_AttribClass_Null) \ -X(SecOffset, DW_AttribClass_AddrPtr| \ -DW_AttribClass_LinePtr| \ -DW_AttribClass_LocList| \ -DW_AttribClass_LocListPtr| \ -DW_AttribClass_MacPtr| \ -DW_AttribClass_RngList| \ -DW_AttribClass_RngListPtr| \ -DW_AttribClass_StrOffsetsPtr) \ -X(ExprLoc, DW_AttribClass_ExprLoc) \ -X(FlagPresent, DW_AttribClass_Flag) \ -X(RefSig8, DW_AttribClass_Reference) \ -X(Strx, DW_AttribClass_String) \ -X(Addrx, DW_AttribClass_Address) \ -X(RefSup4, DW_AttribClass_Reference) \ -X(StrpSup, DW_AttribClass_String) \ -X(Data16, DW_AttribClass_Const) \ -X(LineStrp, DW_AttribClass_String) \ -X(ImplicitConst, DW_AttribClass_Const) \ -X(LocListx, DW_AttribClass_LocListPtr) \ -X(RngListx, DW_AttribClass_RngList) \ -X(RefSup8, DW_AttribClass_Reference) \ -X(Strx1, DW_AttribClass_String) \ -X(Strx2, DW_AttribClass_String) \ -X(Strx3, DW_AttribClass_String) \ -X(Strx4, DW_AttribClass_String) \ -X(Addrx1, DW_AttribClass_Address) \ -X(Addrx2, DW_AttribClass_Address) \ -X(Addrx3, DW_AttribClass_Address) \ -X(Addrx4, DW_AttribClass_Address) +#define DW_Form_AttribClass_V5_XList \ + X(Addr, DW_AttribClass_Address) \ + X(Block2, DW_AttribClass_Block) \ + X(Block4, DW_AttribClass_Block) \ + X(Data2, DW_AttribClass_Const) \ + X(Data4, DW_AttribClass_Const) \ + X(Data8, DW_AttribClass_Const) \ + X(String, DW_AttribClass_String) \ + X(Block, DW_AttribClass_Block) \ + X(Block1, DW_AttribClass_Block) \ + X(Data1, DW_AttribClass_Const) \ + X(Flag, DW_AttribClass_Flag) \ + X(SData, DW_AttribClass_Const) \ + X(Strp, DW_AttribClass_String) \ + X(UData, DW_AttribClass_Const) \ + X(RefAddr, DW_AttribClass_Reference) \ + X(Ref1, DW_AttribClass_Reference) \ + X(Ref2, DW_AttribClass_Reference) \ + X(Ref4, DW_AttribClass_Reference) \ + X(Ref8, DW_AttribClass_Reference) \ + X(RefUData, DW_AttribClass_Reference) \ + X(Indirect, DW_AttribClass_Null) \ + X(SecOffset, DW_AttribClass_AllPtrs) \ + X(ExprLoc, DW_AttribClass_ExprLoc) \ + X(FlagPresent, DW_AttribClass_Flag) \ + X(RefSig8, DW_AttribClass_Reference) \ + X(Strx, DW_AttribClass_String) \ + X(Addrx, DW_AttribClass_Address) \ + X(RefSup4, DW_AttribClass_Reference) \ + X(StrpSup, DW_AttribClass_String) \ + X(Data16, DW_AttribClass_Const) \ + X(LineStrp, DW_AttribClass_String) \ + X(ImplicitConst, DW_AttribClass_Const) \ + X(LocListx, DW_AttribClass_LocListPtr) \ + X(RngListx, DW_AttribClass_RngList) \ + X(RefSup8, DW_AttribClass_Reference) \ + X(Strx1, DW_AttribClass_String) \ + X(Strx2, DW_AttribClass_String) \ + X(Strx3, DW_AttribClass_String) \ + X(Strx4, DW_AttribClass_String) \ + X(Addrx1, DW_AttribClass_Address) \ + X(Addrx2, DW_AttribClass_Address) \ + X(Addrx3, DW_AttribClass_Address) \ + X(Addrx4, DW_AttribClass_Address) -#define DW_Form_GNU_XList(X) \ -X(GNU_AddrIndex, 0x1f01) \ -X(GNU_StrIndex, 0x1f02) \ -X(GNU_RefAlt, 0x1f20) \ -X(GNU_StrpAlt, 0x1f21) +#define DW_Form_GNU_XList \ + X(GNU_AddrIndex, 0x1f01) \ + X(GNU_StrIndex, 0x1f02) \ + X(GNU_RefAlt, 0x1f20) \ + X(GNU_StrpAlt, 0x1f21) -#define DW_Form_AttribClass_GNU_XList(X) \ -X(GNU_AddrIndex, DW_AttribClass_Undefined) \ -X(GNU_StrIndex, DW_AttribClass_Undefined) \ -X(GNU_RefAlt, DW_AttribClass_Undefined) \ -X(GNU_StrpAlt, DW_AttribClass_String) +#define DW_Form_AttribClass_GNU_XList \ + X(GNU_AddrIndex, DW_AttribClass_Undefined) \ + X(GNU_StrIndex, DW_AttribClass_Undefined) \ + X(GNU_RefAlt, DW_AttribClass_Undefined) \ + X(GNU_StrpAlt, DW_AttribClass_String) typedef U64 DW_FormKind; typedef enum DW_FormEnum { DW_Form_Null, #define X(_N, _ID) DW_Form_##_N = _ID, - DW_Form_V2_XList(X) - DW_Form_V4_XList(X) - DW_Form_V5_XList(X) - DW_Form_GNU_XList(X) + DW_Form_V2_XList + DW_Form_V4_XList + DW_Form_V5_XList + DW_Form_GNU_XList #undef X } DW_FormEnum; //- Attributes DWARF2 -#define DW_AttribKind_V2_XList(X) \ -X(Sibling, 0x1) \ -X(Location, 0x2) \ -X(Name, 0x3) \ -X(Ordering, 0x9) \ -X(ByteSize, 0xB) \ -X(BitOffset, 0xC) \ -X(BitSize, 0xD) \ -X(StmtList, 0x10) \ -X(LowPc, 0x11) \ -X(HighPc, 0x12) \ -X(Language, 0x13) \ -X(Discr, 0x15) \ -X(DiscrValue, 0x16) \ -X(Visibility, 0x17) \ -X(Import, 0x18) \ -X(StringLength, 0x19) \ -X(CommonReference, 0x1a) \ -X(CompDir, 0x1b) \ -X(ConstValue, 0x1c) \ -X(ContainingType, 0x1d) \ -X(DefaultValue, 0x1e) \ -X(Inline, 0x20) \ -X(IsOptional, 0x21) \ -X(LowerBound, 0x22) \ -X(Producer, 0x25) \ -X(Prototyped, 0x27) \ -X(ReturnAddr, 0x2a) \ -X(StartScope, 0x2c) \ -X(BitStride, 0x2e) \ -X(UpperBound, 0x2f) \ -X(AbstractOrigin, 0x31) \ -X(Accessibility, 0x32) \ -X(AddressClass, 0x33) \ -X(Artificial, 0x34) \ -X(BaseTypes, 0x35) \ -X(CallingConvention, 0x36) \ -X(Count, 0x37) \ -X(DataMemberLocation, 0x38) \ -X(DeclColumn, 0x39) \ -X(DeclFile, 0x3a) \ -X(DeclLine, 0x3b) \ -X(Declaration, 0x3c) \ -X(DiscrList, 0x3d) \ -X(Encoding, 0x3e) \ -X(External, 0x3f) \ -X(FrameBase, 0x40) \ -X(Friend, 0x41) \ -X(IdentifierCase, 0x42) \ -X(MacroInfo, 0x43) \ -X(NameListItem, 0x44) \ -X(Priority, 0x45) \ -X(Segment, 0x46) \ -X(Specification, 0x47) \ -X(StaticLink, 0x48) \ -X(Type, 0x49) \ -X(UseLocation, 0x4a) \ -X(VariableParameter, 0x4b) \ -X(Virtuality, 0x4c) \ -X(VTableElemLocation, 0x4d) +#define DW_AttribKind_V2_XList \ + X(Sibling, 0x1) \ + X(Location, 0x2) \ + X(Name, 0x3) \ + X(Ordering, 0x9) \ + X(ByteSize, 0xB) \ + X(BitOffset, 0xC) \ + X(BitSize, 0xD) \ + X(StmtList, 0x10) \ + X(LowPc, 0x11) \ + X(HighPc, 0x12) \ + X(Language, 0x13) \ + X(Discr, 0x15) \ + X(DiscrValue, 0x16) \ + X(Visibility, 0x17) \ + X(Import, 0x18) \ + X(StringLength, 0x19) \ + X(CommonReference, 0x1a) \ + X(CompDir, 0x1b) \ + X(ConstValue, 0x1c) \ + X(ContainingType, 0x1d) \ + X(DefaultValue, 0x1e) \ + X(Inline, 0x20) \ + X(IsOptional, 0x21) \ + X(LowerBound, 0x22) \ + X(Producer, 0x25) \ + X(Prototyped, 0x27) \ + X(ReturnAddr, 0x2a) \ + X(StartScope, 0x2c) \ + X(BitStride, 0x2e) \ + X(UpperBound, 0x2f) \ + X(AbstractOrigin, 0x31) \ + X(Accessibility, 0x32) \ + X(AddressClass, 0x33) \ + X(Artificial, 0x34) \ + X(BaseTypes, 0x35) \ + X(CallingConvention, 0x36) \ + X(Count, 0x37) \ + X(DataMemberLocation, 0x38) \ + X(DeclColumn, 0x39) \ + X(DeclFile, 0x3a) \ + X(DeclLine, 0x3b) \ + X(Declaration, 0x3c) \ + X(DiscrList, 0x3d) \ + X(Encoding, 0x3e) \ + X(External, 0x3f) \ + X(FrameBase, 0x40) \ + X(Friend, 0x41) \ + X(IdentifierCase, 0x42) \ + X(MacroInfo, 0x43) \ + X(NameListItem, 0x44) \ + X(Priority, 0x45) \ + X(Segment, 0x46) \ + X(Specification, 0x47) \ + X(StaticLink, 0x48) \ + X(Type, 0x49) \ + X(UseLocation, 0x4a) \ + X(VariableParameter, 0x4b) \ + X(Virtuality, 0x4c) \ + X(VTableElemLocation, 0x4d) -#define DW_AttribKind_ClassFlags_V2_XList(X) \ -X(Sibling, DW_AttribClass_Reference) \ -X(Location, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ -X(Name, DW_AttribClass_String) \ -X(Ordering, DW_AttribClass_Const) \ -X(ByteSize, DW_AttribClass_Const) \ -X(BitOffset, DW_AttribClass_Const) \ -X(BitSize, DW_AttribClass_Const) \ -X(StmtList, DW_AttribClass_Const) \ -X(LowPc, DW_AttribClass_Address) \ -X(HighPc, DW_AttribClass_Address) \ -X(Language, DW_AttribClass_Const) \ -X(Discr, DW_AttribClass_Reference) \ -X(DiscrValue, DW_AttribClass_Const) \ -X(Visibility, DW_AttribClass_Const) \ -X(Import, DW_AttribClass_Reference) \ -X(StringLength, DW_AttribClass_Block|DW_AttribClass_Const) \ -X(CommonReference, DW_AttribClass_Reference) \ -X(CompDir, DW_AttribClass_String) \ -X(ConstValue, DW_AttribClass_String|DW_AttribClass_Const|DW_AttribClass_Block) \ -X(ContainingType, DW_AttribClass_Reference) \ -X(DefaultValue, DW_AttribClass_Reference) \ -X(Inline, DW_AttribClass_Const) \ -X(IsOptional, DW_AttribClass_Flag) \ -X(LowerBound, DW_AttribClass_Const|DW_AttribClass_Reference) \ -X(Producer, DW_AttribClass_String) \ -X(Prototyped, DW_AttribClass_Flag) \ -X(ReturnAddr, DW_AttribClass_Block|DW_AttribClass_Const) \ -X(StartScope, DW_AttribClass_Const) \ -X(BitStride, DW_AttribClass_Const) /* dwarf-v1 DW_AttribKind_stride_size*/ \ -X(UpperBound, DW_AttribClass_Const|DW_AttribClass_Reference) \ -X(AbstractOrigin, DW_AttribClass_Reference) \ -X(Accessibility, DW_AttribClass_Const) \ -X(AddressClass, DW_AttribClass_Const) \ -X(Artificial, DW_AttribClass_Flag) \ -X(BaseTypes, DW_AttribClass_Reference) \ -X(CallingConvention, DW_AttribClass_Const) \ -X(Count, DW_AttribClass_Const|DW_AttribClass_Reference) \ -X(DataMemberLocation, DW_AttribClass_Block|DW_AttribClass_Reference) \ -X(DeclColumn, DW_AttribClass_Const) \ -X(DeclFile, DW_AttribClass_Const) \ -X(DeclLine, DW_AttribClass_Const) \ -X(Declaration, DW_AttribClass_Flag) \ -X(DiscrList, DW_AttribClass_Block) \ -X(Encoding, DW_AttribClass_Const) \ -X(External, DW_AttribClass_Flag) \ -X(FrameBase, DW_AttribClass_Block|DW_AttribClass_Const) \ -X(Friend, DW_AttribClass_Reference) \ -X(IdentifierCase, DW_AttribClass_Const) \ -X(MacroInfo, DW_AttribClass_Const) \ -X(NameListItem, DW_AttribClass_Block) \ -X(Priority, DW_AttribClass_Reference) \ -X(Segment, DW_AttribClass_Block|DW_AttribClass_Const) \ -X(Specification, DW_AttribClass_Reference) \ -X(StaticLink, DW_AttribClass_Block|DW_AttribClass_Const) \ -X(Type, DW_AttribClass_Reference) \ -X(UseLocation, DW_AttribClass_Block|DW_AttribClass_Const) \ -X(VariableParameter, DW_AttribClass_Flag) \ -X(Virtuality, DW_AttribClass_Const) \ -X(VTableElemLocation, DW_AttribClass_Block|DW_AttribClass_Reference) +#define DW_AttribKind_ClassFlags_V2_XList \ + X(Sibling, DW_AttribClass_Reference) \ + X(Location, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ + X(Name, DW_AttribClass_String) \ + X(Ordering, DW_AttribClass_Const) \ + X(ByteSize, DW_AttribClass_Const) \ + X(BitOffset, DW_AttribClass_Const) \ + X(BitSize, DW_AttribClass_Const) \ + X(StmtList, DW_AttribClass_Const) \ + X(LowPc, DW_AttribClass_Address) \ + X(HighPc, DW_AttribClass_Address) \ + X(Language, DW_AttribClass_Const) \ + X(Discr, DW_AttribClass_Reference) \ + X(DiscrValue, DW_AttribClass_Const) \ + X(Visibility, DW_AttribClass_Const) \ + X(Import, DW_AttribClass_Reference) \ + X(StringLength, DW_AttribClass_Block|DW_AttribClass_Const) \ + X(CommonReference, DW_AttribClass_Reference) \ + X(CompDir, DW_AttribClass_String) \ + X(ConstValue, DW_AttribClass_String|DW_AttribClass_Const|DW_AttribClass_Block) \ + X(ContainingType, DW_AttribClass_Reference) \ + X(DefaultValue, DW_AttribClass_Reference) \ + X(Inline, DW_AttribClass_Const) \ + X(IsOptional, DW_AttribClass_Flag) \ + X(LowerBound, DW_AttribClass_Const|DW_AttribClass_Reference) \ + X(Producer, DW_AttribClass_String) \ + X(Prototyped, DW_AttribClass_Flag) \ + X(ReturnAddr, DW_AttribClass_Block|DW_AttribClass_Const) \ + X(StartScope, DW_AttribClass_Const) \ + X(BitStride, DW_AttribClass_Const) /* dwarf-v1 DW_AttribKind_stride_size*/ \ + X(UpperBound, DW_AttribClass_Const|DW_AttribClass_Reference) \ + X(AbstractOrigin, DW_AttribClass_Reference) \ + X(Accessibility, DW_AttribClass_Const) \ + X(AddressClass, DW_AttribClass_Const) \ + X(Artificial, DW_AttribClass_Flag) \ + X(BaseTypes, DW_AttribClass_Reference) \ + X(CallingConvention, DW_AttribClass_Const) \ + X(Count, DW_AttribClass_Const|DW_AttribClass_Reference) \ + X(DataMemberLocation, DW_AttribClass_Block|DW_AttribClass_Reference) \ + X(DeclColumn, DW_AttribClass_Const) \ + X(DeclFile, DW_AttribClass_Const) \ + X(DeclLine, DW_AttribClass_Const) \ + X(Declaration, DW_AttribClass_Flag) \ + X(DiscrList, DW_AttribClass_Block) \ + X(Encoding, DW_AttribClass_Const) \ + X(External, DW_AttribClass_Flag) \ + X(FrameBase, DW_AttribClass_Block|DW_AttribClass_Const) \ + X(Friend, DW_AttribClass_Reference) \ + X(IdentifierCase, DW_AttribClass_Const) \ + X(MacroInfo, DW_AttribClass_Const) \ + X(NameListItem, DW_AttribClass_Block) \ + X(Priority, DW_AttribClass_Reference) \ + X(Segment, DW_AttribClass_Block|DW_AttribClass_Const) \ + X(Specification, DW_AttribClass_Reference) \ + X(StaticLink, DW_AttribClass_Block|DW_AttribClass_Const) \ + X(Type, DW_AttribClass_Reference) \ + X(UseLocation, DW_AttribClass_Block|DW_AttribClass_Const) \ + X(VariableParameter, DW_AttribClass_Flag) \ + X(Virtuality, DW_AttribClass_Const) \ + X(VTableElemLocation, DW_AttribClass_Block|DW_AttribClass_Reference) //- Attributes DWARF3 -#define DW_AttribKind_V3_XList(X) \ -X(Allocated, 0x4e) \ -X(Associated, 0x4f) \ -X(DataLocation, 0x50) \ -X(ByteStride, 0x51) \ -X(EntryPc, 0x52) \ -X(UseUtf8, 0x53) \ -X(Extension, 0x54) \ -X(Ranges, 0x55) \ -X(Trampoline, 0x56) \ -X(CallColumn, 0x57) \ -X(CallFile, 0x58) \ -X(CallLine, 0x59) \ -X(Description, 0x5a) \ -X(BinaryScale, 0x5b) \ -X(DecimalScale, 0x5c) \ -X(Small, 0x5d) \ -X(DecimalSign, 0x5e) \ -X(DigitCount, 0x5f) \ -X(PictureString, 0x60) \ -X(Mutable, 0x61) \ -X(ThreadsScaled, 0x62) \ -X(Explicit, 0x63) \ -X(ObjectPointer, 0x64) \ -X(Endianity, 0x65) \ -X(Elemental, 0x66) \ -X(Pure, 0x67) \ -X(Recursive, 0x68) +#define DW_AttribKind_V3_XList \ + X(Allocated, 0x4e) \ + X(Associated, 0x4f) \ + X(DataLocation, 0x50) \ + X(ByteStride, 0x51) \ + X(EntryPc, 0x52) \ + X(UseUtf8, 0x53) \ + X(Extension, 0x54) \ + X(Ranges, 0x55) \ + X(Trampoline, 0x56) \ + X(CallColumn, 0x57) \ + X(CallFile, 0x58) \ + X(CallLine, 0x59) \ + X(Description, 0x5a) \ + X(BinaryScale, 0x5b) \ + X(DecimalScale, 0x5c) \ + X(Small, 0x5d) \ + X(DecimalSign, 0x5e) \ + X(DigitCount, 0x5f) \ + X(PictureString, 0x60) \ + X(Mutable, 0x61) \ + X(ThreadsScaled, 0x62) \ + X(Explicit, 0x63) \ + X(ObjectPointer, 0x64) \ + X(Endianity, 0x65) \ + X(Elemental, 0x66) \ + X(Pure, 0x67) \ + X(Recursive, 0x68) -#define DW_AttribKind_ClassFlags_V3_XList(X) \ -X(Sibling, DW_AttribClass_Reference) \ -X(Location, DW_AttribClass_Block|DW_AttribClass_LocListPtr) \ -X(Name, DW_AttribClass_String) \ -X(Ordering, DW_AttribClass_Const) \ -X(ByteSize, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_Reference) \ -X(BitOffset, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_Reference) \ -X(BitSize, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_Reference) \ -X(StmtList, DW_AttribClass_LinePtr) \ -X(LowPc, DW_AttribClass_Address) \ -X(HighPc, DW_AttribClass_Address) \ -X(Language, DW_AttribClass_Const) \ -X(Discr, DW_AttribClass_Reference) \ -X(DiscrValue, DW_AttribClass_Const) \ -X(Visibility, DW_AttribClass_Const) \ -X(Import, DW_AttribClass_Reference) \ -X(StringLength, DW_AttribClass_Block|DW_AttribClass_LocListPtr) \ -X(CommonReference, DW_AttribClass_Reference) \ -X(CompDir, DW_AttribClass_String) \ -X(ConstValue, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_String) \ -X(ContainingType, DW_AttribClass_Reference) \ -X(DefaultValue, DW_AttribClass_Reference) \ -X(Inline, DW_AttribClass_Const) \ -X(IsOptional, DW_AttribClass_Flag) \ -X(LowerBound, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_Reference) \ -X(Producer, DW_AttribClass_String) \ -X(Prototyped, DW_AttribClass_Flag) \ -X(ReturnAddr, DW_AttribClass_Block|DW_AttribClass_LocListPtr) \ -X(StartScope, DW_AttribClass_Const) \ -X(BitStride, DW_AttribClass_Const) \ -X(UpperBound, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_Reference) \ -X(AbstractOrigin, DW_AttribClass_Reference) \ -X(Accessibility, DW_AttribClass_Const) \ -X(AddressClass, DW_AttribClass_Const) \ -X(Artificial, DW_AttribClass_Flag) \ -X(BaseTypes, DW_AttribClass_Reference) \ -X(CallingConvention, DW_AttribClass_Const) \ -X(Count, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_Reference) \ -X(DataMemberLocation, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_LocListPtr) \ -X(DeclColumn, DW_AttribClass_Const) \ -X(DeclFile, DW_AttribClass_Const) \ -X(DeclLine, DW_AttribClass_Const) \ -X(Declaration, DW_AttribClass_Flag) \ -X(DiscrList, DW_AttribClass_Block) \ -X(Encoding, DW_AttribClass_Const) \ -X(External, DW_AttribClass_Flag) \ -X(FrameBase, DW_AttribClass_Block|DW_AttribClass_LocListPtr) \ -X(Friend, DW_AttribClass_Reference) \ -X(IdentifierCase, DW_AttribClass_Const) \ -X(MacroInfo, DW_AttribClass_MacPtr) \ -X(NameListItem, DW_AttribClass_Block) \ -X(Priority, DW_AttribClass_Reference) \ -X(Segment, DW_AttribClass_Block|DW_AttribClass_LocListPtr) \ -X(Specification, DW_AttribClass_Reference) \ -X(StaticLink, DW_AttribClass_Block|DW_AttribClass_LocListPtr) \ -X(Type, DW_AttribClass_Reference) \ -X(UseLocation, DW_AttribClass_Block|DW_AttribClass_LocListPtr) \ -X(VariableParameter, DW_AttribClass_Flag) \ -X(Virtuality, DW_AttribClass_Const) \ -X(VTableElemLocation, DW_AttribClass_Block|DW_AttribClass_LocListPtr) \ -X(Allocated, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_Reference) \ -X(Associated, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_Reference) \ -X(DataLocation, DW_AttribClass_Block) \ -X(ByteStride, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_Reference) \ -X(EntryPc, DW_AttribClass_Address) \ -X(UseUtf8, DW_AttribClass_Flag) \ -X(Extension, DW_AttribClass_Reference) \ -X(Ranges, DW_AttribClass_RngListPtr) \ -X(Trampoline, DW_AttribClass_Address|DW_AttribClass_Flag|DW_AttribClass_Reference|DW_AttribClass_String) \ -X(CallColumn, DW_AttribClass_Const) \ -X(CallFile, DW_AttribClass_Const) \ -X(CallLine, DW_AttribClass_Const) \ -X(Description, DW_AttribClass_String) \ -X(BinaryScale, DW_AttribClass_Const) \ -X(DecimalScale, DW_AttribClass_Const) \ -X(Small, DW_AttribClass_Reference) \ -X(DecimalSign, DW_AttribClass_Const) \ -X(DigitCount, DW_AttribClass_Const) \ -X(PictureString, DW_AttribClass_String) \ -X(Mutable, DW_AttribClass_Flag) \ -X(ThreadsScaled, DW_AttribClass_Flag) \ -X(Explicit, DW_AttribClass_Flag) \ -X(ObjectPointer, DW_AttribClass_Reference) \ -X(Endianity, DW_AttribClass_Const) \ -X(Elemental, DW_AttribClass_Flag) \ -X(Pure, DW_AttribClass_Flag) \ -X(Recursive, DW_AttribClass_Flag) +#define DW_AttribKind_ClassFlags_V3_XList \ + X(Sibling, DW_AttribClass_Reference) \ + X(Location, DW_AttribClass_Block|DW_AttribClass_LocListPtr) \ + X(Name, DW_AttribClass_String) \ + X(Ordering, DW_AttribClass_Const) \ + X(ByteSize, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_Reference) \ + X(BitOffset, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_Reference) \ + X(BitSize, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_Reference) \ + X(StmtList, DW_AttribClass_LinePtr) \ + X(LowPc, DW_AttribClass_Address) \ + X(HighPc, DW_AttribClass_Address) \ + X(Language, DW_AttribClass_Const) \ + X(Discr, DW_AttribClass_Reference) \ + X(DiscrValue, DW_AttribClass_Const) \ + X(Visibility, DW_AttribClass_Const) \ + X(Import, DW_AttribClass_Reference) \ + X(StringLength, DW_AttribClass_Block|DW_AttribClass_LocListPtr) \ + X(CommonReference, DW_AttribClass_Reference) \ + X(CompDir, DW_AttribClass_String) \ + X(ConstValue, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_String) \ + X(ContainingType, DW_AttribClass_Reference) \ + X(DefaultValue, DW_AttribClass_Reference) \ + X(Inline, DW_AttribClass_Const) \ + X(IsOptional, DW_AttribClass_Flag) \ + X(LowerBound, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_Reference) \ + X(Producer, DW_AttribClass_String) \ + X(Prototyped, DW_AttribClass_Flag) \ + X(ReturnAddr, DW_AttribClass_Block|DW_AttribClass_LocListPtr) \ + X(StartScope, DW_AttribClass_Const) \ + X(BitStride, DW_AttribClass_Const) \ + X(UpperBound, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_Reference) \ + X(AbstractOrigin, DW_AttribClass_Reference) \ + X(Accessibility, DW_AttribClass_Const) \ + X(AddressClass, DW_AttribClass_Const) \ + X(Artificial, DW_AttribClass_Flag) \ + X(BaseTypes, DW_AttribClass_Reference) \ + X(CallingConvention, DW_AttribClass_Const) \ + X(Count, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_Reference) \ + X(DataMemberLocation, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_LocListPtr) \ + X(DeclColumn, DW_AttribClass_Const) \ + X(DeclFile, DW_AttribClass_Const) \ + X(DeclLine, DW_AttribClass_Const) \ + X(Declaration, DW_AttribClass_Flag) \ + X(DiscrList, DW_AttribClass_Block) \ + X(Encoding, DW_AttribClass_Const) \ + X(External, DW_AttribClass_Flag) \ + X(FrameBase, DW_AttribClass_Block|DW_AttribClass_LocListPtr) \ + X(Friend, DW_AttribClass_Reference) \ + X(IdentifierCase, DW_AttribClass_Const) \ + X(MacroInfo, DW_AttribClass_MacPtr) \ + X(NameListItem, DW_AttribClass_Block) \ + X(Priority, DW_AttribClass_Reference) \ + X(Segment, DW_AttribClass_Block|DW_AttribClass_LocListPtr) \ + X(Specification, DW_AttribClass_Reference) \ + X(StaticLink, DW_AttribClass_Block|DW_AttribClass_LocListPtr) \ + X(Type, DW_AttribClass_Reference) \ + X(UseLocation, DW_AttribClass_Block|DW_AttribClass_LocListPtr) \ + X(VariableParameter, DW_AttribClass_Flag) \ + X(Virtuality, DW_AttribClass_Const) \ + X(VTableElemLocation, DW_AttribClass_Block|DW_AttribClass_LocListPtr) \ + X(Allocated, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_Reference) \ + X(Associated, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_Reference) \ + X(DataLocation, DW_AttribClass_Block) \ + X(ByteStride, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_Reference) \ + X(EntryPc, DW_AttribClass_Address) \ + X(UseUtf8, DW_AttribClass_Flag) \ + X(Extension, DW_AttribClass_Reference) \ + X(Ranges, DW_AttribClass_RngListPtr) \ + X(Trampoline, DW_AttribClass_Address|DW_AttribClass_Flag|DW_AttribClass_Reference|DW_AttribClass_String) \ + X(CallColumn, DW_AttribClass_Const) \ + X(CallFile, DW_AttribClass_Const) \ + X(CallLine, DW_AttribClass_Const) \ + X(Description, DW_AttribClass_String) \ + X(BinaryScale, DW_AttribClass_Const) \ + X(DecimalScale, DW_AttribClass_Const) \ + X(Small, DW_AttribClass_Reference) \ + X(DecimalSign, DW_AttribClass_Const) \ + X(DigitCount, DW_AttribClass_Const) \ + X(PictureString, DW_AttribClass_String) \ + X(Mutable, DW_AttribClass_Flag) \ + X(ThreadsScaled, DW_AttribClass_Flag) \ + X(Explicit, DW_AttribClass_Flag) \ + X(ObjectPointer, DW_AttribClass_Reference) \ + X(Endianity, DW_AttribClass_Const) \ + X(Elemental, DW_AttribClass_Flag) \ + X(Pure, DW_AttribClass_Flag) \ + X(Recursive, DW_AttribClass_Flag) //- Attributes DWARF4 -#define DW_AttribKind_V4_XList(X) \ -X(Signature, 0x69) \ -X(MainSubProgram, 0x6a) \ -X(DataBitOffset, 0x6b) \ -X(ConstExpr, 0x6c) \ -X(EnumClass, 0x6d) \ -X(LinkageName, 0x6e) +#define DW_AttribKind_V4_XList \ + X(Signature, 0x69) \ + X(MainSubProgram, 0x6a) \ + X(DataBitOffset, 0x6b) \ + X(ConstExpr, 0x6c) \ + X(EnumClass, 0x6d) \ + X(LinkageName, 0x6e) -#define DW_AttribKind_ClassFlags_V4_XList(X) \ -X(Sibling, DW_AttribClass_Reference) \ -X(Location, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ -X(Name, DW_AttribClass_String) \ -X(Ordering, DW_AttribClass_Const) \ -X(ByteSize, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ -X(BitOffset, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ -X(BitSize, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ -X(StmtList, DW_AttribClass_LinePtr) \ -X(LowPc, DW_AttribClass_Address) \ -X(HighPc, DW_AttribClass_Address|DW_AttribClass_Const) \ -X(Language, DW_AttribClass_Const) \ -X(Discr, DW_AttribClass_Reference) \ -X(DiscrValue, DW_AttribClass_Const) \ -X(Visibility, DW_AttribClass_Const) \ -X(Import, DW_AttribClass_Reference) \ -X(StringLength, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ -X(CommonReference, DW_AttribClass_Reference) \ -X(CompDir, DW_AttribClass_String) \ -X(ConstValue, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_String) \ -X(ContainingType, DW_AttribClass_Reference) \ -X(DefaultValue, DW_AttribClass_Reference) \ -X(Inline, DW_AttribClass_Const) \ -X(IsOptional, DW_AttribClass_Flag) \ -X(LowerBound, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ -X(Producer, DW_AttribClass_String) \ -X(Prototyped, DW_AttribClass_Flag) \ -X(ReturnAddr, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ -X(StartScope, DW_AttribClass_Const|DW_AttribClass_RngListPtr) \ -X(BitStride, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ -X(UpperBound, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ -X(AbstractOrigin, DW_AttribClass_Reference) \ -X(Accessibility, DW_AttribClass_Const) \ -X(AddressClass, DW_AttribClass_Const) \ -X(Artificial, DW_AttribClass_Flag) \ -X(BaseTypes, DW_AttribClass_Reference) \ -X(CallingConvention, DW_AttribClass_Const) \ -X(Count, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ -X(DataMemberLocation, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ -X(DeclColumn, DW_AttribClass_Const) \ -X(DeclFile, DW_AttribClass_Const) \ -X(DeclLine, DW_AttribClass_Const) \ -X(Declaration, DW_AttribClass_Flag) \ -X(DiscrList, DW_AttribClass_Block) \ -X(Encoding, DW_AttribClass_Const) \ -X(External, DW_AttribClass_Flag) \ -X(FrameBase, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ -X(Friend, DW_AttribClass_Reference) \ -X(IdentifierCase, DW_AttribClass_Const) \ -X(MacroInfo, DW_AttribClass_MacPtr) \ -X(NameListItem, DW_AttribClass_Reference) \ -X(Priority, DW_AttribClass_Reference) \ -X(Segment, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ -X(Specification, DW_AttribClass_Reference) \ -X(StaticLink, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ -X(Type, DW_AttribClass_Reference) \ -X(UseLocation, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ -X(VariableParameter, DW_AttribClass_Flag) \ -X(Virtuality, DW_AttribClass_Const) \ -X(VTableElemLocation, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ -X(Allocated, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ -X(Associated, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ -X(DataLocation, DW_AttribClass_ExprLoc) \ -X(ByteStride, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ -X(EntryPc, DW_AttribClass_Address) \ -X(UseUtf8, DW_AttribClass_Flag) \ -X(Extension, DW_AttribClass_Reference) \ -X(Ranges, DW_AttribClass_RngListPtr) \ -X(Trampoline, DW_AttribClass_Address|DW_AttribClass_Flag|DW_AttribClass_Reference|DW_AttribClass_String) \ -X(CallColumn, DW_AttribClass_Const) \ -X(CallFile, DW_AttribClass_Const) \ -X(CallLine, DW_AttribClass_Const) \ -X(Description, DW_AttribClass_String) \ -X(BinaryScale, DW_AttribClass_Const) \ -X(DecimalScale, DW_AttribClass_Const) \ -X(Small, DW_AttribClass_Reference) \ -X(DecimalSign, DW_AttribClass_Const) \ -X(DigitCount, DW_AttribClass_Const) \ -X(PictureString, DW_AttribClass_String) \ -X(Mutable, DW_AttribClass_Flag) \ -X(ThreadsScaled, DW_AttribClass_Flag) \ -X(Explicit, DW_AttribClass_Flag) \ -X(ObjectPointer, DW_AttribClass_Reference) \ -X(Endianity, DW_AttribClass_Const) \ -X(Elemental, DW_AttribClass_Flag) \ -X(Pure, DW_AttribClass_Flag) \ -X(Recursive, DW_AttribClass_Flag) \ -X(Signature, DW_AttribClass_Reference) \ -X(MainSubProgram, DW_AttribClass_Flag) \ -X(DataBitOffset, DW_AttribClass_Const) \ -X(ConstExpr, DW_AttribClass_Flag) \ -X(EnumClass, DW_AttribClass_Flag) \ -X(LinkageName, DW_AttribClass_String) +#define DW_AttribKind_ClassFlags_V4_XList \ + X(Sibling, DW_AttribClass_Reference) \ + X(Location, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ + X(Name, DW_AttribClass_String) \ + X(Ordering, DW_AttribClass_Const) \ + X(ByteSize, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ + X(BitOffset, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ + X(BitSize, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ + X(StmtList, DW_AttribClass_LinePtr) \ + X(LowPc, DW_AttribClass_Address) \ + X(HighPc, DW_AttribClass_Address|DW_AttribClass_Const) \ + X(Language, DW_AttribClass_Const) \ + X(Discr, DW_AttribClass_Reference) \ + X(DiscrValue, DW_AttribClass_Const) \ + X(Visibility, DW_AttribClass_Const) \ + X(Import, DW_AttribClass_Reference) \ + X(StringLength, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ + X(CommonReference, DW_AttribClass_Reference) \ + X(CompDir, DW_AttribClass_String) \ + X(ConstValue, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_String) \ + X(ContainingType, DW_AttribClass_Reference) \ + X(DefaultValue, DW_AttribClass_Reference) \ + X(Inline, DW_AttribClass_Const) \ + X(IsOptional, DW_AttribClass_Flag) \ + X(LowerBound, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ + X(Producer, DW_AttribClass_String) \ + X(Prototyped, DW_AttribClass_Flag) \ + X(ReturnAddr, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ + X(StartScope, DW_AttribClass_Const|DW_AttribClass_RngListPtr) \ + X(BitStride, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ + X(UpperBound, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ + X(AbstractOrigin, DW_AttribClass_Reference) \ + X(Accessibility, DW_AttribClass_Const) \ + X(AddressClass, DW_AttribClass_Const) \ + X(Artificial, DW_AttribClass_Flag) \ + X(BaseTypes, DW_AttribClass_Reference) \ + X(CallingConvention, DW_AttribClass_Const) \ + X(Count, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ + X(DataMemberLocation, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ + X(DeclColumn, DW_AttribClass_Const) \ + X(DeclFile, DW_AttribClass_Const) \ + X(DeclLine, DW_AttribClass_Const) \ + X(Declaration, DW_AttribClass_Flag) \ + X(DiscrList, DW_AttribClass_Block) \ + X(Encoding, DW_AttribClass_Const) \ + X(External, DW_AttribClass_Flag) \ + X(FrameBase, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ + X(Friend, DW_AttribClass_Reference) \ + X(IdentifierCase, DW_AttribClass_Const) \ + X(MacroInfo, DW_AttribClass_MacPtr) \ + X(NameListItem, DW_AttribClass_Reference) \ + X(Priority, DW_AttribClass_Reference) \ + X(Segment, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ + X(Specification, DW_AttribClass_Reference) \ + X(StaticLink, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ + X(Type, DW_AttribClass_Reference) \ + X(UseLocation, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ + X(VariableParameter, DW_AttribClass_Flag) \ + X(Virtuality, DW_AttribClass_Const) \ + X(VTableElemLocation, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ + X(Allocated, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ + X(Associated, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ + X(DataLocation, DW_AttribClass_ExprLoc) \ + X(ByteStride, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ + X(EntryPc, DW_AttribClass_Address) \ + X(UseUtf8, DW_AttribClass_Flag) \ + X(Extension, DW_AttribClass_Reference) \ + X(Ranges, DW_AttribClass_RngListPtr) \ + X(Trampoline, DW_AttribClass_Address|DW_AttribClass_Flag|DW_AttribClass_Reference|DW_AttribClass_String) \ + X(CallColumn, DW_AttribClass_Const) \ + X(CallFile, DW_AttribClass_Const) \ + X(CallLine, DW_AttribClass_Const) \ + X(Description, DW_AttribClass_String) \ + X(BinaryScale, DW_AttribClass_Const) \ + X(DecimalScale, DW_AttribClass_Const) \ + X(Small, DW_AttribClass_Reference) \ + X(DecimalSign, DW_AttribClass_Const) \ + X(DigitCount, DW_AttribClass_Const) \ + X(PictureString, DW_AttribClass_String) \ + X(Mutable, DW_AttribClass_Flag) \ + X(ThreadsScaled, DW_AttribClass_Flag) \ + X(Explicit, DW_AttribClass_Flag) \ + X(ObjectPointer, DW_AttribClass_Reference) \ + X(Endianity, DW_AttribClass_Const) \ + X(Elemental, DW_AttribClass_Flag) \ + X(Pure, DW_AttribClass_Flag) \ + X(Recursive, DW_AttribClass_Flag) \ + X(Signature, DW_AttribClass_Reference) \ + X(MainSubProgram, DW_AttribClass_Flag) \ + X(DataBitOffset, DW_AttribClass_Const) \ + X(ConstExpr, DW_AttribClass_Flag) \ + X(EnumClass, DW_AttribClass_Flag) \ + X(LinkageName, DW_AttribClass_String) //- Attributes DWARF5 -#define DW_AttribKind_V5_XList(X) \ -X(StringLengthBitSize, 0x6f) \ -X(StringLengthByteSize, 0x70) \ -X(Rank, 0x71) \ -X(StrOffsetsBase, 0x72) \ -X(AddrBase, 0x73) \ -X(RngListsBase, 0x74) \ -X(DwoName, 0x76) \ -X(Reference, 0x77) \ -X(RValueReference, 0x78) \ -X(Macros, 0x79) \ -X(CallAllCalls, 0x7a) \ -X(CallAllSourceCalls, 0x7b) \ -X(CallAllTailCalls, 0x7c) \ -X(CallReturnPc, 0x7d) \ -X(CallValue, 0x7e) \ -X(CallOrigin, 0x7f) \ -X(CallParameter, 0x80) \ -X(CallPc, 0x81) \ -X(CallTailCall, 0x82) \ -X(CallTarget, 0x83) \ -X(CallTargetClobbered, 0x84) \ -X(CallDataLocation, 0x85) \ -X(CallDataValue, 0x86) \ -X(NoReturn, 0x87) \ -X(Alignment, 0x88) \ -X(ExportSymbols, 0x89) \ -X(Deleted, 0x8a) \ -X(Defaulted, 0x8b) \ -X(LocListsBase, 0x8c) +#define DW_AttribKind_V5_XList \ + X(StringLengthBitSize, 0x6f) \ + X(StringLengthByteSize, 0x70) \ + X(Rank, 0x71) \ + X(StrOffsetsBase, 0x72) \ + X(AddrBase, 0x73) \ + X(RngListsBase, 0x74) \ + X(DwoName, 0x76) \ + X(Reference, 0x77) \ + X(RValueReference, 0x78) \ + X(Macros, 0x79) \ + X(CallAllCalls, 0x7a) \ + X(CallAllSourceCalls, 0x7b) \ + X(CallAllTailCalls, 0x7c) \ + X(CallReturnPc, 0x7d) \ + X(CallValue, 0x7e) \ + X(CallOrigin, 0x7f) \ + X(CallParameter, 0x80) \ + X(CallPc, 0x81) \ + X(CallTailCall, 0x82) \ + X(CallTarget, 0x83) \ + X(CallTargetClobbered, 0x84) \ + X(CallDataLocation, 0x85) \ + X(CallDataValue, 0x86) \ + X(NoReturn, 0x87) \ + X(Alignment, 0x88) \ + X(ExportSymbols, 0x89) \ + X(Deleted, 0x8a) \ + X(Defaulted, 0x8b) \ + X(LocListsBase, 0x8c) -#define DW_AttribKind_ClassFlags_V5_XList(X) \ -X(Sibling, DW_AttribClass_Reference) \ -X(Location, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ -X(Name, DW_AttribClass_String) \ -X(Ordering, DW_AttribClass_Const) \ -X(ByteSize, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ -X(BitOffset, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ -X(BitSize, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ -X(StmtList, DW_AttribClass_LinePtr) \ -X(LowPc, DW_AttribClass_Address) \ -X(HighPc, DW_AttribClass_Address|DW_AttribClass_Const) \ -X(Language, DW_AttribClass_Const) \ -X(Discr, DW_AttribClass_Reference) \ -X(DiscrValue, DW_AttribClass_Const) \ -X(Visibility, DW_AttribClass_Const) \ -X(Import, DW_AttribClass_Reference) \ -X(StringLength, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ -X(CommonReference, DW_AttribClass_Reference) \ -X(CompDir, DW_AttribClass_String) \ -X(ConstValue, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_String) \ -X(ContainingType, DW_AttribClass_Reference) \ -X(DefaultValue, DW_AttribClass_Reference) \ -X(Inline, DW_AttribClass_Const) \ -X(IsOptional, DW_AttribClass_Flag) \ -X(LowerBound, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ -X(Producer, DW_AttribClass_String) \ -X(Prototyped, DW_AttribClass_Flag) \ -X(ReturnAddr, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ -X(StartScope, DW_AttribClass_Const|DW_AttribClass_RngListPtr) \ -X(BitStride, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ -X(UpperBound, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ -X(AbstractOrigin, DW_AttribClass_Reference) \ -X(Accessibility, DW_AttribClass_Const) \ -X(AddressClass, DW_AttribClass_Const) \ -X(Artificial, DW_AttribClass_Flag) \ -X(BaseTypes, DW_AttribClass_Reference) \ -X(CallingConvention, DW_AttribClass_Const) \ -X(Count, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ -X(DataMemberLocation, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_LocList) \ -X(DeclColumn, DW_AttribClass_Const) \ -X(DeclFile, DW_AttribClass_Const) \ -X(DeclLine, DW_AttribClass_Const) \ -X(Declaration, DW_AttribClass_Flag) \ -X(DiscrList, DW_AttribClass_Block) \ -X(Encoding, DW_AttribClass_Const) \ -X(External, DW_AttribClass_Flag) \ -X(FrameBase, DW_AttribClass_ExprLoc|DW_AttribClass_LocList) \ -X(Friend, DW_AttribClass_Reference) \ -X(IdentifierCase, DW_AttribClass_Const) \ -X(MacroInfo, DW_AttribClass_MacPtr) \ -X(NameListItem, DW_AttribClass_Reference) \ -X(Priority, DW_AttribClass_Reference) \ -X(Segment, DW_AttribClass_ExprLoc|DW_AttribClass_LocList) \ -X(Specification, DW_AttribClass_Reference) \ -X(StaticLink, DW_AttribClass_ExprLoc|DW_AttribClass_LocList) \ -X(Type, DW_AttribClass_Reference) \ -X(UseLocation, DW_AttribClass_ExprLoc|DW_AttribClass_LocList) \ -X(VariableParameter, DW_AttribClass_Flag) \ -X(Virtuality, DW_AttribClass_Const) \ -X(VTableElemLocation, DW_AttribClass_ExprLoc|DW_AttribClass_LocList) \ -X(Allocated, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ -X(Associated, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ -X(DataLocation, DW_AttribClass_ExprLoc) \ -X(ByteStride, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ -X(EntryPc, DW_AttribClass_Address|DW_AttribClass_Const) \ -X(UseUtf8, DW_AttribClass_Flag) \ -X(Extension, DW_AttribClass_Reference) \ -X(Ranges, DW_AttribClass_RngList) \ -X(Trampoline, DW_AttribClass_Address|DW_AttribClass_Flag|DW_AttribClass_Reference|DW_AttribClass_String) \ -X(CallColumn, DW_AttribClass_Const) \ -X(CallFile, DW_AttribClass_Const) \ -X(CallLine, DW_AttribClass_Const) \ -X(Description, DW_AttribClass_String) \ -X(BinaryScale, DW_AttribClass_Const) \ -X(DecimalScale, DW_AttribClass_Const) \ -X(Small, DW_AttribClass_Reference) \ -X(DecimalSign, DW_AttribClass_Const) \ -X(DigitCount, DW_AttribClass_Const) \ -X(PictureString, DW_AttribClass_String) \ -X(Mutable, DW_AttribClass_Flag) \ -X(ThreadsScaled, DW_AttribClass_Flag) \ -X(Explicit, DW_AttribClass_Flag) \ -X(ObjectPointer, DW_AttribClass_Reference) \ -X(Endianity, DW_AttribClass_Const) \ -X(Elemental, DW_AttribClass_Flag) \ -X(Pure, DW_AttribClass_Flag) \ -X(Recursive, DW_AttribClass_Flag) \ -X(Signature, DW_AttribClass_Reference) \ -X(MainSubProgram, DW_AttribClass_Flag) \ -X(DataBitOffset, DW_AttribClass_Const) \ -X(ConstExpr, DW_AttribClass_Flag) \ -X(EnumClass, DW_AttribClass_Flag) \ -X(LinkageName, DW_AttribClass_String) \ -X(StringLengthBitSize, DW_AttribClass_Const) \ -X(StringLengthByteSize, DW_AttribClass_Const) \ -X(Rank, DW_AttribClass_Const|DW_AttribClass_ExprLoc) \ -X(StrOffsetsBase, DW_AttribClass_StrOffsetsPtr) \ -X(AddrBase, DW_AttribClass_AddrPtr) \ -X(RngListsBase, DW_AttribClass_RngListPtr) \ -X(DwoName, DW_AttribClass_String) \ -X(Reference, DW_AttribClass_Flag) \ -X(RValueReference, DW_AttribClass_Flag) \ -X(Macros, DW_AttribClass_MacPtr) \ -X(CallAllCalls, DW_AttribClass_Flag) \ -X(CallAllSourceCalls, DW_AttribClass_Flag) \ -X(CallAllTailCalls, DW_AttribClass_Flag) \ -X(CallReturnPc, DW_AttribClass_Address) \ -X(CallValue, DW_AttribClass_ExprLoc) \ -X(CallOrigin, DW_AttribClass_ExprLoc) \ -X(CallParameter, DW_AttribClass_Reference) \ -X(CallPc, DW_AttribClass_Address) \ -X(CallTailCall, DW_AttribClass_Flag) \ -X(CallTarget, DW_AttribClass_ExprLoc) \ -X(CallTargetClobbered, DW_AttribClass_ExprLoc) \ -X(CallDataLocation, DW_AttribClass_ExprLoc) \ -X(CallDataValue, DW_AttribClass_ExprLoc) \ -X(NoReturn, DW_AttribClass_Flag) \ -X(Alignment, DW_AttribClass_Const) \ -X(ExportSymbols, DW_AttribClass_Flag) \ -X(Deleted, DW_AttribClass_Flag) \ -X(Defaulted, DW_AttribClass_Const) \ -X(LocListsBase, DW_AttribClass_LocListPtr) +#define DW_AttribKind_ClassFlags_V5_XList \ + X(Sibling, DW_AttribClass_Reference) \ + X(Location, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ + X(Name, DW_AttribClass_String) \ + X(Ordering, DW_AttribClass_Const) \ + X(ByteSize, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ + X(BitOffset, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ + X(BitSize, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ + X(StmtList, DW_AttribClass_LinePtr) \ + X(LowPc, DW_AttribClass_Address) \ + X(HighPc, DW_AttribClass_Address|DW_AttribClass_Const) \ + X(Language, DW_AttribClass_Const) \ + X(Discr, DW_AttribClass_Reference) \ + X(DiscrValue, DW_AttribClass_Const) \ + X(Visibility, DW_AttribClass_Const) \ + X(Import, DW_AttribClass_Reference) \ + X(StringLength, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ + X(CommonReference, DW_AttribClass_Reference) \ + X(CompDir, DW_AttribClass_String) \ + X(ConstValue, DW_AttribClass_Block|DW_AttribClass_Const|DW_AttribClass_String) \ + X(ContainingType, DW_AttribClass_Reference) \ + X(DefaultValue, DW_AttribClass_Reference) \ + X(Inline, DW_AttribClass_Const) \ + X(IsOptional, DW_AttribClass_Flag) \ + X(LowerBound, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ + X(Producer, DW_AttribClass_String) \ + X(Prototyped, DW_AttribClass_Flag) \ + X(ReturnAddr, DW_AttribClass_ExprLoc|DW_AttribClass_LocListPtr) \ + X(StartScope, DW_AttribClass_Const|DW_AttribClass_RngListPtr) \ + X(BitStride, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ + X(UpperBound, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ + X(AbstractOrigin, DW_AttribClass_Reference) \ + X(Accessibility, DW_AttribClass_Const) \ + X(AddressClass, DW_AttribClass_Const) \ + X(Artificial, DW_AttribClass_Flag) \ + X(BaseTypes, DW_AttribClass_Reference) \ + X(CallingConvention, DW_AttribClass_Const) \ + X(Count, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ + X(DataMemberLocation, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_LocList) \ + X(DeclColumn, DW_AttribClass_Const) \ + X(DeclFile, DW_AttribClass_Const) \ + X(DeclLine, DW_AttribClass_Const) \ + X(Declaration, DW_AttribClass_Flag) \ + X(DiscrList, DW_AttribClass_Block) \ + X(Encoding, DW_AttribClass_Const) \ + X(External, DW_AttribClass_Flag) \ + X(FrameBase, DW_AttribClass_ExprLoc|DW_AttribClass_LocList) \ + X(Friend, DW_AttribClass_Reference) \ + X(IdentifierCase, DW_AttribClass_Const) \ + X(MacroInfo, DW_AttribClass_MacPtr) \ + X(NameListItem, DW_AttribClass_Reference) \ + X(Priority, DW_AttribClass_Reference) \ + X(Segment, DW_AttribClass_ExprLoc|DW_AttribClass_LocList) \ + X(Specification, DW_AttribClass_Reference) \ + X(StaticLink, DW_AttribClass_ExprLoc|DW_AttribClass_LocList) \ + X(Type, DW_AttribClass_Reference) \ + X(UseLocation, DW_AttribClass_ExprLoc|DW_AttribClass_LocList) \ + X(VariableParameter, DW_AttribClass_Flag) \ + X(Virtuality, DW_AttribClass_Const) \ + X(VTableElemLocation, DW_AttribClass_ExprLoc|DW_AttribClass_LocList) \ + X(Allocated, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ + X(Associated, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ + X(DataLocation, DW_AttribClass_ExprLoc) \ + X(ByteStride, DW_AttribClass_Const|DW_AttribClass_ExprLoc|DW_AttribClass_Reference) \ + X(EntryPc, DW_AttribClass_Address|DW_AttribClass_Const) \ + X(UseUtf8, DW_AttribClass_Flag) \ + X(Extension, DW_AttribClass_Reference) \ + X(Ranges, DW_AttribClass_RngList) \ + X(Trampoline, DW_AttribClass_Address|DW_AttribClass_Flag|DW_AttribClass_Reference|DW_AttribClass_String) \ + X(CallColumn, DW_AttribClass_Const) \ + X(CallFile, DW_AttribClass_Const) \ + X(CallLine, DW_AttribClass_Const) \ + X(Description, DW_AttribClass_String) \ + X(BinaryScale, DW_AttribClass_Const) \ + X(DecimalScale, DW_AttribClass_Const) \ + X(Small, DW_AttribClass_Reference) \ + X(DecimalSign, DW_AttribClass_Const) \ + X(DigitCount, DW_AttribClass_Const) \ + X(PictureString, DW_AttribClass_String) \ + X(Mutable, DW_AttribClass_Flag) \ + X(ThreadsScaled, DW_AttribClass_Flag) \ + X(Explicit, DW_AttribClass_Flag) \ + X(ObjectPointer, DW_AttribClass_Reference) \ + X(Endianity, DW_AttribClass_Const) \ + X(Elemental, DW_AttribClass_Flag) \ + X(Pure, DW_AttribClass_Flag) \ + X(Recursive, DW_AttribClass_Flag) \ + X(Signature, DW_AttribClass_Reference) \ + X(MainSubProgram, DW_AttribClass_Flag) \ + X(DataBitOffset, DW_AttribClass_Const) \ + X(ConstExpr, DW_AttribClass_Flag) \ + X(EnumClass, DW_AttribClass_Flag) \ + X(LinkageName, DW_AttribClass_String) \ + X(StringLengthBitSize, DW_AttribClass_Const) \ + X(StringLengthByteSize, DW_AttribClass_Const) \ + X(Rank, DW_AttribClass_Const|DW_AttribClass_ExprLoc) \ + X(StrOffsetsBase, DW_AttribClass_StrOffsetsPtr) \ + X(AddrBase, DW_AttribClass_AddrPtr) \ + X(RngListsBase, DW_AttribClass_RngListPtr) \ + X(DwoName, DW_AttribClass_String) \ + X(Reference, DW_AttribClass_Flag) \ + X(RValueReference, DW_AttribClass_Flag) \ + X(Macros, DW_AttribClass_MacPtr) \ + X(CallAllCalls, DW_AttribClass_Flag) \ + X(CallAllSourceCalls, DW_AttribClass_Flag) \ + X(CallAllTailCalls, DW_AttribClass_Flag) \ + X(CallReturnPc, DW_AttribClass_Address) \ + X(CallValue, DW_AttribClass_ExprLoc) \ + X(CallOrigin, DW_AttribClass_ExprLoc) \ + X(CallParameter, DW_AttribClass_Reference) \ + X(CallPc, DW_AttribClass_Address) \ + X(CallTailCall, DW_AttribClass_Flag) \ + X(CallTarget, DW_AttribClass_ExprLoc) \ + X(CallTargetClobbered, DW_AttribClass_ExprLoc) \ + X(CallDataLocation, DW_AttribClass_ExprLoc) \ + X(CallDataValue, DW_AttribClass_ExprLoc) \ + X(NoReturn, DW_AttribClass_Flag) \ + X(Alignment, DW_AttribClass_Const) \ + X(ExportSymbols, DW_AttribClass_Flag) \ + X(Deleted, DW_AttribClass_Flag) \ + X(Defaulted, DW_AttribClass_Const) \ + X(LocListsBase, DW_AttribClass_LocListPtr) //- Attributes GNU -#define DW_AttribKind_GNU_XList(X) \ -X(GNU_Vector, 0x2107) \ -X(GNU_GuardedBy, 0x2108) \ -X(GNU_PtGuardedBy, 0x2109) \ -X(GNU_Guarded, 0x210a) \ -X(GNU_PtGuarded, 0x210b) \ -X(GNU_LocksExcluded, 0x210c) \ -X(GNU_ExclusiveLocksRequired, 0x210d) \ -X(GNU_SharedLocksRequired, 0x210e) \ -X(GNU_OdrSignature, 0x210f) \ -X(GNU_TemplateName, 0x2110) \ -X(GNU_CallSiteValue, 0x2111) \ -X(GNU_CallSiteDataValue, 0x2112) \ -X(GNU_CallSiteTarget, 0x2113) \ -X(GNU_CallSiteTargetClobbered, 0x2114) \ -X(GNU_TailCall, 0x2115) \ -X(GNU_AllTailCallsSites, 0x2116) \ -X(GNU_AllCallSites, 0x2117) \ -X(GNU_AllSourceCallSites, 0x2118) \ -X(GNU_Macros, 0x2119) \ -X(GNU_Deleted, 0x211a) \ -X(GNU_DwoName, 0x2130) \ -X(GNU_DwoId, 0x2131) \ -X(GNU_RangesBase, 0x2132) \ -X(GNU_AddrBase, 0x2133) \ -X(GNU_PubNames, 0x2134) \ -X(GNU_PubTypes, 0x2135) \ -X(GNU_Discriminator, 0x2136) \ -X(GNU_LocViews, 0x2137) \ -X(GNU_EntryView, 0x2138) \ -X(GNU_DescriptiveType, 0x2302) \ -X(GNU_Numerator, 0x2303) \ -X(GNU_Denominator, 0x2304) \ -X(GNU_Bias, 0x2305) +#define DW_AttribKind_GNU_XList \ + X(GNU_Vector, 0x2107) \ + X(GNU_GuardedBy, 0x2108) \ + X(GNU_PtGuardedBy, 0x2109) \ + X(GNU_Guarded, 0x210a) \ + X(GNU_PtGuarded, 0x210b) \ + X(GNU_LocksExcluded, 0x210c) \ + X(GNU_ExclusiveLocksRequired, 0x210d) \ + X(GNU_SharedLocksRequired, 0x210e) \ + X(GNU_OdrSignature, 0x210f) \ + X(GNU_TemplateName, 0x2110) \ + X(GNU_CallSiteValue, 0x2111) \ + X(GNU_CallSiteDataValue, 0x2112) \ + X(GNU_CallSiteTarget, 0x2113) \ + X(GNU_CallSiteTargetClobbered, 0x2114) \ + X(GNU_TailCall, 0x2115) \ + X(GNU_AllTailCallsSites, 0x2116) \ + X(GNU_AllCallSites, 0x2117) \ + X(GNU_AllSourceCallSites, 0x2118) \ + X(GNU_Macros, 0x2119) \ + X(GNU_Deleted, 0x211a) \ + X(GNU_DwoName, 0x2130) \ + X(GNU_DwoId, 0x2131) \ + X(GNU_RangesBase, 0x2132) \ + X(GNU_AddrBase, 0x2133) \ + X(GNU_PubNames, 0x2134) \ + X(GNU_PubTypes, 0x2135) \ + X(GNU_Discriminator, 0x2136) \ + X(GNU_LocViews, 0x2137) \ + X(GNU_EntryView, 0x2138) \ + X(GNU_DescriptiveType, 0x2302) \ + X(GNU_Numerator, 0x2303) \ + X(GNU_Denominator, 0x2304) \ + X(GNU_Bias, 0x2305) -#define DW_AttribKind_ClassFlags_GNU_XList(X) \ -X(GNU_Vector, DW_AttribClass_Flag) \ -X(GNU_GuardedBy, DW_AttribClass_Undefined) \ -X(GNU_PtGuardedBy, DW_AttribClass_Undefined) \ -X(GNU_Guarded, DW_AttribClass_Undefined) \ -X(GNU_PtGuarded, DW_AttribClass_Undefined) \ -X(GNU_LocksExcluded, DW_AttribClass_Undefined) \ -X(GNU_ExclusiveLocksRequired, DW_AttribClass_Undefined) \ -X(GNU_SharedLocksRequired, DW_AttribClass_Undefined) \ -X(GNU_OdrSignature, DW_AttribClass_Undefined) \ -X(GNU_TemplateName, DW_AttribClass_Undefined) \ -X(GNU_CallSiteValue, DW_AttribClass_ExprLoc) \ -X(GNU_CallSiteDataValue, DW_AttribClass_ExprLoc) \ -X(GNU_CallSiteTarget, DW_AttribClass_ExprLoc) \ -X(GNU_CallSiteTargetClobbered, DW_AttribClass_ExprLoc) \ -X(GNU_TailCall, DW_AttribClass_Flag) \ -X(GNU_AllTailCallsSites, DW_AttribClass_Flag) \ -X(GNU_AllCallSites, DW_AttribClass_Flag) \ -X(GNU_AllSourceCallSites, DW_AttribClass_Flag) \ -X(GNU_Macros, DW_AttribClass_Flag) \ -X(GNU_Deleted, DW_AttribClass_Undefined) \ -X(GNU_DwoName, DW_AttribClass_String) \ -X(GNU_DwoId, DW_AttribClass_Const) \ -X(GNU_RangesBase, DW_AttribClass_Undefined) \ -X(GNU_AddrBase, DW_AttribClass_AddrPtr) \ -X(GNU_PubNames, DW_AttribClass_Flag) \ -X(GNU_PubTypes, DW_AttribClass_Undefined) \ -X(GNU_Discriminator, DW_AttribClass_Const) \ -X(GNU_LocViews, DW_AttribClass_Undefined) \ -X(GNU_EntryView, DW_AttribClass_Undefined) \ -X(GNU_DescriptiveType, DW_AttribClass_Undefined) \ -X(GNU_Numerator, DW_AttribClass_Undefined) \ -X(GNU_Denominator, DW_AttribClass_Undefined) \ -X(GNU_Bias, DW_AttribClass_Undefined) +#define DW_AttribKind_ClassFlags_GNU_XList \ + X(GNU_Vector, DW_AttribClass_Flag) \ + X(GNU_GuardedBy, DW_AttribClass_Undefined) \ + X(GNU_PtGuardedBy, DW_AttribClass_Undefined) \ + X(GNU_Guarded, DW_AttribClass_Undefined) \ + X(GNU_PtGuarded, DW_AttribClass_Undefined) \ + X(GNU_LocksExcluded, DW_AttribClass_Undefined) \ + X(GNU_ExclusiveLocksRequired, DW_AttribClass_Undefined) \ + X(GNU_SharedLocksRequired, DW_AttribClass_Undefined) \ + X(GNU_OdrSignature, DW_AttribClass_Undefined) \ + X(GNU_TemplateName, DW_AttribClass_Undefined) \ + X(GNU_CallSiteValue, DW_AttribClass_ExprLoc) \ + X(GNU_CallSiteDataValue, DW_AttribClass_ExprLoc) \ + X(GNU_CallSiteTarget, DW_AttribClass_ExprLoc) \ + X(GNU_CallSiteTargetClobbered, DW_AttribClass_ExprLoc) \ + X(GNU_TailCall, DW_AttribClass_Flag) \ + X(GNU_AllTailCallsSites, DW_AttribClass_Flag) \ + X(GNU_AllCallSites, DW_AttribClass_Flag) \ + X(GNU_AllSourceCallSites, DW_AttribClass_Flag) \ + X(GNU_Macros, DW_AttribClass_Flag) \ + X(GNU_Deleted, DW_AttribClass_Undefined) \ + X(GNU_DwoName, DW_AttribClass_String) \ + X(GNU_DwoId, DW_AttribClass_Const) \ + X(GNU_RangesBase, DW_AttribClass_Undefined) \ + X(GNU_AddrBase, DW_AttribClass_AddrPtr) \ + X(GNU_PubNames, DW_AttribClass_Flag) \ + X(GNU_PubTypes, DW_AttribClass_Undefined) \ + X(GNU_Discriminator, DW_AttribClass_Const) \ + X(GNU_LocViews, DW_AttribClass_Undefined) \ + X(GNU_EntryView, DW_AttribClass_Undefined) \ + X(GNU_DescriptiveType, DW_AttribClass_Undefined) \ + X(GNU_Numerator, DW_AttribClass_Undefined) \ + X(GNU_Denominator, DW_AttribClass_Undefined) \ + X(GNU_Bias, DW_AttribClass_Undefined) //- Attributes LLVM -#define DW_AttribKind_LLVM_XList(X) \ -X(LLVM_IncludePath, 0x3e00) \ -X(LLVM_ConfigMacros, 0x3e01) \ -X(LLVM_SysRoot, 0x3e02) \ -X(LLVM_TagOffset, 0x3e03) \ -X(LLVM_ApiNotes, 0x3e07) +#define DW_AttribKind_LLVM_XList \ + X(LLVM_IncludePath, 0x3e00) \ + X(LLVM_ConfigMacros, 0x3e01) \ + X(LLVM_SysRoot, 0x3e02) \ + X(LLVM_TagOffset, 0x3e03) \ + X(LLVM_ApiNotes, 0x3e07) -#define DW_AttribKind_ClassFlags_LLVM_XList(X) \ -X(LLVM_IncludePath, DW_AttribClass_String) \ -X(LLVM_ConfigMacros, DW_AttribClass_String) \ -X(LLVM_SysRoot, DW_AttribClass_String) \ -X(LLVM_TagOffset, DW_AttribClass_Undefined) \ -X(LLVM_ApiNotes, DW_AttribClass_String) +#define DW_AttribKind_ClassFlags_LLVM_XList \ + X(LLVM_IncludePath, DW_AttribClass_String) \ + X(LLVM_ConfigMacros, DW_AttribClass_String) \ + X(LLVM_SysRoot, DW_AttribClass_String) \ + X(LLVM_TagOffset, DW_AttribClass_Undefined) \ + X(LLVM_ApiNotes, DW_AttribClass_String) //- Attributes Apple -#define DW_AttribKind_APPLE_XList(X) \ -X(APPLE_Optimized, 0x3fe1) \ -X(APPLE_Flags, 0x3fe2) \ -X(APPLE_Isa, 0x3fe3) \ -X(APPLE_Block, 0x3fe4) \ -X(APPLE_MajorRuntimeVers, 0x3fe5) \ -X(APPLE_RuntimeClass, 0x3fe6) \ -X(APPLE_OmitFramePtr, 0x3fe7) \ -X(APPLE_PropertyName, 0x3fe8) \ -X(APPLE_PropertyGetter, 0x3fe9) \ -X(APPLE_PropertySetter, 0x3fea) \ -X(APPLE_PropertyAttribute, 0x3feb) \ -X(APPLE_ObjcCompleteType, 0x3fec) \ -X(APPLE_Property, 0x3fed) \ -X(APPLE_ObjDirect, 0x3fee) \ -X(APPLE_Sdk, 0x3fef) +#define DW_AttribKind_APPLE_XList \ + X(APPLE_Optimized, 0x3fe1) \ + X(APPLE_Flags, 0x3fe2) \ + X(APPLE_Isa, 0x3fe3) \ + X(APPLE_Block, 0x3fe4) \ + X(APPLE_MajorRuntimeVers, 0x3fe5) \ + X(APPLE_RuntimeClass, 0x3fe6) \ + X(APPLE_OmitFramePtr, 0x3fe7) \ + X(APPLE_PropertyName, 0x3fe8) \ + X(APPLE_PropertyGetter, 0x3fe9) \ + X(APPLE_PropertySetter, 0x3fea) \ + X(APPLE_PropertyAttribute, 0x3feb) \ + X(APPLE_ObjcCompleteType, 0x3fec) \ + X(APPLE_Property, 0x3fed) \ + X(APPLE_ObjDirect, 0x3fee) \ + X(APPLE_Sdk, 0x3fef) -#define DW_AttribKind_ClassFlags_APPLE_XList(X) \ -X(APPLE_Optimized, DW_AttribClass_Flag) \ -X(APPLE_Flags, DW_AttribClass_Flag) \ -X(APPLE_Isa, DW_AttribClass_Flag) \ -X(APPLE_Block, DW_AttribClass_Undefined) \ -X(APPLE_MajorRuntimeVers, DW_AttribClass_Undefined) \ -X(APPLE_RuntimeClass, DW_AttribClass_Undefined) \ -X(APPLE_OmitFramePtr, DW_AttribClass_Flag) \ -X(APPLE_PropertyName, DW_AttribClass_Undefined) \ -X(APPLE_PropertyGetter, DW_AttribClass_Undefined) \ -X(APPLE_PropertySetter, DW_AttribClass_Undefined) \ -X(APPLE_PropertyAttribute, DW_AttribClass_Undefined) \ -X(APPLE_ObjcCompleteType, DW_AttribClass_Undefined) \ -X(APPLE_Property, DW_AttribClass_Undefined) \ -X(APPLE_ObjDirect, DW_AttribClass_Undefined) \ -X(APPLE_Sdk, DW_AttribClass_String) +#define DW_AttribKind_ClassFlags_APPLE_XList \ + X(APPLE_Optimized, DW_AttribClass_Flag) \ + X(APPLE_Flags, DW_AttribClass_Flag) \ + X(APPLE_Isa, DW_AttribClass_Flag) \ + X(APPLE_Block, DW_AttribClass_Undefined) \ + X(APPLE_MajorRuntimeVers, DW_AttribClass_Undefined) \ + X(APPLE_RuntimeClass, DW_AttribClass_Undefined) \ + X(APPLE_OmitFramePtr, DW_AttribClass_Flag) \ + X(APPLE_PropertyName, DW_AttribClass_Undefined) \ + X(APPLE_PropertyGetter, DW_AttribClass_Undefined) \ + X(APPLE_PropertySetter, DW_AttribClass_Undefined) \ + X(APPLE_PropertyAttribute, DW_AttribClass_Undefined) \ + X(APPLE_ObjcCompleteType, DW_AttribClass_Undefined) \ + X(APPLE_Property, DW_AttribClass_Undefined) \ + X(APPLE_ObjDirect, DW_AttribClass_Undefined) \ + X(APPLE_Sdk, DW_AttribClass_String) //- Attributes MIPS -#define DW_AttribKind_MIPS_XList(X) \ -X(MIPS_Fde, 0x2001) \ -X(MIPS_LoopBegin, 0x2002) \ -X(MIPS_TailLoopBegin, 0x2003) \ -X(MIPS_EpilogBegin, 0x2004) \ -X(MIPS_LoopUnrollFactor, 0x2005) \ -X(MIPS_SoftwarePipelineDepth, 0x2006) \ -X(MIPS_LinkageName, 0x2007) \ -X(MIPS_Stride, 0x2008) \ -X(MIPS_AbstractName, 0x2009) \ -X(MIPS_CloneOrigin, 0x200a) \ -X(MIPS_HasInlines, 0x200b) \ -X(MIPS_StrideByte, 0x200c) \ -X(MIPS_StrideElem, 0x200d) \ -X(MIPS_PtrDopeType, 0x200e) \ -X(MIPS_AllocatableDopeType, 0x200f) \ -X(MIPS_AssumedShapeDopeType, 0x2010) \ -X(MIPS_AssumedSize, 0x2011) +#define DW_AttribKind_MIPS_XList \ + X(MIPS_Fde, 0x2001) \ + X(MIPS_LoopBegin, 0x2002) \ + X(MIPS_TailLoopBegin, 0x2003) \ + X(MIPS_EpilogBegin, 0x2004) \ + X(MIPS_LoopUnrollFactor, 0x2005) \ + X(MIPS_SoftwarePipelineDepth, 0x2006) \ + X(MIPS_LinkageName, 0x2007) \ + X(MIPS_Stride, 0x2008) \ + X(MIPS_AbstractName, 0x2009) \ + X(MIPS_CloneOrigin, 0x200a) \ + X(MIPS_HasInlines, 0x200b) \ + X(MIPS_StrideByte, 0x200c) \ + X(MIPS_StrideElem, 0x200d) \ + X(MIPS_PtrDopeType, 0x200e) \ + X(MIPS_AllocatableDopeType, 0x200f) \ + X(MIPS_AssumedShapeDopeType, 0x2010) \ + X(MIPS_AssumedSize, 0x2011) -#define DW_AttribKind_ClassFlags_MIPS_XList(X) \ -X(MIPS_Fde, DW_AttribClass_Block) \ -X(MIPS_LoopBegin, DW_AttribClass_Block) \ -X(MIPS_TailLoopBegin, DW_AttribClass_Block) \ -X(MIPS_EpilogBegin, DW_AttribClass_Block) \ -X(MIPS_LoopUnrollFactor, DW_AttribClass_Block) \ -X(MIPS_SoftwarePipelineDepth, DW_AttribClass_Block) \ -X(MIPS_LinkageName, DW_AttribClass_String) \ -X(MIPS_Stride, DW_AttribClass_Block) \ -X(MIPS_AbstractName, DW_AttribClass_String) \ -X(MIPS_CloneOrigin, DW_AttribClass_String) \ -X(MIPS_HasInlines, DW_AttribClass_Reference) \ -X(MIPS_StrideByte, DW_AttribClass_Reference) \ -X(MIPS_StrideElem, DW_AttribClass_Reference) \ -X(MIPS_PtrDopeType, DW_AttribClass_Reference) \ -X(MIPS_AllocatableDopeType, DW_AttribClass_Reference) \ -X(MIPS_AssumedShapeDopeType, DW_AttribClass_Reference) \ -X(MIPS_AssumedSize, DW_AttribClass_Reference) +#define DW_AttribKind_ClassFlags_MIPS_XList \ + X(MIPS_Fde, DW_AttribClass_Block) \ + X(MIPS_LoopBegin, DW_AttribClass_Block) \ + X(MIPS_TailLoopBegin, DW_AttribClass_Block) \ + X(MIPS_EpilogBegin, DW_AttribClass_Block) \ + X(MIPS_LoopUnrollFactor, DW_AttribClass_Block) \ + X(MIPS_SoftwarePipelineDepth, DW_AttribClass_Block) \ + X(MIPS_LinkageName, DW_AttribClass_String) \ + X(MIPS_Stride, DW_AttribClass_Block) \ + X(MIPS_AbstractName, DW_AttribClass_String) \ + X(MIPS_CloneOrigin, DW_AttribClass_String) \ + X(MIPS_HasInlines, DW_AttribClass_Reference) \ + X(MIPS_StrideByte, DW_AttribClass_Reference) \ + X(MIPS_StrideElem, DW_AttribClass_Reference) \ + X(MIPS_PtrDopeType, DW_AttribClass_Reference) \ + X(MIPS_AllocatableDopeType, DW_AttribClass_Reference) \ + X(MIPS_AssumedShapeDopeType, DW_AttribClass_Reference) \ + X(MIPS_AssumedSize, DW_AttribClass_Reference) typedef U32 DW_AttribKind; typedef enum DW_AttribKindEnum { DW_AttribKind_Null, #define X(_N,_ID,...) DW_AttribKind_##_N = _ID, - DW_AttribKind_V2_XList(X) - DW_AttribKind_V3_XList(X) - DW_AttribKind_V4_XList(X) - DW_AttribKind_V5_XList(X) - DW_AttribKind_GNU_XList(X) - DW_AttribKind_LLVM_XList(X) - DW_AttribKind_APPLE_XList(X) - DW_AttribKind_MIPS_XList(X) + DW_AttribKind_V2_XList + DW_AttribKind_V3_XList + DW_AttribKind_V4_XList + DW_AttribKind_V5_XList + DW_AttribKind_GNU_XList + DW_AttribKind_LLVM_XList + DW_AttribKind_APPLE_XList + DW_AttribKind_MIPS_XList #undef X DW_AttribKind_UserLo = 0x2000, DW_AttribKind_UserHi = 0x3fff } DW_AttribKindEnum; -#define DW_ATE_XList(X) \ -X(Null, 0x00) \ -X(Address, 0x01) \ -X(Boolean, 0x02) \ -X(ComplexFloat, 0x03) \ -X(Float, 0x04) \ -X(Signed, 0x05) \ -X(SignedChar, 0x06) \ -X(Unsigned, 0x07) \ -X(UnsignedChar, 0x08) \ -X(ImaginaryFloat, 0x09) \ -X(PackedDecimal, 0x0A) \ -X(NumericString, 0x0B) \ -X(Edited, 0x0C) \ -X(SignedFixed, 0x0D) \ -X(UnsignedFixed, 0x0E) \ -X(DecimalFloat, 0x0F) \ -X(Utf, 0x10) \ -X(Ucs, 0x11) \ -X(Ascii, 0x12) +#define DW_ATE_XList \ + X(Null, 0x00) \ + X(Address, 0x01) \ + X(Boolean, 0x02) \ + X(ComplexFloat, 0x03) \ + X(Float, 0x04) \ + X(Signed, 0x05) \ + X(SignedChar, 0x06) \ + X(Unsigned, 0x07) \ + X(UnsignedChar, 0x08) \ + X(ImaginaryFloat, 0x09) \ + X(PackedDecimal, 0x0A) \ + X(NumericString, 0x0B) \ + X(Edited, 0x0C) \ + X(SignedFixed, 0x0D) \ + X(UnsignedFixed, 0x0E) \ + X(DecimalFloat, 0x0F) \ + X(Utf, 0x10) \ + X(Ucs, 0x11) \ + X(Ascii, 0x12) typedef U64 DW_ATE; typedef enum DW_ATEEnum { #define X(_N,_ID) DW_ATE_##_N = _ID, - DW_ATE_XList(X) + DW_ATE_XList #undef X } DW_ATEnum; -#define DW_CallingConventionKind_XList(X) \ -X(Normal, 0x0) \ -X(Program, 0x1) \ -X(NoCall, 0x3) \ -X(PassByValue, 0x4) \ -X(PassByReference, 0x5) +#define DW_CallingConventionKind_XList \ + X(Normal, 0x0) \ + X(Program, 0x1) \ + X(NoCall, 0x3) \ + X(PassByValue, 0x4) \ + X(PassByReference, 0x5) typedef U64 DW_CallingConventionKind; typedef enum DW_CallingConventionKindEnum { #define X(_N,_ID) DW_CallingConventionKind_##_N = _ID, - DW_CallingConventionKind_XList(X) + DW_CallingConventionKind_XList #undef X } DW_CallingConventionKindEnum; -#define DW_AccessKind_XList(X) \ -X(Public, 0x00) \ -X(Private, 0x01) \ -X(Protected, 0x02) +#define DW_AccessKind_XList \ + X(Public, 0x00) \ + X(Private, 0x01) \ + X(Protected, 0x02) typedef U64 DW_AccessKind; typedef enum DW_AccessKindEnum { #define X(_N,_ID) DW_AccessKind_##_N = _ID, - DW_AccessKind_XList(X) + DW_AccessKind_XList #undef X } DW_AccessKindEnum; -#define DW_VirtualityKind_XList(X) \ -X(None, 0x00) \ -X(Virtual, 0x01) \ -X(PureVirtual, 0x02) +#define DW_VirtualityKind_XList \ + X(None, 0x00) \ + X(Virtual, 0x01) \ + X(PureVirtual, 0x02) typedef U64 DW_VirtualityKind; typedef enum DW_VirtualityEnum { #define X(_N,_ID) DW_VirtualityKind_##_N = _ID, - DW_VirtualityKind_XList(X) + DW_VirtualityKind_XList #undef X } DW_VirtualityEnum; -#define DW_RngListEntryKind(X) \ -X(EndOfList, 0x00) \ -X(BaseAddressx, 0x01) \ -X(StartxEndx, 0x02) \ -X(StartxLength, 0x03) \ -X(OffsetPair, 0x04) \ -X(BaseAddress, 0x05) \ -X(StartEnd, 0x06) \ -X(StartLength, 0x07) +#define DW_RngListEntryKind \ + X(EndOfList, 0x00) \ + X(BaseAddressx, 0x01) \ + X(StartxEndx, 0x02) \ + X(StartxLength, 0x03) \ + X(OffsetPair, 0x04) \ + X(BaseAddress, 0x05) \ + X(StartEnd, 0x06) \ + X(StartLength, 0x07) typedef U8 DW_RLE; typedef enum DW_RLE_Enum { #define X(_N,_ID) DW_RLE_##_N = _ID, - DW_RngListEntryKind(X) + DW_RngListEntryKind #undef X } DW_RLE_Enum; -#define DW_LocListEntry_XList(X) \ -X(EndOfList, 0x00) \ -X(BaseAddressx, 0x01) \ -X(StartxEndx, 0x02) \ -X(StartxLength, 0x03) \ -X(OffsetPair, 0x04) \ -X(DefaultLocation, 0x05) \ -X(BaseAddress, 0x06) \ -X(StartEnd, 0x07) \ -X(StartLength, 0x08) +#define DW_LocListEntry_XList \ + X(EndOfList, 0x00) \ + X(BaseAddressx, 0x01) \ + X(StartxEndx, 0x02) \ + X(StartxLength, 0x03) \ + X(OffsetPair, 0x04) \ + X(DefaultLocation, 0x05) \ + X(BaseAddress, 0x06) \ + X(StartEnd, 0x07) \ + X(StartLength, 0x08) #define DW_LocListEntry_GNU_XList(X) \ X(GNU_ViewPair, 0x9) @@ -1280,58 +1274,58 @@ typedef U8 DW_LLE; typedef enum DW_LLE_Enum { #define X(_N,_ID) DW_LLE_##_N = _ID, - DW_LocListEntry_XList(X) + DW_LocListEntry_XList #undef X } DW_LLEEnum; -#define DW_AddrClass_XList(X) \ -X(None, 0) \ -X(Near16, 1) \ -X(Far16, 2) \ -X(Huge16, 3) \ -X(Near32, 4) \ -X(Far32, 5) +#define DW_AddrClass_XList \ + X(None, 0) \ + X(Near16, 1) \ + X(Far16, 2) \ + X(Huge16, 3) \ + X(Near32, 4) \ + X(Far32, 5) typedef U64 DW_AddrClass; typedef enum DW_AddrClassEnum { #define X(_N, _ID) DW_AddrClassKind_##_N = _ID, - DW_AddrClass_XList(X) + DW_AddrClass_XList #undef X } DW_AddrClassEnum; -#define DW_CompUnitKind_XList(X) \ -X(Reserved, 0) \ -X(Compile, 1) \ -X(Type, 2) \ -X(Partial, 3) \ -X(Skeleton, 4) \ -X(SplitCompile, 5) \ -X(SplitType, 6) +#define DW_CompUnitKind_XList \ + X(Reserved, 0) \ + X(Compile, 1) \ + X(Type, 2) \ + X(Partial, 3) \ + X(Skeleton, 4) \ + X(SplitCompile, 5) \ + X(SplitType, 6) typedef U8 DW_CompUnitKind; typedef enum DW_CompUnitKindEnum { #define X(_N, _ID) DW_CompUnitKind_##_N = _ID, - DW_CompUnitKind_XList(X) + DW_CompUnitKind_XList #undef X DW_CompUnitKind_UserLo = 0x80, DW_CompUnitKind_UserHi = 0xff } DW_CompUnitKindEnum; -#define DW_LNCT_XList(X) \ -X(Path, 0x1) \ -X(DirectoryIndex, 0x2) \ -X(TimeStamp, 0x3) \ -X(Size, 0x4) \ -X(MD5, 0x5) \ -X(LLVM_Source, 0x2001) +#define DW_LNCT_XList \ + X(Path, 0x1) \ + X(DirectoryIndex, 0x2) \ + X(TimeStamp, 0x3) \ + X(Size, 0x4) \ + X(MD5, 0x5) \ + X(LLVM_Source, 0x2001) typedef U64 DW_LNCT; typedef enum DW_LNCTEnum { #define X(_N, _ID) DW_LNCT_##_N = _ID, - DW_LNCT_XList(X) + DW_LNCT_XList #undef X DW_LNCT_UserLo = 0x2000, DW_LNCT_UserHi = 0x3fff @@ -1349,33 +1343,33 @@ typedef enum } DW_CFA_OperandType; // (opcode name, opcode id, operand count, operand types) -#define DW_CFA_Kind_XList(X) \ -X(Nop, 0x0) \ -X(SetLoc, 0x1, DW_CFA_OperandType_Value) \ -X(AdvanceLoc1, 0x2, DW_CFA_OperandType_Value) \ -X(AdvanceLoc2, 0x3, DW_CFA_OperandType_Value) \ -X(AdvanceLoc4, 0x4, DW_CFA_OperandType_Value) \ -X(OffsetExt, 0x5, DW_CFA_OperandType_Register, DW_CFA_OperandType_Value) \ -X(RestoreExt, 0x6) \ -X(Undefined, 0x7, DW_CFA_OperandType_Register) \ -X(SameValue, 0x8, DW_CFA_OperandType_Register) \ -X(Register, 0x9, DW_CFA_OperandType_Register) \ -X(RememberState, 0xa) \ -X(RestoreState, 0xb) \ -X(DefCfa, 0xc, DW_CFA_OperandType_Register, DW_CFA_OperandType_Value) \ -X(DefCfaRegister, 0xd, DW_CFA_OperandType_Register) \ -X(DefCfaOffset, 0xe, DW_CFA_OperandType_Value) \ -X(DefCfaExpr, 0xf, DW_CFA_OperandType_Expression) \ -X(Expr, 0x10, DW_CFA_OperandType_Expression) \ -X(OffsetExtSf, 0x11, DW_CFA_OperandType_Register, DW_CFA_OperandType_Value) \ -X(DefCfaSf, 0x12, DW_CFA_OperandType_Register, DW_CFA_OperandType_Value) \ -X(DefCfaOffsetSf, 0x13, DW_CFA_OperandType_Value) \ -X(ValOffset, 0x14, DW_CFA_OperandType_Register, DW_CFA_OperandType_Value) \ -X(ValOffsetSf, 0x15, DW_CFA_OperandType_Register, DW_CFA_OperandType_Value) \ -X(ValExpr, 0x16, DW_CFA_OperandType_Register, DW_CFA_OperandType_Expression) \ -X(AdvanceLoc, 0x40, DW_CFA_OperandType_Value) \ -X(Offset, 0x80, DW_CFA_OperandType_Register, DW_CFA_OperandType_Value) \ -X(Restore, 0xc0, DW_CFA_OperandType_Register) +#define DW_CFA_Kind_XList \ + X(Nop, 0x0) \ + X(SetLoc, 0x1, DW_CFA_OperandType_Value) \ + X(AdvanceLoc1, 0x2, DW_CFA_OperandType_Value) \ + X(AdvanceLoc2, 0x3, DW_CFA_OperandType_Value) \ + X(AdvanceLoc4, 0x4, DW_CFA_OperandType_Value) \ + X(OffsetExt, 0x5, DW_CFA_OperandType_Register, DW_CFA_OperandType_Value) \ + X(RestoreExt, 0x6) \ + X(Undefined, 0x7, DW_CFA_OperandType_Register) \ + X(SameValue, 0x8, DW_CFA_OperandType_Register) \ + X(Register, 0x9, DW_CFA_OperandType_Register) \ + X(RememberState, 0xa) \ + X(RestoreState, 0xb) \ + X(DefCfa, 0xc, DW_CFA_OperandType_Register, DW_CFA_OperandType_Value) \ + X(DefCfaRegister, 0xd, DW_CFA_OperandType_Register) \ + X(DefCfaOffset, 0xe, DW_CFA_OperandType_Value) \ + X(DefCfaExpr, 0xf, DW_CFA_OperandType_Expression) \ + X(Expr, 0x10, DW_CFA_OperandType_Expression) \ + X(OffsetExtSf, 0x11, DW_CFA_OperandType_Register, DW_CFA_OperandType_Value) \ + X(DefCfaSf, 0x12, DW_CFA_OperandType_Register, DW_CFA_OperandType_Value) \ + X(DefCfaOffsetSf, 0x13, DW_CFA_OperandType_Value) \ + X(ValOffset, 0x14, DW_CFA_OperandType_Register, DW_CFA_OperandType_Value) \ + X(ValOffsetSf, 0x15, DW_CFA_OperandType_Register, DW_CFA_OperandType_Value) \ + X(ValExpr, 0x16, DW_CFA_OperandType_Register, DW_CFA_OperandType_Expression) \ + X(AdvanceLoc, 0x40, DW_CFA_OperandType_Value) \ + X(Offset, 0x80, DW_CFA_OperandType_Register, DW_CFA_OperandType_Value) \ + X(Restore, 0xc0, DW_CFA_OperandType_Register) #define DW_CFA_OperandMax 2 #define DW_CFA_Mask_OpcodeHi 0xc0 @@ -1385,7 +1379,7 @@ typedef U8 DW_CFA_Opcode; typedef enum DW_CFA_Enum { #define X(_N, _ID, ...) DW_CFA_##_N = _ID, - DW_CFA_Kind_XList(X) + DW_CFA_Kind_XList #undef X } DW_CFA_Enum; @@ -1608,84 +1602,84 @@ typedef enum DW_ExprOpEnum //- Regs -#define DW_Regs_X64_XList(X) \ -X(Rax, 0, rax, 0, 8) \ -X(Rdx, 1, rdx, 0, 8) \ -X(Rcx, 2, rcx, 0, 8) \ -X(Rbx, 3, rbx, 0, 8) \ -X(Rsi, 4, rsi, 0, 8) \ -X(Rdi, 5, rdi, 0, 8) \ -X(Rbp, 6, rbp, 0, 8) \ -X(Rsp, 7, rsp, 0, 8) \ -X(R8, 8, r8, 0, 8) \ -X(R9, 9, r9, 0, 8) \ -X(R10, 10, r10, 0, 8) \ -X(R11, 11, r11, 0, 8) \ -X(R12, 12, r12, 0, 8) \ -X(R13, 13, r13, 0, 8) \ -X(R14, 14, r14, 0, 8) \ -X(R15, 15, r15, 0, 8) \ -X(Rip, 16, rip, 0, 8) \ -X(Xmm0, 17, zmm0, 0, 16) \ -X(Xmm1, 18, zmm1, 0, 16) \ -X(Xmm2, 19, zmm2, 0, 16) \ -X(Xmm3, 20, zmm3, 0, 16) \ -X(Xmm4, 21, zmm4, 0, 16) \ -X(Xmm5, 22, zmm5, 0, 16) \ -X(Xmm6, 23, zmm6, 0, 16) \ -X(Xmm7, 24, zmm7, 0, 16) \ -X(Xmm8, 25, zmm8, 0, 16) \ -X(Xmm9, 26, zmm9, 0, 16) \ -X(Xmm10, 27, zmm10, 0, 16) \ -X(Xmm11, 28, zmm11, 0, 16) \ -X(Xmm12, 29, zmm12, 0, 16) \ -X(Xmm13, 30, zmm13, 0, 16) \ -X(Xmm14, 31, zmm14, 0, 16) \ -X(Xmm15, 32, zmm15, 0, 16) \ -X(Xmm16, 67, zmm16, 0, 16) \ -X(Xmm17, 68, zmm17, 0, 16) \ -X(Xmm18, 69, zmm18, 0, 16) \ -X(Xmm19, 70, zmm19, 0, 16) \ -X(Xmm20, 71, zmm20, 0, 16) \ -X(Xmm21, 72, zmm21, 0, 16) \ -X(Xmm22, 73, zmm22, 0, 16) \ -X(Xmm23, 74, zmm23, 0, 16) \ -X(Xmm24, 75, zmm24, 0, 16) \ -X(Xmm25, 76, zmm25, 0, 16) \ -X(Xmm26, 77, zmm26, 0, 16) \ -X(Xmm27, 78, zmm27, 0, 16) \ -X(Xmm28, 79, zmm28, 0, 16) \ -X(Xmm29, 80, zmm29, 0, 16) \ -X(Xmm30, 81, zmm30, 0, 16) \ -X(Xmm31, 82, zmm31, 0, 16) \ -X(St0, 33, st0, 0, 10) \ -X(St1, 34, st1, 0, 10) \ -X(St2, 35, st2, 0, 10) \ -X(St3, 36, st3, 0, 10) \ -X(St4, 37, st4, 0, 10) \ -X(St5, 38, st5, 0, 10) \ -X(St6, 39, st6, 0, 10) \ -X(St7, 40, st7, 0, 10) \ -X(Mm0, 41, st0, 0, 8) \ -X(Mm1, 42, st1, 0, 8) \ -X(Mm2, 43, st2, 0, 8) \ -X(Mm3, 44, st3, 0, 8) \ -X(Mm4, 45, st4, 0, 8) \ -X(Mm5, 46, st5, 0, 8) \ -X(Mm6, 47, st6, 0, 8) \ -X(Mm7, 48, st7, 0, 8) \ -X(Rflags, 49, rflags, 0, 4) \ -X(Es, 50, es, 0, 2) \ -X(Cs, 51, cs, 0, 2) \ -X(Ss, 52, ss, 0, 2) \ -X(Ds, 53, ds, 0, 2) \ -X(Fs, 54, fs, 0, 2) \ -X(Gs, 55, gs, 0, 2) \ -X(FsBase, 58, fsbase, 0, 0) \ -X(GsBase, 59, gsbase, 0, 0) -// privileged registers: -// X(Tr, 62, nil, 0, 0) \ -// X(Ldtr, 63, nil, 0, 0) +#define DW_Regs_X64_XList \ + X(Rax, 0, rax, 0, 8) \ + X(Rdx, 1, rdx, 0, 8) \ + X(Rcx, 2, rcx, 0, 8) \ + X(Rbx, 3, rbx, 0, 8) \ + X(Rsi, 4, rsi, 0, 8) \ + X(Rdi, 5, rdi, 0, 8) \ + X(Rbp, 6, rbp, 0, 8) \ + X(Rsp, 7, rsp, 0, 8) \ + X(R8, 8, r8, 0, 8) \ + X(R9, 9, r9, 0, 8) \ + X(R10, 10, r10, 0, 8) \ + X(R11, 11, r11, 0, 8) \ + X(R12, 12, r12, 0, 8) \ + X(R13, 13, r13, 0, 8) \ + X(R14, 14, r14, 0, 8) \ + X(R15, 15, r15, 0, 8) \ + X(Rip, 16, rip, 0, 8) \ + X(Xmm0, 17, zmm0, 0, 16) \ + X(Xmm1, 18, zmm1, 0, 16) \ + X(Xmm2, 19, zmm2, 0, 16) \ + X(Xmm3, 20, zmm3, 0, 16) \ + X(Xmm4, 21, zmm4, 0, 16) \ + X(Xmm5, 22, zmm5, 0, 16) \ + X(Xmm6, 23, zmm6, 0, 16) \ + X(Xmm7, 24, zmm7, 0, 16) \ + X(Xmm8, 25, zmm8, 0, 16) \ + X(Xmm9, 26, zmm9, 0, 16) \ + X(Xmm10, 27, zmm10, 0, 16) \ + X(Xmm11, 28, zmm11, 0, 16) \ + X(Xmm12, 29, zmm12, 0, 16) \ + X(Xmm13, 30, zmm13, 0, 16) \ + X(Xmm14, 31, zmm14, 0, 16) \ + X(Xmm15, 32, zmm15, 0, 16) \ + X(Xmm16, 67, zmm16, 0, 16) \ + X(Xmm17, 68, zmm17, 0, 16) \ + X(Xmm18, 69, zmm18, 0, 16) \ + X(Xmm19, 70, zmm19, 0, 16) \ + X(Xmm20, 71, zmm20, 0, 16) \ + X(Xmm21, 72, zmm21, 0, 16) \ + X(Xmm22, 73, zmm22, 0, 16) \ + X(Xmm23, 74, zmm23, 0, 16) \ + X(Xmm24, 75, zmm24, 0, 16) \ + X(Xmm25, 76, zmm25, 0, 16) \ + X(Xmm26, 77, zmm26, 0, 16) \ + X(Xmm27, 78, zmm27, 0, 16) \ + X(Xmm28, 79, zmm28, 0, 16) \ + X(Xmm29, 80, zmm29, 0, 16) \ + X(Xmm30, 81, zmm30, 0, 16) \ + X(Xmm31, 82, zmm31, 0, 16) \ + X(St0, 33, st0, 0, 10) \ + X(St1, 34, st1, 0, 10) \ + X(St2, 35, st2, 0, 10) \ + X(St3, 36, st3, 0, 10) \ + X(St4, 37, st4, 0, 10) \ + X(St5, 38, st5, 0, 10) \ + X(St6, 39, st6, 0, 10) \ + X(St7, 40, st7, 0, 10) \ + X(Mm0, 41, st0, 0, 8) \ + X(Mm1, 42, st1, 0, 8) \ + X(Mm2, 43, st2, 0, 8) \ + X(Mm3, 44, st3, 0, 8) \ + X(Mm4, 45, st4, 0, 8) \ + X(Mm5, 46, st5, 0, 8) \ + X(Mm6, 47, st6, 0, 8) \ + X(Mm7, 48, st7, 0, 8) \ + X(Rflags, 49, rflags, 0, 4) \ + X(Es, 50, es, 0, 2) \ + X(Cs, 51, cs, 0, 2) \ + X(Ss, 52, ss, 0, 2) \ + X(Ds, 53, ds, 0, 2) \ + X(Fs, 54, fs, 0, 2) \ + X(Gs, 55, gs, 0, 2) \ + X(FsBase, 58, fsbase, 0, 0) \ + X(GsBase, 59, gsbase, 0, 0) + // privileged registers: + // X(Tr, 62, nil, 0, 0) \ + // X(Ldtr, 63, nil, 0, 0) typedef U32 DW_Reg; @@ -1693,30 +1687,13 @@ typedef DW_Reg DW_RegX64; typedef enum DW_RegX64Enum { #define X(_N,_ID,...) DW_RegX64_##_N = _ID, - DW_Regs_X64_XList(X) + DW_Regs_X64_XList #undef X DW_RegX64_Last } DW_RegX64Enum; //////////////////////////////// -typedef enum { - DW_UnwindStatus_Ok, - DW_UnwindStatus_Fail, - DW_UnwindStatus_Maybe -} DW_UnwindStatus; - -#define DW_REG_READ(name) DW_UnwindStatus name(DW_Reg reg_id, void *buffer, U64 buffer_max, void *ud) -typedef DW_REG_READ(DW_RegRead); - -#define DW_REG_WRITE(name) DW_UnwindStatus name(DW_Reg reg_id, void *value, U64 value_size, void *ud) -typedef DW_REG_WRITE(DW_RegWrite); - -#define DW_MEM_READ(name) DW_UnwindStatus name(U64 addr, U64 size, void *buffer, void *ud) -typedef DW_MEM_READ(DW_MemRead); - -//////////////////////////////// - internal U64 dw_reg_size_from_code_x64(DW_Reg reg_code); internal U64 dw_reg_pos_from_code_x64(DW_Reg reg_code); internal U64 dw_reg_size_from_code(Arch arch, DW_Reg reg_code); diff --git a/src/dwarf/dwarf_expr.c b/src/dwarf/dwarf_expr.c index f81afa4c..6bf706b1 100644 --- a/src/dwarf/dwarf_expr.c +++ b/src/dwarf/dwarf_expr.c @@ -1127,23 +1127,30 @@ dw_expr_inst_from_delta(DW_ExprInst *inst, S16 delta) return i; } -internal DW_UnwindStatus -dw_eval_expr(Arena *arena, DW_ExprContext *ctx, DW_Expr expr, DW_RegRead *reg_read, void *reg_read_ud, DW_ExprValue *value_out) +internal DW_ExprEvalResult +dw_eval_expr(Arena *arena, Arch arch, DW_Format format, U64 cfa, U64 tls, U64 exec_op_limit, DW_Expr expr, MachineOp_RegRead *reg_read, void *reg_read_ud, DW_ExprValue *value_out) { Temp scratch = scratch_begin(&arena, 1); - DW_UnwindStatus result = DW_UnwindStatus_Ok; - DW_PieceList pieces = {0}; - DW_ExprStack *stack = push_array(scratch.arena, DW_ExprStack, 1); - B32 is_ok = 1; + + DW_ExprEvalResult result = DW_ExprEvalResult_Fail; + DW_PieceList pieces = {0}; + DW_ExprStack *stack = push_array(scratch.arena, DW_ExprStack, 1); + U64 exec_op_count = 0; for EachNode(inst, DW_ExprInst, expr.first) { again:; + + exec_op_count += 1; + if (exec_op_count > exec_op_limit) { + Assert(0 && "reached opcode exec limit on the expression"); + result = DW_ExprEvalResult_ExecOpLimitReached; + goto exit; + } U64 pop_count = dw_pop_count_from_expr_op(inst->opcode); - if (pop_count >= stack->count) { + if (pop_count > stack->count) { Assert(0 && "not enough values on the stack to evaluate the instruction"); - is_ok = 0; - break; + goto exit; } switch (inst->opcode) { @@ -1187,18 +1194,18 @@ dw_eval_expr(Arena *arena, DW_ExprContext *ctx, DW_Expr expr, DW_RegRead *reg_re case DW_ExprOp_Reg27: case DW_ExprOp_Reg28: case DW_ExprOp_Reg29: case DW_ExprOp_Reg30: case DW_ExprOp_Reg31: { DW_Reg reg_id = inst->opcode - DW_ExprOp_Reg0; - U64 reg_size = dw_reg_size_from_code(ctx->arch, reg_id); + U64 reg_size = dw_reg_size_from_code(arch, reg_id); U8 *reg_value = push_array(scratch.arena, U8, reg_size); - result = reg_read(reg_id, reg_value, reg_size, reg_read_ud); - if (result != DW_UnwindStatus_Ok) { goto exit; } + MachineOpResult reg_read_result = reg_read(reg_id, reg_value, reg_size, reg_read_ud); + if (reg_read_result != MachineOpResult_Ok) { goto exit; } dw_expr_stack_push_unsigned(scratch.arena, stack, reg_value, reg_size); } break; case DW_ExprOp_RegX: { - U64 reg_size = dw_reg_size_from_code(ctx->arch, inst->operands[0].u64); + U64 reg_size = dw_reg_size_from_code(arch, inst->operands[0].u64); U8 *reg_value = push_array(scratch.arena, U8, reg_size); - result = reg_read(inst->operands[0].u64, reg_value, reg_size, reg_read_ud); - if (result != DW_UnwindStatus_Ok) { goto exit; } + MachineOpResult reg_read_result = reg_read(inst->operands[0].u64, reg_value, reg_size, reg_read_ud); + if (reg_read_result != MachineOpResult_Ok) { goto exit; } dw_expr_stack_push_unsigned(scratch.arena, stack, reg_value, reg_size); } break; @@ -1212,12 +1219,12 @@ dw_eval_expr(Arena *arena, DW_ExprContext *ctx, DW_Expr expr, DW_RegRead *reg_re case DW_ExprOp_Piece: { if (stack->count) { - String8 value = dw_string_from_expr_value(arena, ctx->arch, dw_expr_stack_pop(stack)); + String8 value = dw_string_from_expr_value(arena, arch, dw_expr_stack_pop(stack)); if (inst->operands[0].u64 <= value.size) { dw_piece_list_push(arena, &pieces, (DW_Piece){ .kind = DW_PieceKind_Value, .value = { .ptr = value.str, .bit_size = inst->operands[0].u64 * 8 }}); } else { Assert(0 && "out of bounds size in the piece opcode"); - result = DW_UnwindStatus_Fail; + goto exit; } } else { dw_piece_list_push(arena, &pieces, (DW_Piece){ .kind = DW_PieceKind_Undefined, .undef_bit_size = inst->operands[0].u64 * 8 }); @@ -1225,12 +1232,12 @@ dw_eval_expr(Arena *arena, DW_ExprContext *ctx, DW_Expr expr, DW_RegRead *reg_re } break; case DW_ExprOp_BitPiece: { if (stack->count) { - String8 value = dw_string_from_expr_value(arena, ctx->arch, dw_expr_stack_pop(stack)); + String8 value = dw_string_from_expr_value(arena, arch, dw_expr_stack_pop(stack)); if (inst->operands[0].u64 <= value.size * 8) { dw_piece_list_push(arena, &pieces, (DW_Piece){ .kind = DW_PieceKind_Value, .value = { .ptr = value.str, .bit_size = inst->operands[0].u64 }}); } else { Assert(0 && "out of bounds size in the bit piece opcode"); - result = DW_UnwindStatus_Fail; + goto exit; } } else { dw_piece_list_push(arena, &pieces, (DW_Piece){ .kind = DW_PieceKind_Undefined, .undef_bit_size = inst->operands[0].u64 }); @@ -1243,7 +1250,7 @@ dw_eval_expr(Arena *arena, DW_ExprContext *ctx, DW_Expr expr, DW_RegRead *reg_re dw_expr_stack_push(scratch.arena, stack, src->v); } else { Assert(0 && "out of bounds stack index"); - result = DW_UnwindStatus_Fail; + goto exit; } } break; @@ -1253,7 +1260,7 @@ dw_eval_expr(Arena *arena, DW_ExprContext *ctx, DW_Expr expr, DW_RegRead *reg_re dw_expr_stack_push(scratch.arena, stack, src->v); } else { Assert(0 && "out of bounds stack index"); - result = DW_UnwindStatus_Fail; + goto exit; } } break; @@ -1269,8 +1276,7 @@ dw_eval_expr(Arena *arena, DW_ExprContext *ctx, DW_Expr expr, DW_RegRead *reg_re if (i == 0) { Assert(0 && "seeking to an invalid offset"); - result = DW_UnwindStatus_Fail; - break; + goto exit; } inst = i; @@ -1282,16 +1288,14 @@ dw_eval_expr(Arena *arena, DW_ExprContext *ctx, DW_Expr expr, DW_RegRead *reg_re if (cond.type != DW_ExprValueType_S16) { Assert(0 && "unexpected value"); - result = DW_UnwindStatus_Fail; - break; + goto exit; } DW_ExprInst *i = dw_expr_inst_from_delta(inst, inst->operands[0].s16); if (i == 0) { Assert(0 && "seeking to an invalid offset"); - result = DW_UnwindStatus_Fail; - break; + goto exit; } inst = i; @@ -1334,18 +1338,17 @@ dw_eval_expr(Arena *arena, DW_ExprContext *ctx, DW_Expr expr, DW_RegRead *reg_re case DW_ExprOp_EntryValue: case DW_ExprOp_GNU_EntryValue: { - DW_Expr entry_value_expr = dw_expr_from_data(scratch.arena, ctx->format, byte_size_from_arch(ctx->arch), inst->operands[0].block); + DW_Expr entry_value_expr = dw_expr_from_data(scratch.arena, format, byte_size_from_arch(arch), inst->operands[0].block); DW_ExprValue entry_value; - result = dw_eval_expr(scratch.arena, ctx, entry_value_expr, reg_read, reg_read_ud, &entry_value); - if (result == DW_UnwindStatus_Ok) { - dw_expr_stack_push(scratch.arena, stack, entry_value); - } + result = dw_eval_expr(scratch.arena, arch, format, cfa, tls, exec_op_limit, entry_value_expr, reg_read, reg_read_ud, &entry_value); + if (result != DW_ExprEvalResult_Ok) { goto exit; } + dw_expr_stack_push(scratch.arena, stack, entry_value); } break; case DW_ExprOp_Addrx: { NotImplemented; } break; case DW_ExprOp_CallFrameCfa: { - dw_expr_stack_push(scratch.arena, stack, (DW_ExprValue){ .type = DW_ExprValueType_U64, .u64 = ctx->cfa }); + dw_expr_stack_push(scratch.arena, stack, (DW_ExprValue){ .type = DW_ExprValueType_U64, .u64 = cfa }); } break; case DW_ExprOp_PushObjectAddress: { NotImplemented; } break; @@ -1399,35 +1402,43 @@ dw_eval_expr(Arena *arena, DW_ExprContext *ctx, DW_Expr expr, DW_RegRead *reg_re } break; case DW_ExprOp_StackValue: { - stack->top->v.type = dw_expr_unsigned_value_type_from_bit_size(byte_size_from_arch(ctx->arch) * 8); + stack->top->v.type = dw_expr_unsigned_value_type_from_bit_size(bit_size_from_arch(arch)); } break; case DW_ExprOp_GNU_PushTlsAddress: case DW_ExprOp_FormTlsAddress: { DW_ExprValue tls_off = dw_expr_stack_pop(stack); - DW_ExprValue tls_base = { .type = DW_ExprValueType_Addr, .addr = ctx->tls_base }; + DW_ExprValue tls_base = { .type = DW_ExprValueType_Addr, .addr = tls }; DW_ExprValue tls_addr = dw_expr_add(tls_base, tls_off); dw_expr_stack_push(scratch.arena, stack, tls_addr); } break; } } + result = DW_ExprEvalResult_Ok; exit:; scratch_end(scratch); return result; } internal String8 -dw_encode_expr(Arena *arena, DW_Format format, U64 addr_size, DW_ExprEnc *encs, U64 encs_count) +dw_encode_expr(Arena *arena, Arch arch, DW_Format format, DW_ExprEnc *encs, U64 encs_count) { Temp scratch = scratch_begin(&arena, 1); + String8List *srl = push_array(scratch.arena, String8List, 1); str8_serial_begin(scratch.arena, srl); + HashTable *label_map = hash_table_init(scratch.arena, 128); + + struct Fixup { U64 offset; String8 label; struct Fixup *next; }; + struct Fixup *first_fixup = 0, *last_fixup = 0; + for EachIndex(i, encs_count) { DW_ExprEnc *e = &encs[i]; switch (e->type) { + case DW_ExprEncType_Null: {} break; case DW_ExprEncType_Op: { str8_serial_push_struct(scratch.arena, srl, &e->op); } break; @@ -1487,6 +1498,7 @@ dw_encode_expr(Arena *arena, DW_Format format, U64 addr_size, DW_ExprEnc *encs, str8_serial_push_string(scratch.arena, srl, str8(buffer, buffer_size)); } break; case DW_ExprEncType_Addr: { + U64 addr_size = byte_size_from_arch(arch); Assert(addr_size <= sizeof(e->addr)); str8_serial_push_string(scratch.arena, srl, str8((U8 *)&e->addr, addr_size)); } break; @@ -1504,16 +1516,39 @@ dw_encode_expr(Arena *arena, DW_Format format, U64 addr_size, DW_ExprEnc *encs, } } break; case DW_ExprEncType_Label: { - // TODO: + struct Fixup *fixup = push_array(scratch.arena, struct Fixup, 1); + fixup->offset = srl->total_size; + fixup->label = e->label; + SLLQueuePush(first_fixup, last_fixup, fixup); + + S16 delta_placeholder = 0; + str8_serial_push_struct(scratch.arena, srl, &delta_placeholder); } break; case DW_ExprEncType_DeclLabel: { - // TODO: + hash_table_push_string_u64(scratch.arena, label_map, e->label, srl->total_size); } break; default: { InvalidPath; } break; } } + // finalize expression String8 expr = str8_serial_end(arena, srl); + + // apply fixups + for EachNode(fixup, struct Fixup, first_fixup) { + U64 label_offset; + if (!hash_table_search_string_u64(label_map, fixup->label, &label_offset)) { + Assert(0 && "undefined label"); + continue; + } + + S64 delta = (S64)label_offset - (S64)fixup->offset; + AssertAlways(min_S16 <= delta && delta <= max_S16); + + S16 *delta_ptr = (S16 *)(expr.str + fixup->offset); + *delta_ptr = delta; + } + scratch_end(scratch); return expr; } diff --git a/src/dwarf/dwarf_expr.h b/src/dwarf/dwarf_expr.h index c1ac240f..6237d2e8 100644 --- a/src/dwarf/dwarf_expr.h +++ b/src/dwarf/dwarf_expr.h @@ -7,14 +7,6 @@ //////////////////////////////// // evaluator -typedef struct DW_ExprContext -{ - Arch arch; - DW_Format format; - U64 cfa; - U64 tls_base; -} DW_ExprContext; - #define DW_ExprValueType_IsSigned(x) ((x) == DW_ExprValueType_S8 || (x) == DW_ExprValueType_S16 || (x) == DW_ExprValueType_S32 || (x) == DW_ExprValueType_S64 || (x) == DW_ExprValueType_S128 || (x) == DW_ExprValueType_S256 || (x) == DW_ExprValueType_S512) #define DW_ExprValueType_IsUnsigned(x) ((x) == DW_ExprValueType_U8 || (x) == DW_ExprValueType_U16 || (x) == DW_ExprValueType_U32 || (x) == DW_ExprValueType_U64 || (x) == DW_ExprValueType_U128 || (x) == DW_ExprValueType_U256 || (x) == DW_ExprValueType_U512) #define DW_ExprValueType_IsFloat(x) ((x) == DW_ExprValueType_F32 || (x) == DW_ExprValueType_F64) @@ -75,12 +67,6 @@ typedef struct DW_ExprValueNode struct DW_ExprValueNode *next; } DW_ExprValueNode; -typedef struct DW_ExprStack -{ - U64 count; - DW_ExprValueNode *top; -} DW_ExprStack; - typedef enum { DW_PieceKind_Null, @@ -113,11 +99,25 @@ typedef struct DW_PieceList DW_PieceNode *last; } DW_PieceList; +typedef struct DW_ExprStack +{ + U64 count; + DW_ExprValueNode *top; +} DW_ExprStack; + typedef struct DW_ExprResult { int x; } DW_ExprResult; +typedef enum +{ + DW_ExprEvalResult_Fail, + DW_ExprEvalResult_Ok, + DW_ExprEvalResult_Maybe, + DW_ExprEvalResult_ExecOpLimitReached, +} DW_ExprEvalResult; + //////////////////////////////// // encoder @@ -157,26 +157,26 @@ typedef struct DW_ExprEnc S64 s64; U64 addr; String8 block; - char *label; + String8 label; }; } DW_ExprEnc; -#define DW_ExprEnc_Op(v) { .type = DW_ExprEncType_Op, .op = DW_ExprOp_##v } -#define DW_ExprEnc_U8(v) { .type = DW_ExprEncType_U8, .u8 = v } -#define DW_ExprEnc_U16(v) { .type = DW_ExprEncType_U16, .u16 = v } -#define DW_ExprEnc_U32(v) { .type = DW_ExprEncType_U32, .u32 = v } -#define DW_ExprEnc_U64(v) { .type = DW_ExprEncType_U64, .u64 = v } -#define DW_ExprEnc_S8(v) { .type = DW_ExprEncType_S8, .s8 = v } -#define DW_ExprEnc_S16(v) { .type = DW_ExprEncType_S16, .s16 = v } -#define DW_ExprEnc_S32(v) { .type = DW_ExprEncType_S32, .s32 = v } -#define DW_ExprEnc_S64(v) { .type = DW_ExprEncType_S64, .s64 = v } -#define DW_ExprEnc_ULEB128(v) { .type = DW_ExprEncType_ULEB128, .u64 = v } -#define DW_ExprEnc_SLEB128(v) { .type = DW_ExprEncType_SLEB128, .s64 = v } -#define DW_ExprEnc_Addr(v) { .type = DW_ExprEncType_Addr, .addr = v } -#define DW_ExprEnc_Block(v) { .type = DW_ExprEncType_Block, .block = v } -#define DW_ExprEnc_UInt(v) { .type = DW_ExprEncType_DwarfUInt, .u64 = v } -#define DW_ExprEnc_Label(v) { .type = DW_ExprEncType_Label, .label = v } -#define DW_ExprEnc_DeclLabel(v) { .type = DW_ExprEncType_DeclLabel, .label = v } +#define DW_ExprEnc_Op(v) { .type = DW_ExprEncType_Op, .op = DW_ExprOp_##v } +#define DW_ExprEnc_U8(v) { .type = DW_ExprEncType_U8, .u8 = v } +#define DW_ExprEnc_U16(v) { .type = DW_ExprEncType_U16, .u16 = v } +#define DW_ExprEnc_U32(v) { .type = DW_ExprEncType_U32, .u32 = v } +#define DW_ExprEnc_U64(v) { .type = DW_ExprEncType_U64, .u64 = v } +#define DW_ExprEnc_S8(v) { .type = DW_ExprEncType_S8, .s8 = v } +#define DW_ExprEnc_S16(v) { .type = DW_ExprEncType_S16, .s16 = v } +#define DW_ExprEnc_S32(v) { .type = DW_ExprEncType_S32, .s32 = v } +#define DW_ExprEnc_S64(v) { .type = DW_ExprEncType_S64, .s64 = v } +#define DW_ExprEnc_ULEB128(v) { .type = DW_ExprEncType_ULEB128, .u64 = v } +#define DW_ExprEnc_SLEB128(v) { .type = DW_ExprEncType_SLEB128, .s64 = v } +#define DW_ExprEnc_Addr(v) { .type = DW_ExprEncType_Addr, .addr = v } +#define DW_ExprEnc_Block(v) { .type = DW_ExprEncType_Block, .block = v } +#define DW_ExprEnc_UInt(v) { .type = DW_ExprEncType_DwarfUInt, .u64 = v } +#define DW_ExprEnc_Label(v) { .type = DW_ExprEncType_Label, .label = str8_lit_comp(v) } +#define DW_ExprEnc_DeclLabel(v) { .type = DW_ExprEncType_DeclLabel, .label = str8_lit_comp(v) } //////////////////////////////// @@ -235,10 +235,10 @@ internal DW_ExprValueNode * dw_expr_stack_pick(DW_ExprStack *stack, U64 idx); internal String8 dw_string_from_expr_value(Arena *arena, U64 addr_size, DW_ExprValue v); // evaluator -internal DW_UnwindStatus dw_eval_expr(Arena *arena, DW_ExprContext *ctx, DW_Expr expr, DW_RegRead *reg_read, void *reg_read_ud, DW_ExprValue *value_out); +internal DW_ExprEvalResult dw_eval_expr(Arena *arena, Arch arch, DW_Format format, U64 cfa, U64 tls_base, U64 op_limit, DW_Expr expr, MachineOp_RegRead *reg_read, void *reg_read_ud, DW_ExprValue *value_out); // encoder -internal String8 dw_encode_expr(Arena *arena, DW_Format format, U64 addr_size, DW_ExprEnc *encs, U64 encs_count); +internal String8 dw_encode_expr(Arena *arena, Arch arch, DW_Format format, DW_ExprEnc *encs, U64 encs_count); #endif //DWARF_EXPR_H diff --git a/src/dwarf/dwarf_parse.c b/src/dwarf/dwarf_parse.c index 3e2a4a1b..a2d60eff 100644 --- a/src/dwarf/dwarf_parse.c +++ b/src/dwarf/dwarf_parse.c @@ -176,7 +176,7 @@ dw_section_kind_from_string(String8 string) #define X(_K,_L,_M,_W) \ if (str8_match_lit(_L, string, 0)) { s = DW_Section_##_K; } \ if (str8_match_lit(_M, string, 0)) { s = DW_Section_##_K; } - DW_SectionKind_XList(X) + DW_SectionKind_XList #undef X return s; } @@ -187,7 +187,7 @@ dw_section_dwo_kind_from_string(String8 string) DW_SectionKind s = DW_Section_Null; #define X(_K,_L,_M,_W) \ if (str8_match_lit(_W, string, 0)) { s = DW_Section_##_K; } - DW_SectionKind_XList(X) + DW_SectionKind_XList #undef X return s; } diff --git a/src/rdi_from_dwarf/rdi_from_dwarf.c b/src/rdi_from_dwarf/rdi_from_dwarf.c index df56fee8..cccaa0c4 100644 --- a/src/rdi_from_dwarf/rdi_from_dwarf.c +++ b/src/rdi_from_dwarf/rdi_from_dwarf.c @@ -73,7 +73,7 @@ d2r_rdi_reg_code_from_dw_reg_x64(DW_RegX64 v) { default:{}break; #define X(reg_dw, val_dw, reg_rdi, off, size) case DW_RegX64_##reg_dw:{result = RDI_RegCodeX64_##reg_rdi;}break; - DW_Regs_X64_XList(X) + DW_Regs_X64_XList #undef X } return result;