Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Convert enum smpi_process_state to enum class.
[simgrid.git] / src / mc / mc_dwarf_tagnames.cpp
1 /* Copyright (c) 2014-2018. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 /* Warning: autogenerated, do not edit! */
8
9 #include <string>
10 #include <unordered_map>
11
12 #include "src/mc/mc_dwarf.hpp"
13
14 namespace {
15 const std::unordered_map<int, const char*> tagname_map = {
16     {0x00, "DW_TAG_invalid"},
17     {0x01, "DW_TAG_array_type"},
18     {0x02, "DW_TAG_class_type"},
19     {0x03, "DW_TAG_entry_point"},
20     {0x04, "DW_TAG_enumeration_type"},
21     {0x05, "DW_TAG_formal_parameter"},
22     {0x08, "DW_TAG_imported_declaration"},
23     {0x0a, "DW_TAG_label"},
24     {0x0b, "DW_TAG_lexical_block"},
25     {0x0d, "DW_TAG_member"},
26     {0x0f, "DW_TAG_pointer_type"},
27     {0x10, "DW_TAG_reference_type"},
28     {0x11, "DW_TAG_compile_unit"},
29     {0x12, "DW_TAG_string_type"},
30     {0x13, "DW_TAG_structure_type"},
31     {0x15, "DW_TAG_subroutine_type"},
32     {0x16, "DW_TAG_typedef"},
33     {0x17, "DW_TAG_union_type"},
34     {0x18, "DW_TAG_unspecified_parameters"},
35     {0x19, "DW_TAG_variant"},
36     {0x1a, "DW_TAG_common_block"},
37     {0x1b, "DW_TAG_common_inclusion"},
38     {0x1c, "DW_TAG_inheritance"},
39     {0x1d, "DW_TAG_inlined_subroutine"},
40     {0x1e, "DW_TAG_module"},
41     {0x1f, "DW_TAG_ptr_to_member_type"},
42     {0x20, "DW_TAG_set_type"},
43     {0x21, "DW_TAG_subrange_type"},
44     {0x22, "DW_TAG_with_stmt"},
45     {0x23, "DW_TAG_access_declaration"},
46     {0x24, "DW_TAG_base_type"},
47     {0x25, "DW_TAG_catch_block"},
48     {0x26, "DW_TAG_const_type"},
49     {0x27, "DW_TAG_constant"},
50     {0x28, "DW_TAG_enumerator"},
51     {0x29, "DW_TAG_file_type"},
52     {0x2a, "DW_TAG_friend"},
53     {0x2b, "DW_TAG_namelist"},
54     {0x2c, "DW_TAG_namelist_item"},
55     {0x2d, "DW_TAG_packed_type"},
56     {0x2e, "DW_TAG_subprogram"},
57     {0x2f, "DW_TAG_template_type_parameter"},
58     {0x30, "DW_TAG_template_value_parameter"},
59     {0x31, "DW_TAG_thrown_type"},
60     {0x32, "DW_TAG_try_block"},
61     {0x33, "DW_TAG_variant_part"},
62     {0x34, "DW_TAG_variable"},
63     {0x35, "DW_TAG_volatile_type"},
64     {0x36, "DW_TAG_dwarf_procedure"},
65     {0x37, "DW_TAG_restrict_type"},
66     {0x38, "DW_TAG_interface_type"},
67     {0x39, "DW_TAG_namespace"},
68     {0x3a, "DW_TAG_imported_module"},
69     {0x3b, "DW_TAG_unspecified_type"},
70     {0x3c, "DW_TAG_partial_unit"},
71     {0x3d, "DW_TAG_imported_unit"},
72     {0x3f, "DW_TAG_condition"},
73     {0x40, "DW_TAG_shared_type"},
74     {0x41, "DW_TAG_type_unit"},
75     {0x42, "DW_TAG_rvalue_reference_type"},
76     {0x43, "DW_TAG_template_alias"},
77     {0x47, "DW_TAG_atomic_type"},
78     {0x4080, "DW_TAG_lo_user"},
79     {0x4081, "DW_TAG_MIPS_loop"},
80     {0x4101, "DW_TAG_format_label"},
81     {0x4102, "DW_TAG_function_template"},
82     {0x4103, "DW_TAG_class_template"},
83     {0x4104, "DW_TAG_GNU_BINCL"},
84     {0x4105, "DW_TAG_GNU_EINCL"},
85     {0x4106, "DW_TAG_GNU_template_template_param"},
86     {0x4107, "DW_TAG_GNU_template_parameter_pack"},
87     {0x4108, "DW_TAG_GNU_formal_parameter_pack"},
88     {0x4109, "DW_TAG_GNU_call_site"},
89     {0x410a, "DW_TAG_GNU_call_site_parameter"},
90     {0xffff, "DW_TAG_hi_user"},
91 };
92 }
93
94 namespace simgrid {
95 namespace dwarf {
96
97 /** \brief Get the name of a dwarf tag (DW_TAG_*) from its code
98  *
99  *  \param tag tag code (see the DWARF specification)
100  *  \return name of the tag
101  */
102 XBT_PRIVATE
103 const char *tagname(int tag)
104 {
105   auto name = tagname_map.find(tag);
106   return name == tagname_map.end() ? "DW_TAG_unknown" : name->second;
107 }
108
109 }
110 }