xref: /dflybsd-src/contrib/gcc-4.7/gcc/vmsdbg.h (revision 04febcfb30580676d3e95f58a16c5137ee478b32)
1*e4b17023SJohn Marino /* Definitions for the data structures and codes used in VMS debugging.
2*e4b17023SJohn Marino    Copyright (C) 2001, 2007, 2010 Free Software Foundation, Inc.
3*e4b17023SJohn Marino 
4*e4b17023SJohn Marino This file is part of GCC.
5*e4b17023SJohn Marino 
6*e4b17023SJohn Marino GCC is free software; you can redistribute it and/or modify it under
7*e4b17023SJohn Marino the terms of the GNU General Public License as published by the Free
8*e4b17023SJohn Marino Software Foundation; either version 3, or (at your option) any later
9*e4b17023SJohn Marino version.
10*e4b17023SJohn Marino 
11*e4b17023SJohn Marino GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12*e4b17023SJohn Marino WARRANTY; without even the implied warranty of MERCHANTABILITY or
13*e4b17023SJohn Marino FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14*e4b17023SJohn Marino for more details.
15*e4b17023SJohn Marino 
16*e4b17023SJohn Marino You should have received a copy of the GNU General Public License
17*e4b17023SJohn Marino along with GCC; see the file COPYING3.  If not see
18*e4b17023SJohn Marino <http://www.gnu.org/licenses/>.  */
19*e4b17023SJohn Marino 
20*e4b17023SJohn Marino #ifndef GCC_VMSDBG_H
21*e4b17023SJohn Marino #define GCC_VMSDBG_H 1
22*e4b17023SJohn Marino 
23*e4b17023SJohn Marino /*  We define types and constants used in VMS Debug output.  Note that the
24*e4b17023SJohn Marino     structs only approximate the output that is written.  We write the output
25*e4b17023SJohn Marino     explicitly, field by field.  This output would only agree with the
26*e4b17023SJohn Marino     structs in this file if no padding were done.  The sizes after each
27*e4b17023SJohn Marino     struct are the size actually written, which is usually smaller than the
28*e4b17023SJohn Marino     size of the struct.  */
29*e4b17023SJohn Marino 
30*e4b17023SJohn Marino /* Header type codes.  */
31*e4b17023SJohn Marino typedef enum _DST_TYPE {DST_K_TBG = 0x17,
32*e4b17023SJohn Marino 			DST_K_SOURCE = 155, DST_K_PROLOG = 162,
33*e4b17023SJohn Marino 			DST_K_BLKBEG = 176, DST_K_BLKEND = 177,
34*e4b17023SJohn Marino 			DST_K_LINE_NUM = 185, DST_K_MODBEG = 188,
35*e4b17023SJohn Marino 			DST_K_MODEND = 189, DST_K_RTNBEG = 190,
36*e4b17023SJohn Marino 			DST_K_RTNEND = 191} DST_DTYPE;
37*e4b17023SJohn Marino 
38*e4b17023SJohn Marino /* Header.  */
39*e4b17023SJohn Marino 
40*e4b17023SJohn Marino typedef struct _DST_HEADER
41*e4b17023SJohn Marino {
42*e4b17023SJohn Marino   union
43*e4b17023SJohn Marino     {
44*e4b17023SJohn Marino       unsigned short int dst_w_length;
45*e4b17023SJohn Marino       unsigned short int dst_x_length;
46*e4b17023SJohn Marino     } dst__header_length;
47*e4b17023SJohn Marino   union
48*e4b17023SJohn Marino     {
49*e4b17023SJohn Marino       ENUM_BITFIELD (_DST_TYPE) dst_w_type : 16;
50*e4b17023SJohn Marino       ENUM_BITFIELD (_DST_TYPE) dst_x_type : 16;
51*e4b17023SJohn Marino     } dst__header_type;
52*e4b17023SJohn Marino } DST_HEADER;
53*e4b17023SJohn Marino #define DST_K_DST_HEADER_SIZE sizeof 4
54*e4b17023SJohn Marino 
55*e4b17023SJohn Marino /* Language type codes.  */
56*e4b17023SJohn Marino typedef enum _DST_LANGUAGE {DST_K_FORTRAN = 1, DST_K_C = 7, DST_K_ADA = 9,
57*e4b17023SJohn Marino 			    DST_K_UNKNOWN = 10, DST_K_CXX = 15} DST_LANGUAGE;
58*e4b17023SJohn Marino 
59*e4b17023SJohn Marino /* Module header (a module is the result of a single compilation).  */
60*e4b17023SJohn Marino 
61*e4b17023SJohn Marino typedef struct _DST_MODULE_BEGIN
62*e4b17023SJohn Marino {
63*e4b17023SJohn Marino   DST_HEADER dst_a_modbeg_header;
64*e4b17023SJohn Marino   struct
65*e4b17023SJohn Marino     {
66*e4b17023SJohn Marino       unsigned dst_v_modbeg_hide : 1;
67*e4b17023SJohn Marino       unsigned dst_v_modbeg_version : 1;
68*e4b17023SJohn Marino       unsigned dst_v_modbeg_unused : 6;
69*e4b17023SJohn Marino     } dst_b_modbeg_flags;
70*e4b17023SJohn Marino   unsigned char dst_b_modbeg_unused;
71*e4b17023SJohn Marino   DST_LANGUAGE dst_l_modbeg_language;
72*e4b17023SJohn Marino   unsigned short int dst_w_version_major;
73*e4b17023SJohn Marino   unsigned short int dst_w_version_minor;
74*e4b17023SJohn Marino   unsigned char dst_b_modbeg_name;
75*e4b17023SJohn Marino } DST_MODULE_BEGIN;
76*e4b17023SJohn Marino #define DST_K_MODBEG_SIZE 15
77*e4b17023SJohn Marino 
78*e4b17023SJohn Marino /* Module trailer.  */
79*e4b17023SJohn Marino 
80*e4b17023SJohn Marino typedef struct _DST_MB_TRLR
81*e4b17023SJohn Marino {
82*e4b17023SJohn Marino   unsigned char dst_b_compiler;
83*e4b17023SJohn Marino } DST_MB_TRLR;
84*e4b17023SJohn Marino 
85*e4b17023SJohn Marino #define DST_K_MB_TRLR_SIZE 1
86*e4b17023SJohn Marino 
87*e4b17023SJohn Marino #define DST_K_VERSION_MAJOR 1
88*e4b17023SJohn Marino #define DST_K_VERSION_MINOR 13
89*e4b17023SJohn Marino 
90*e4b17023SJohn Marino typedef struct _DST_MODULE_END
91*e4b17023SJohn Marino {
92*e4b17023SJohn Marino   DST_HEADER dst_a_modend_header;
93*e4b17023SJohn Marino } DST_MODULE_END;
94*e4b17023SJohn Marino #define DST_K_MODEND_SIZE sizeof 4
95*e4b17023SJohn Marino 
96*e4b17023SJohn Marino /* Routine header.  */
97*e4b17023SJohn Marino 
98*e4b17023SJohn Marino typedef struct _DST_ROUTINE_BEGIN
99*e4b17023SJohn Marino {
100*e4b17023SJohn Marino   DST_HEADER dst_a_rtnbeg_header;
101*e4b17023SJohn Marino   struct
102*e4b17023SJohn Marino     {
103*e4b17023SJohn Marino       unsigned dst_v_rtnbeg_unused : 4;
104*e4b17023SJohn Marino       unsigned dst_v_rtnbeg_unalloc : 1;
105*e4b17023SJohn Marino       unsigned dst_v_rtnbeg_prototype : 1;
106*e4b17023SJohn Marino       unsigned dst_v_rtnbeg_inlined : 1;
107*e4b17023SJohn Marino       unsigned dst_v_rtnbeg_no_call : 1;
108*e4b17023SJohn Marino     } dst_b_rtnbeg_flags;
109*e4b17023SJohn Marino   int *dst_l_rtnbeg_address;
110*e4b17023SJohn Marino   int *dst_l_rtnbeg_pd_address;
111*e4b17023SJohn Marino   unsigned char dst_b_rtnbeg_name;
112*e4b17023SJohn Marino } DST_ROUTINE_BEGIN;
113*e4b17023SJohn Marino #define DST_K_RTNBEG_SIZE 14
114*e4b17023SJohn Marino 
115*e4b17023SJohn Marino /* Routine trailer */
116*e4b17023SJohn Marino 
117*e4b17023SJohn Marino typedef struct _DST_ROUTINE_END
118*e4b17023SJohn Marino {
119*e4b17023SJohn Marino   DST_HEADER dst_a_rtnend_header;
120*e4b17023SJohn Marino   char dst_b_rtnend_unused;
121*e4b17023SJohn Marino   unsigned int dst_l_rtnend_size;
122*e4b17023SJohn Marino } DST_ROUTINE_END;
123*e4b17023SJohn Marino #define DST_K_RTNEND_SIZE 9
124*e4b17023SJohn Marino 
125*e4b17023SJohn Marino /* Block header.  */
126*e4b17023SJohn Marino 
127*e4b17023SJohn Marino typedef struct _DST_BLOCK_BEGIN
128*e4b17023SJohn Marino {
129*e4b17023SJohn Marino   DST_HEADER dst_a_blkbeg_header;
130*e4b17023SJohn Marino   unsigned char dst_b_blkbeg_unused;
131*e4b17023SJohn Marino   int *dst_l_blkbeg_address;
132*e4b17023SJohn Marino   unsigned char dst_b_blkbeg_name;
133*e4b17023SJohn Marino } DST_BLOCK_BEGIN;
134*e4b17023SJohn Marino #define DST_K_BLKBEG_SIZE 10
135*e4b17023SJohn Marino 
136*e4b17023SJohn Marino /* Block trailer.  */
137*e4b17023SJohn Marino 
138*e4b17023SJohn Marino typedef struct _DST_BLOCK_END
139*e4b17023SJohn Marino {
140*e4b17023SJohn Marino   DST_HEADER dst_a_blkend_header;
141*e4b17023SJohn Marino   unsigned char dst_b_blkend_unused;
142*e4b17023SJohn Marino   unsigned int dst_l_blkend_size;
143*e4b17023SJohn Marino } DST_BLOCK_END;
144*e4b17023SJohn Marino #define DST_K_BLKEND_SIZE 9
145*e4b17023SJohn Marino 
146*e4b17023SJohn Marino /* Line number header.  */
147*e4b17023SJohn Marino 
148*e4b17023SJohn Marino typedef struct _DST_LINE_NUM_HEADER
149*e4b17023SJohn Marino {
150*e4b17023SJohn Marino   DST_HEADER dst_a_line_num_header;
151*e4b17023SJohn Marino } DST_LINE_NUM_HEADER;
152*e4b17023SJohn Marino #define DST_K_LINE_NUM_HEADER_SIZE 4
153*e4b17023SJohn Marino 
154*e4b17023SJohn Marino /* PC to Line number correlation.  */
155*e4b17023SJohn Marino 
156*e4b17023SJohn Marino typedef struct _DST_PCLINE_COMMANDS
157*e4b17023SJohn Marino {
158*e4b17023SJohn Marino   char dst_b_pcline_command;
159*e4b17023SJohn Marino   union
160*e4b17023SJohn Marino     {
161*e4b17023SJohn Marino       unsigned int dst_l_pcline_unslong;
162*e4b17023SJohn Marino       unsigned short int dst_w_pcline_unsword;
163*e4b17023SJohn Marino       unsigned char dst_b_pcline_unsbyte;
164*e4b17023SJohn Marino     } dst_a_pcline_access_fields;
165*e4b17023SJohn Marino } DST_PCLINE_COMMANDS;
166*e4b17023SJohn Marino 
167*e4b17023SJohn Marino /* PC and Line number correlation codes.  */
168*e4b17023SJohn Marino 
169*e4b17023SJohn Marino #define DST_K_PCLINE_COMMANDS_SIZE 5
170*e4b17023SJohn Marino #define DST_K_PCLINE_COMMANDS_SIZE_MIN 2
171*e4b17023SJohn Marino #define DST_K_PCLINE_COMMANDS_SIZE_MAX 5
172*e4b17023SJohn Marino #define DST_K_DELTA_PC_LOW -128
173*e4b17023SJohn Marino #define DST_K_DELTA_PC_HIGH 0
174*e4b17023SJohn Marino #define DST_K_DELTA_PC_W 1
175*e4b17023SJohn Marino #define DST_K_INCR_LINUM 2
176*e4b17023SJohn Marino #define DST_K_INCR_LINUM_W 3
177*e4b17023SJohn Marino #define DST_K_SET_LINUM 9
178*e4b17023SJohn Marino #define DST_K_SET_ABS_PC 16
179*e4b17023SJohn Marino #define DST_K_DELTA_PC_L 17
180*e4b17023SJohn Marino #define DST_K_INCR_LINUM_L 18
181*e4b17023SJohn Marino #define DST_K_SET_LINUM_B 19
182*e4b17023SJohn Marino #define DST_K_SET_LINUM_L 20
183*e4b17023SJohn Marino 
184*e4b17023SJohn Marino /* Source file correlation header.  */
185*e4b17023SJohn Marino 
186*e4b17023SJohn Marino typedef struct _DST_SOURCE_CORR
187*e4b17023SJohn Marino {
188*e4b17023SJohn Marino   DST_HEADER dst_a_source_corr_header;
189*e4b17023SJohn Marino } DST_SOURCE_CORR;
190*e4b17023SJohn Marino #define DST_K_SOURCE_CORR_HEADER_SIZE 4
191*e4b17023SJohn Marino 
192*e4b17023SJohn Marino /* Source file correlation codes.  */
193*e4b17023SJohn Marino 
194*e4b17023SJohn Marino #define DST_K_SRC_DECLFILE 1
195*e4b17023SJohn Marino #define DST_K_SRC_SETFILE 2
196*e4b17023SJohn Marino #define DST_K_SRC_SETREC_L 3
197*e4b17023SJohn Marino #define DST_K_SRC_SETREC_W 4
198*e4b17023SJohn Marino #define DST_K_SRC_SETLNUM_L 5
199*e4b17023SJohn Marino #define DST_K_SRC_SETLNUM_W 6
200*e4b17023SJohn Marino #define DST_K_SRC_INCRLNUM_B 7
201*e4b17023SJohn Marino #define DST_K_SRC_DEFLINES_W 10
202*e4b17023SJohn Marino #define DST_K_SRC_DEFLINES_B 11
203*e4b17023SJohn Marino #define DST_K_SRC_FORMFEED 16
204*e4b17023SJohn Marino #define DST_K_SRC_MIN_CMD 1
205*e4b17023SJohn Marino #define DST_K_SRC_MAX_CMD 16
206*e4b17023SJohn Marino 
207*e4b17023SJohn Marino /* Source file header.  */
208*e4b17023SJohn Marino 
209*e4b17023SJohn Marino typedef struct _DST_SRC_COMMAND
210*e4b17023SJohn Marino {
211*e4b17023SJohn Marino   unsigned char dst_b_src_command;
212*e4b17023SJohn Marino   union
213*e4b17023SJohn Marino     {
214*e4b17023SJohn Marino       struct
215*e4b17023SJohn Marino 	{
216*e4b17023SJohn Marino 	  unsigned char dst_b_src_df_length;
217*e4b17023SJohn Marino 	  unsigned char dst_b_src_df_flags;
218*e4b17023SJohn Marino 	  unsigned short int dst_w_src_df_fileid;
219*e4b17023SJohn Marino #ifdef HAVE_LONG_LONG
220*e4b17023SJohn Marino 	  long long dst_q_src_df_rms_cdt;
221*e4b17023SJohn Marino #else
222*e4b17023SJohn Marino #ifdef HAVE___INT64
223*e4b17023SJohn Marino 	  __int64 dst_q_src_df_rms_cdt;
224*e4b17023SJohn Marino #endif
225*e4b17023SJohn Marino #endif
226*e4b17023SJohn Marino 	  unsigned int dst_l_src_df_rms_ebk;
227*e4b17023SJohn Marino 	  unsigned short int dst_w_src_df_rms_ffb;
228*e4b17023SJohn Marino 	  unsigned char dst_b_src_df_rms_rfo;
229*e4b17023SJohn Marino 	  unsigned char dst_b_src_df_filename;
230*e4b17023SJohn Marino 	} dst_a_src_decl_src;
231*e4b17023SJohn Marino       unsigned int dst_l_src_unslong;
232*e4b17023SJohn Marino       unsigned short int dst_w_src_unsword;
233*e4b17023SJohn Marino       unsigned char dst_b_src_unsbyte;
234*e4b17023SJohn Marino     } dst_a_src_cmd_fields;
235*e4b17023SJohn Marino } DST_SRC_COMMAND;
236*e4b17023SJohn Marino #define DST_K_SRC_COMMAND_SIZE 21
237*e4b17023SJohn Marino 
238*e4b17023SJohn Marino /* Source file trailer.  */
239*e4b17023SJohn Marino 
240*e4b17023SJohn Marino typedef struct _DST_SRC_CMDTRLR
241*e4b17023SJohn Marino {
242*e4b17023SJohn Marino   unsigned char dst_b_src_df_libmodname;
243*e4b17023SJohn Marino } DST_SRC_CMDTRLR;
244*e4b17023SJohn Marino #define DST_K_SRC_CMDTRLR_SIZE 1
245*e4b17023SJohn Marino 
246*e4b17023SJohn Marino /* Prolog header.  */
247*e4b17023SJohn Marino 
248*e4b17023SJohn Marino typedef struct _DST_PROLOG
249*e4b17023SJohn Marino {
250*e4b17023SJohn Marino   DST_HEADER dst_a_prolog_header;
251*e4b17023SJohn Marino   unsigned int dst_l_prolog_bkpt_addr;
252*e4b17023SJohn Marino } DST_PROLOG;
253*e4b17023SJohn Marino #define DST_K_PROLOG_SIZE 8
254*e4b17023SJohn Marino 
255*e4b17023SJohn Marino #endif /* GCC_VMSDBG_H */
256