dwarfnames.c 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /* Names of various DWARF tags.
  2. Copyright (C) 2012-2022 Free Software Foundation, Inc.
  3. This file is part of GNU CC.
  4. GNU CC is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2, or (at your option)
  7. any later version.
  8. In addition to the permissions in the GNU General Public License, the
  9. Free Software Foundation gives you unlimited permission to link the
  10. compiled version of this file into combinations with other programs,
  11. and to distribute those combinations without any restriction coming
  12. from the use of this file. (The General Public License restrictions
  13. do apply in other respects; for example, they cover modification of
  14. the file, and distribution when not linked into a combined
  15. executable.)
  16. GNU CC is distributed in the hope that it will be useful,
  17. but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. GNU General Public License for more details.
  20. You should have received a copy of the GNU General Public License
  21. along with GNU CC; see the file COPYING. If not, write to
  22. the Free Software Foundation, 51 Franklin Street - Fifth Floor,
  23. Boston, MA 02110-1301, USA. */
  24. #include "dwarf2.h"
  25. #define DW_FIRST_TAG(name, value) \
  26. const char *get_DW_TAG_name (unsigned int tag) \
  27. { switch (tag) { \
  28. DW_TAG (name, value)
  29. #define DW_END_TAG } return 0; }
  30. #define DW_FIRST_FORM(name, value) \
  31. const char *get_DW_FORM_name (unsigned int form) \
  32. { switch (form) { \
  33. DW_FORM (name, value)
  34. #define DW_END_FORM } return 0; }
  35. #define DW_FIRST_AT(name, value) \
  36. const char *get_DW_AT_name (unsigned int attr) { \
  37. switch (attr) { \
  38. DW_AT (name, value)
  39. #define DW_END_AT } return 0; }
  40. #define DW_FIRST_OP(name, value) \
  41. const char *get_DW_OP_name (unsigned int op) { \
  42. switch (op) { \
  43. DW_OP (name, value)
  44. #define DW_END_OP } return 0; }
  45. #define DW_FIRST_ATE(name, value) \
  46. const char *get_DW_ATE_name (unsigned int enc) { \
  47. switch (enc) { \
  48. DW_ATE (name, value)
  49. #define DW_END_ATE } return 0; }
  50. #define DW_FIRST_CFA(name, value) \
  51. const char *get_DW_CFA_name (unsigned int opc) { \
  52. switch (opc) { \
  53. DW_CFA (name, value)
  54. #define DW_END_CFA } return 0; }
  55. #define DW_FIRST_IDX(name, value) \
  56. const char *get_DW_IDX_name (unsigned int idx) { \
  57. switch (idx) { \
  58. DW_IDX (name, value)
  59. #define DW_END_IDX } return 0; }
  60. #define DW_FIRST_UT(name, value) \
  61. const char *get_DW_UT_name (unsigned int ut) { \
  62. switch (ut) { \
  63. DW_UT (name, value)
  64. #define DW_END_UT } return 0; }
  65. #define DW_TAG(name, value) case name: return # name ;
  66. #define DW_TAG_DUP(name, value)
  67. #define DW_FORM(name, value) case name: return # name ;
  68. #define DW_AT(name, value) case name: return # name ;
  69. #define DW_AT_DUP(name, value)
  70. #define DW_OP(name, value) case name: return # name ;
  71. #define DW_OP_DUP(name, value)
  72. #define DW_ATE(name, value) case name: return # name ;
  73. #define DW_ATE_DUP(name, value)
  74. #define DW_CFA(name, value) case name: return # name ;
  75. #define DW_CFA_DUP(name, value)
  76. #define DW_IDX(name, value) case name: return # name ;
  77. #define DW_IDX_DUP(name, value)
  78. #define DW_UT(name, value) case name: return # name ;
  79. #include "dwarf2.def"
  80. #undef DW_FIRST_TAG
  81. #undef DW_END_TAG
  82. #undef DW_FIRST_FORM
  83. #undef DW_END_FORM
  84. #undef DW_FIRST_AT
  85. #undef DW_END_AT
  86. #undef DW_FIRST_OP
  87. #undef DW_END_OP
  88. #undef DW_FIRST_ATE
  89. #undef DW_END_ATE
  90. #undef DW_FIRST_CFA
  91. #undef DW_END_CFA
  92. #undef DW_FIRST_IDX
  93. #undef DW_END_IDX
  94. #undef DW_END_UT
  95. #undef DW_TAG
  96. #undef DW_TAG_DUP
  97. #undef DW_FORM
  98. #undef DW_AT
  99. #undef DW_AT_DUP
  100. #undef DW_OP
  101. #undef DW_OP_DUP
  102. #undef DW_ATE
  103. #undef DW_ATE_DUP
  104. #undef DW_CFA
  105. #undef DW_CFA_DUP
  106. #undef DW_IDX
  107. #undef DW_IDX_DUP