Home | History | Annotate | Download | only in DWARF
      1 //===-- DWARFDefines.h ------------------------------------------*- C++ -*-===//
      2 //
      3 //                     The LLVM Compiler Infrastructure
      4 //
      5 // This file is distributed under the University of Illinois Open Source
      6 // License. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 
     10 #ifndef SymbolFileDWARF_DWARFDefines_h_
     11 #define SymbolFileDWARF_DWARFDefines_h_
     12 
     13 #include <stdint.h>
     14 #include <stdbool.h>
     15 #include "lldb/Core/dwarf.h"
     16 
     17 namespace lldb_private {
     18 
     19 typedef uint32_t DRC_class;          // Holds DRC_* class bitfields
     20 
     21 enum DW_TAG_Category
     22 {
     23     TagCategoryVariable,
     24     TagCategoryType,
     25     TagCategoryProgram,
     26     kNumTagCategories
     27 };
     28 
     29 typedef enum DW_TAG_Category DW_TAG_CategoryEnum;
     30 
     31 const char *DW_TAG_value_to_name (uint32_t val);
     32 
     33 DW_TAG_CategoryEnum get_tag_category (uint16_t tag);
     34 
     35 const char *DW_CHILDREN_value_to_name (uint8_t val);
     36 
     37 const char *DW_AT_value_to_name (uint32_t val);
     38 
     39 const char *DW_FORM_value_to_name (uint32_t val);
     40 
     41 const char *DW_OP_value_to_name (uint32_t val);
     42 
     43 DRC_class DW_OP_value_to_class (uint32_t val);
     44 
     45 const char *DW_ATE_value_to_name (uint32_t val);
     46 
     47 const char *DW_ACCESS_value_to_name (uint32_t val);
     48 
     49 const char *DW_VIS_value_to_name (uint32_t val);
     50 
     51 const char *DW_VIRTUALITY_value_to_name (uint32_t val);
     52 
     53 const char *DW_LANG_value_to_name (uint32_t val);
     54 
     55 const char *DW_ID_value_to_name (uint32_t val);
     56 
     57 const char *DW_CC_value_to_name (uint32_t val);
     58 
     59 const char *DW_INL_value_to_name (uint32_t val);
     60 
     61 const char *DW_ORD_value_to_name (uint32_t val);
     62 
     63 const char *DW_DSC_value_to_name (uint32_t val);
     64 
     65 const char *DW_LNS_value_to_name (uint32_t val);
     66 
     67 const char *DW_LNE_value_to_name (uint32_t val);
     68 
     69 const char *DW_MACINFO_value_to_name (uint32_t val);
     70 
     71 const char *DW_CFA_value_to_name (uint32_t val);
     72 
     73 const char *DW_GNU_EH_PE_value_to_name (uint32_t val);
     74 
     75 /* These DRC are entirely our own construction,
     76     although they are derived from various comments in the DWARF standard.
     77     Most of these are not useful to the parser, but the DW_AT and DW_FORM
     78     classes should prove to be usable in some fashion.  */
     79 
     80 #define DRC_0x65                               0x1
     81 #define DRC_ADDRESS                            0x2
     82 #define DRC_BLOCK                              0x4
     83 #define DRC_CONSTANT                           0x8
     84 #define DRC_DWARFv3                           0x10
     85 #define DRC_FLAG                              0x20
     86 #define DRC_INDIRECT_SPECIAL                  0x40
     87 #define DRC_LINEPTR                           0x80
     88 #define DRC_LOCEXPR                          0x100
     89 #define DRC_LOCLISTPTR                       0x200
     90 #define DRC_MACPTR                           0x400
     91 #define DRC_ONEOPERAND                       0x800
     92 #define DRC_OPERANDONE_1BYTE_DELTA          0x1000
     93 #define DRC_OPERANDONE_2BYTE_DELTA          0x2000
     94 #define DRC_OPERANDONE_4BYTE_DELTA          0x4000
     95 #define DRC_OPERANDONE_ADDRESS              0x8000
     96 #define DRC_OPERANDONE_BLOCK               0x10000
     97 #define DRC_OPERANDONE_SLEB128_OFFSET      0x20000
     98 #define DRC_OPERANDONE_ULEB128_OFFSET      0x40000
     99 #define DRC_OPERANDONE_ULEB128_REGISTER    0x80000
    100 #define DRC_OPERANDTWO_BLOCK              0x100000
    101 #define DRC_OPERANDTWO_SLEB128_OFFSET     0x200000
    102 #define DRC_OPERANDTWO_ULEB128_OFFSET     0x400000
    103 #define DRC_OPERANDTWO_ULEB128_REGISTER   0x800000
    104 #define DRC_OPERNADONE_ULEB128_REGISTER  0x1000000
    105 #define DRC_RANGELISTPTR                 0x2000000
    106 #define DRC_REFERENCE                    0x4000000
    107 #define DRC_STRING                       0x8000000
    108 #define DRC_TWOOPERANDS                 0x10000000
    109 #define DRC_VENDOR_GNU                  0x20000000
    110 #define DRC_VENDOR_MIPS                 0x40000000
    111 #define DRC_ZEROOPERANDS                0x80000000
    112 
    113 } // namespace lldb_private
    114 
    115 
    116 #endif  // SymbolFileDWARF_DWARFDefines_h_
    117