dst.h 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. /* Alpha VMS external format of Debug Symbol Table.
  2. Copyright (C) 2010-2022 Free Software Foundation, Inc.
  3. Written by Tristan Gingold <gingold@adacore.com>, AdaCore.
  4. This file is part of BFD, the Binary File Descriptor library.
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  16. MA 02110-1301, USA. */
  17. #ifndef _VMS_DST_H
  18. #define _VMS_DST_H
  19. /* Also available in vms freeware v5.0 debug/alpha_dstrecrds.sdl. */
  20. struct vms_dst_header
  21. {
  22. /* Length. */
  23. unsigned char length[2];
  24. /* Type. */
  25. unsigned char type[2];
  26. };
  27. /* Beginning of module. */
  28. #define DST__K_MODBEG 188
  29. /* Some well known languages. */
  30. #define DST__K_MACRO 0
  31. #define DST__K_BLISS 2
  32. #define DST__K_C 7
  33. #define DST__K_ADA 9
  34. #define DST__K_CXX 15
  35. struct vms_dst_modbeg
  36. {
  37. unsigned char flags;
  38. unsigned char unused;
  39. unsigned char language[4];
  40. unsigned char major[2];
  41. unsigned char minor[2];
  42. /* Module name ASCIC. */
  43. /* Ident name ASCIC. */
  44. };
  45. /* Routine begin. */
  46. #define DST__K_RTNBEG 190
  47. struct vms_dst_rtnbeg
  48. {
  49. unsigned char flags;
  50. /* Address of the code. */
  51. unsigned char address[4];
  52. /* Procedure descriptor address. */
  53. unsigned char pd_address[4];
  54. /* Name: ASCIC */
  55. };
  56. /* Line number. */
  57. #define DST__K_LINE_NUM 185
  58. struct vms_dst_pcline
  59. {
  60. unsigned char pcline_command;
  61. unsigned char field[4];
  62. };
  63. #define DST__K_DELTA_PC_W 1
  64. #define DST__K_INCR_LINUM 2
  65. #define DST__K_INCR_LINUM_W 3
  66. #define DST__K_SET_LINUM_INCR 4
  67. #define DST__K_SET_LINUM_INCR_W 5
  68. #define DST__K_RESET_LINUM_INCR 6
  69. #define DST__K_BEG_STMT_MODE 7
  70. #define DST__K_END_STMT_MODE 8
  71. #define DST__K_SET_LINUM 9
  72. #define DST__K_SET_PC 10
  73. #define DST__K_SET_PC_W 11
  74. #define DST__K_SET_PC_L 12
  75. #define DST__K_SET_STMTNUM 13
  76. #define DST__K_TERM 14
  77. #define DST__K_TERM_W 15
  78. #define DST__K_SET_ABS_PC 16
  79. #define DST__K_DELTA_PC_L 17
  80. #define DST__K_INCR_LINUM_L 18
  81. #define DST__K_SET_LINUM_B 19
  82. #define DST__K_SET_LINUM_L 20
  83. #define DST__K_TERM_L 21
  84. /* Routine end. */
  85. #define DST__K_RTNEND 191
  86. struct vms_dst_rtnend
  87. {
  88. unsigned char unused;
  89. unsigned char size[4];
  90. };
  91. /* Prologue. */
  92. #define DST__K_PROLOG 162
  93. struct vms_dst_prolog
  94. {
  95. unsigned char bkpt_addr[4];
  96. };
  97. /* Epilog. */
  98. #define DST__K_EPILOG 127
  99. struct vms_dst_epilog
  100. {
  101. unsigned char flags;
  102. unsigned char count[4];
  103. };
  104. /* Module end. */
  105. #define DST__K_MODEND 189
  106. /* Block begin. */
  107. #define DST__K_BLKBEG 176
  108. struct vms_dst_blkbeg
  109. {
  110. unsigned char unused;
  111. unsigned char address[4];
  112. /* Name ASCIC. */
  113. };
  114. /* Block end. */
  115. #define DST__K_BLKEND 177
  116. struct vms_dst_blkend
  117. {
  118. unsigned char unused;
  119. unsigned char size[4];
  120. };
  121. /* Source correlation. */
  122. #define DST__K_SOURCE 155
  123. #define DST__K_SRC_DECLFILE 1
  124. #define DST__K_SRC_SETFILE 2
  125. #define DST__K_SRC_SETREC_L 3
  126. #define DST__K_SRC_SETREC_W 4
  127. #define DST__K_SRC_SETLNUM_L 5
  128. #define DST__K_SRC_SETLNUM_W 6
  129. #define DST__K_SRC_INCRLNUM_B 7
  130. #define DST__K_SRC_DEFLINES_W 10
  131. #define DST__K_SRC_DEFLINES_B 11
  132. #define DST__K_SRC_FORMFEED 16
  133. struct vms_dst_src_decl_src
  134. {
  135. unsigned char length;
  136. unsigned char flags;
  137. unsigned char fileid[2];
  138. unsigned char rms_cdt[8];
  139. unsigned char rms_ebk[4];
  140. unsigned char rms_ffb[2];
  141. unsigned char rms_rfo;
  142. /* Filename ASCIC. */
  143. };
  144. /* Record begin. */
  145. #define DST__K_RECBEG 171
  146. struct vms_dst_recbeg
  147. {
  148. unsigned char vflags;
  149. unsigned char value[4];
  150. /* Filename ASCIC. */
  151. };
  152. /* Record end. */
  153. #define DST__K_RECEND 172
  154. /* Enumeration begin. */
  155. #define DST__K_ENUMBEG 165
  156. /* Enumeration element. */
  157. #define DST__K_ENUMELT 164
  158. /* Enumeration end. */
  159. #define DST__K_ENUMEND 166
  160. /* Separate type specification. */
  161. #define DST__K_SEPTYP 163
  162. /* Type specification. */
  163. #define DST__K_TYPSPEC 175
  164. #define DST__K_TS_ATOM 1 /* Atomic. */
  165. #define DST__K_TS_DSC 2 /* VMS Standard descriptor. */
  166. #define DST__K_TS_IND 3 /* Indirect. */
  167. #define DST__K_TS_TPTR 4 /* Typed pointer. */
  168. #define DST__K_TS_PTR 5 /* Pointer. */
  169. #define DST__K_TS_PIC 6 /* Pictured. */
  170. #define DST__K_TS_ARRAY 7
  171. #define DST__K_TS_SET 8
  172. #define DST__K_TS_SUBRANGE 9 /* Subrange. */
  173. #define DST__K_TS_ADA_DSC 10 /* Ada descriptor. */
  174. #define DST__K_TS_FILE 11
  175. #define DST__K_TS_AREA 12 /* Area (PL/I). */
  176. #define DST__K_TS_OFFSET 13 /* Offset (PL/I). */
  177. #define DST__K_TS_NOV_LENG 14 /* Novel Length. */
  178. #define DST__K_TS_IND_TSPEC 15 /* Internal to debugger. */
  179. #define DST__K_TS_SELF_REL_LABEL 16 /* Self-relative label (PL/I). */
  180. #define DST__K_TS_RFA 17 /* (Basic). */
  181. #define DST__K_TS_TASK 18 /* (Ada). */
  182. #define DST__K_TS_ADA_ARRAY 19
  183. #define DST__K_TS_XMOD_IND 20 /* Cross-module indirect type spec. */
  184. #define DST__K_TS_CONSTRAINED 21 /* (Ada). */
  185. #define DST__K_TS_MAYBE_CONSTR 22 /* Might-be-constrained (Ada). */
  186. #define DST__K_TS_DYN_LOV_LENG 23
  187. #define DST__K_TS_TPTR_D 24 /* Typed pointer to descriptor. */
  188. #define DST__K_TS_SCAN_TREE 25
  189. #define DST__K_TS_SCAN_TREEPTR 26
  190. #define DST__K_TS_INCOMPLETE 27
  191. #define DST__K_TS_BLISS_BLOCK 28
  192. #define DST__K_TS_TPTR_64 29
  193. #define DST__K_TS_PTR_64 30
  194. #define DST__K_TS_REF 31 /* C++ referenced type. */
  195. #define DST__K_TS_REF_64 32
  196. /* Value Specification. */
  197. #define DST__K_VFLAGS_NOVAL 128 /* No value. */
  198. #define DST__K_VFLAGS_NOTACTIVE 248 /* Not active at current PC. */
  199. #define DST__K_VFLAGS_UNALLOC 249 /* Not allocated. */
  200. #define DST__K_VFLAGS_DSC 250 /* Descriptor format. */
  201. #define DST__K_VFLAGS_TVS 251 /* Trailing value spec. */
  202. #define DST__K_VS_FOLLOWS 253 /* Value specification follow. */
  203. #define DST__K_VFLAGS_BITOFFS 255 /* Value is a bit offset. */
  204. /* Vflags fields. */
  205. #define DST__K_VALKIND_MASK 0x03
  206. #define DST__K_INDIR 0x04
  207. #define DST__K_DISP 0x08
  208. #define DST__K_REGNUM_MASK 0xf0
  209. #define DST__K_REGNUM_SHIFT 4
  210. #define DST__K_VALKIND_LITERAL 0
  211. #define DST__K_VALKIND_ADDR 1
  212. #define DST__K_VALKIND_DESC 2
  213. #define DST__K_VALKIND_REG 3
  214. /* Label. */
  215. #define DST__K_LABEL 187
  216. struct vms_dst_label
  217. {
  218. unsigned char unused;
  219. unsigned char value[4];
  220. unsigned char name[1];
  221. };
  222. /* Discontiguous range. */
  223. #define DST__K_DIS_RANGE 118
  224. #endif /* _VMS_DST_H */