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