X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FSupport%2FDwarf.h;h=55838b8144bcf22781c83eed48196f76350a6ada;hb=94fefe27f574ed98ad2522f8a7d1515e698ff036;hp=cfb8c6a9ab88f6b62fac8419f149f90c01aee159;hpb=0d086af82b2b659688911a5e8c3eb27d58156063;p=oota-llvm.git diff --git a/include/llvm/Support/Dwarf.h b/include/llvm/Support/Dwarf.h index cfb8c6a9ab8..55838b8144b 100644 --- a/include/llvm/Support/Dwarf.h +++ b/include/llvm/Support/Dwarf.h @@ -2,29 +2,63 @@ // // The LLVM Compiler Infrastructure // -// This file was developed by James M. Laskey and is distributed under the -// University of Illinois Open Source License. See LICENSE.TXT for details. +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file contains constants used for implementing Dwarf debug support. For // Details on the Dwarf 3 specfication see DWARF Debugging Information Format // V.3 reference manual http://dwarf.freestandards.org , -// +// //===----------------------------------------------------------------------===// #ifndef LLVM_SUPPORT_DWARF_H #define LLVM_SUPPORT_DWARF_H +namespace llvm { + +//===----------------------------------------------------------------------===// +// Debug info constants. + +enum { + LLVMDebugVersion = (7 << 16), // Current version of debug information. + LLVMDebugVersion6 = (6 << 16), // Constant for version 6. + LLVMDebugVersion5 = (5 << 16), // Constant for version 5. + LLVMDebugVersion4 = (4 << 16), // Constant for version 4. + LLVMDebugVersionMask = 0xffff0000 // Mask for version number. +}; + namespace dwarf { //===----------------------------------------------------------------------===// // Dwarf constants as gleaned from the DWARF Debugging Information Format V.3 // reference manual http://dwarf.freestandards.org . // + +// Do not mix the following two enumerations sets. DW_TAG_invalid changes the +// enumeration base type. + +enum llvm_dwarf_constants { + // llvm mock tags + DW_TAG_invalid = ~0U, // Tag for invalid results. + + DW_TAG_anchor = 0, // Tag for descriptor anchors. + DW_TAG_auto_variable = 0x100, // Tag for local (auto) variables. + DW_TAG_arg_variable = 0x101, // Tag for argument variables. + DW_TAG_return_variable = 0x102, // Tag for return variables. + + DW_TAG_vector_type = 0x103, // Tag for vector types. + + DW_TAG_user_base = 0x1000, // Recommended base for user tags. + + DW_CIE_VERSION = 1, // Common frame information version. + DW_CIE_ID = 0xffffffff // Common frame information mark. +}; + enum dwarf_constants { DWARF_VERSION = 2, - + // Tags DW_TAG_array_type = 0x01, DW_TAG_class_type = 0x02, @@ -177,9 +211,25 @@ enum dwarf_constants { DW_AT_elemental = 0x66, DW_AT_pure = 0x67, DW_AT_recursive = 0x68, + DW_AT_MIPS_linkage_name = 0x2007, + DW_AT_sf_names = 0x2101, + DW_AT_src_info = 0x2102, + DW_AT_mac_info = 0x2103, + DW_AT_src_coords = 0x2104, + DW_AT_body_begin = 0x2105, + DW_AT_body_end = 0x2106, + DW_AT_GNU_vector = 0x2107, DW_AT_lo_user = 0x2000, DW_AT_hi_user = 0x3fff, + // Apple extensions. + DW_AT_APPLE_optimized = 0x3fe1, + DW_AT_APPLE_flags = 0x3fe2, + DW_AT_APPLE_isa = 0x3fe3, + DW_AT_APPLE_block = 0x3fe4, + DW_AT_APPLE_major_runtime_vers = 0x3fe5, + DW_AT_APPLE_runtime_class = 0x3fe6, + // Attribute form encodings DW_FORM_addr = 0x01, DW_FORM_block2 = 0x03, @@ -309,7 +359,7 @@ enum dwarf_constants { DW_ACCESS_protected = 0x02, DW_ACCESS_private = 0x03, - // Visibility codes + // Visibility codes DW_VIS_local = 0x01, DW_VIS_exported = 0x02, DW_VIS_qualified = 0x03, @@ -318,7 +368,7 @@ enum dwarf_constants { DW_VIRTUALITY_none = 0x00, DW_VIRTUALITY_virtual = 0x01, DW_VIRTUALITY_pure_virtual = 0x02, - + // Language names DW_LANG_C89 = 0x0001, DW_LANG_C = 0x0002, @@ -341,7 +391,7 @@ enum dwarf_constants { DW_LANG_D = 0x0013, DW_LANG_lo_user = 0x8000, DW_LANG_hi_user = 0xffff, - + // Identifier case codes DW_ID_case_sensitive = 0x00, DW_ID_up_case = 0x01, @@ -361,7 +411,7 @@ enum dwarf_constants { DW_INL_declared_not_inlined = 0x02, DW_INL_declared_inlined = 0x03, - // Array ordering + // Array ordering DW_ORD_row_major = 0x00, DW_ORD_col_major = 0x01, @@ -398,6 +448,7 @@ enum dwarf_constants { DW_MACINFO_vendor_ext = 0xff, // Call frame instruction encodings + DW_CFA_extended = 0x00, DW_CFA_advance_loc = 0x40, DW_CFA_offset = 0x80, DW_CFA_restore = 0xc0, @@ -424,7 +475,25 @@ enum dwarf_constants { DW_CFA_val_offset_sf = 0x15, DW_CFA_val_expression = 0x16, DW_CFA_lo_user = 0x1c, - DW_CFA_hi_user = 0x3f + DW_CFA_hi_user = 0x3f, + + DW_EH_PE_absptr = 0x00, + DW_EH_PE_omit = 0xff, + DW_EH_PE_uleb128 = 0x01, + DW_EH_PE_udata2 = 0x02, + DW_EH_PE_udata4 = 0x03, + DW_EH_PE_udata8 = 0x04, + DW_EH_PE_sleb128 = 0x09, + DW_EH_PE_sdata2 = 0x0A, + DW_EH_PE_sdata4 = 0x0B, + DW_EH_PE_sdata8 = 0x0C, + DW_EH_PE_signed = 0x08, + DW_EH_PE_pcrel = 0x10, + DW_EH_PE_textrel = 0x20, + DW_EH_PE_datarel = 0x30, + DW_EH_PE_funcrel = 0x40, + DW_EH_PE_aligned = 0x50, + DW_EH_PE_indirect = 0x80 }; /// TagString - Return the string for the specified tag. @@ -498,7 +567,7 @@ const char *DiscriminantString(unsigned Discriminant); /// LNStandardString - Return the string for the specified line number standard. /// const char *LNStandardString(unsigned Standard); - + /// LNExtendedString - Return the string for the specified line number extended /// opcode encodings. const char *LNExtendedString(unsigned Encoding); @@ -513,4 +582,6 @@ const char *CallFrameString(unsigned Encoding); } // End of namespace dwarf +} // End of namespace llvm + #endif