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