annotate gcc/dwarf2out.h @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 /* dwarf2out.h - Various declarations for functions found in dwarf2out.c
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 Copyright (C) 1998-2018 Free Software Foundation, Inc.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 This file is part of GCC.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 GCC is free software; you can redistribute it and/or modify it under
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 the terms of the GNU General Public License as published by the Free
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 Software Foundation; either version 3, or (at your option) any later
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 version.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 for more details.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 along with GCC; see the file COPYING3. If not see
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 <http://www.gnu.org/licenses/>. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19
111
kono
parents: 67
diff changeset
20 #ifndef GCC_DWARF2OUT_H
kono
parents: 67
diff changeset
21 #define GCC_DWARF2OUT_H 1
kono
parents: 67
diff changeset
22
kono
parents: 67
diff changeset
23 #include "dwarf2.h" /* ??? Remove this once only used by dwarf2foo.c. */
kono
parents: 67
diff changeset
24
kono
parents: 67
diff changeset
25 typedef struct die_struct *dw_die_ref;
kono
parents: 67
diff changeset
26 typedef const struct die_struct *const_dw_die_ref;
kono
parents: 67
diff changeset
27
kono
parents: 67
diff changeset
28 typedef struct dw_val_node *dw_val_ref;
kono
parents: 67
diff changeset
29 typedef struct dw_cfi_node *dw_cfi_ref;
kono
parents: 67
diff changeset
30 typedef struct dw_loc_descr_node *dw_loc_descr_ref;
kono
parents: 67
diff changeset
31 typedef struct dw_loc_list_struct *dw_loc_list_ref;
kono
parents: 67
diff changeset
32 typedef struct dw_discr_list_node *dw_discr_list_ref;
kono
parents: 67
diff changeset
33 typedef wide_int *wide_int_ptr;
kono
parents: 67
diff changeset
34
kono
parents: 67
diff changeset
35
kono
parents: 67
diff changeset
36 /* Call frames are described using a sequence of Call Frame
kono
parents: 67
diff changeset
37 Information instructions. The register number, offset
kono
parents: 67
diff changeset
38 and address fields are provided as possible operands;
kono
parents: 67
diff changeset
39 their use is selected by the opcode field. */
kono
parents: 67
diff changeset
40
kono
parents: 67
diff changeset
41 enum dw_cfi_oprnd_type {
kono
parents: 67
diff changeset
42 dw_cfi_oprnd_unused,
kono
parents: 67
diff changeset
43 dw_cfi_oprnd_reg_num,
kono
parents: 67
diff changeset
44 dw_cfi_oprnd_offset,
kono
parents: 67
diff changeset
45 dw_cfi_oprnd_addr,
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
46 dw_cfi_oprnd_loc,
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
47 dw_cfi_oprnd_cfa_loc
111
kono
parents: 67
diff changeset
48 };
kono
parents: 67
diff changeset
49
kono
parents: 67
diff changeset
50 typedef union GTY(()) {
kono
parents: 67
diff changeset
51 unsigned int GTY ((tag ("dw_cfi_oprnd_reg_num"))) dw_cfi_reg_num;
kono
parents: 67
diff changeset
52 HOST_WIDE_INT GTY ((tag ("dw_cfi_oprnd_offset"))) dw_cfi_offset;
kono
parents: 67
diff changeset
53 const char * GTY ((tag ("dw_cfi_oprnd_addr"))) dw_cfi_addr;
kono
parents: 67
diff changeset
54 struct dw_loc_descr_node * GTY ((tag ("dw_cfi_oprnd_loc"))) dw_cfi_loc;
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
55 struct dw_cfa_location * GTY ((tag ("dw_cfi_oprnd_cfa_loc")))
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
56 dw_cfi_cfa_loc;
111
kono
parents: 67
diff changeset
57 } dw_cfi_oprnd;
kono
parents: 67
diff changeset
58
kono
parents: 67
diff changeset
59 struct GTY(()) dw_cfi_node {
kono
parents: 67
diff changeset
60 enum dwarf_call_frame_info dw_cfi_opc;
kono
parents: 67
diff changeset
61 dw_cfi_oprnd GTY ((desc ("dw_cfi_oprnd1_desc (%1.dw_cfi_opc)")))
kono
parents: 67
diff changeset
62 dw_cfi_oprnd1;
kono
parents: 67
diff changeset
63 dw_cfi_oprnd GTY ((desc ("dw_cfi_oprnd2_desc (%1.dw_cfi_opc)")))
kono
parents: 67
diff changeset
64 dw_cfi_oprnd2;
kono
parents: 67
diff changeset
65 };
kono
parents: 67
diff changeset
66
kono
parents: 67
diff changeset
67
kono
parents: 67
diff changeset
68 typedef vec<dw_cfi_ref, va_gc> *cfi_vec;
kono
parents: 67
diff changeset
69
kono
parents: 67
diff changeset
70 typedef struct dw_fde_node *dw_fde_ref;
kono
parents: 67
diff changeset
71
kono
parents: 67
diff changeset
72 /* All call frame descriptions (FDE's) in the GCC generated DWARF
kono
parents: 67
diff changeset
73 refer to a single Common Information Entry (CIE), defined at
kono
parents: 67
diff changeset
74 the beginning of the .debug_frame section. This use of a single
kono
parents: 67
diff changeset
75 CIE obviates the need to keep track of multiple CIE's
kono
parents: 67
diff changeset
76 in the DWARF generation routines below. */
kono
parents: 67
diff changeset
77
kono
parents: 67
diff changeset
78 struct GTY(()) dw_fde_node {
kono
parents: 67
diff changeset
79 tree decl;
kono
parents: 67
diff changeset
80 const char *dw_fde_begin;
kono
parents: 67
diff changeset
81 const char *dw_fde_current_label;
kono
parents: 67
diff changeset
82 const char *dw_fde_end;
kono
parents: 67
diff changeset
83 const char *dw_fde_vms_end_prologue;
kono
parents: 67
diff changeset
84 const char *dw_fde_vms_begin_epilogue;
kono
parents: 67
diff changeset
85 const char *dw_fde_second_begin;
kono
parents: 67
diff changeset
86 const char *dw_fde_second_end;
kono
parents: 67
diff changeset
87 cfi_vec dw_fde_cfi;
kono
parents: 67
diff changeset
88 int dw_fde_switch_cfi_index; /* Last CFI before switching sections. */
kono
parents: 67
diff changeset
89 HOST_WIDE_INT stack_realignment;
kono
parents: 67
diff changeset
90
kono
parents: 67
diff changeset
91 unsigned funcdef_number;
kono
parents: 67
diff changeset
92 unsigned fde_index;
kono
parents: 67
diff changeset
93
kono
parents: 67
diff changeset
94 /* Dynamic realign argument pointer register. */
kono
parents: 67
diff changeset
95 unsigned int drap_reg;
kono
parents: 67
diff changeset
96 /* Virtual dynamic realign argument pointer register. */
kono
parents: 67
diff changeset
97 unsigned int vdrap_reg;
kono
parents: 67
diff changeset
98 /* These 3 flags are copied from rtl_data in function.h. */
kono
parents: 67
diff changeset
99 unsigned all_throwers_are_sibcalls : 1;
kono
parents: 67
diff changeset
100 unsigned uses_eh_lsda : 1;
kono
parents: 67
diff changeset
101 unsigned nothrow : 1;
kono
parents: 67
diff changeset
102 /* Whether we did stack realign in this call frame. */
kono
parents: 67
diff changeset
103 unsigned stack_realign : 1;
kono
parents: 67
diff changeset
104 /* Whether dynamic realign argument pointer register has been saved. */
kono
parents: 67
diff changeset
105 unsigned drap_reg_saved: 1;
kono
parents: 67
diff changeset
106 /* True iff dw_fde_begin label is in text_section or cold_text_section. */
kono
parents: 67
diff changeset
107 unsigned in_std_section : 1;
kono
parents: 67
diff changeset
108 /* True iff dw_fde_second_begin label is in text_section or
kono
parents: 67
diff changeset
109 cold_text_section. */
kono
parents: 67
diff changeset
110 unsigned second_in_std_section : 1;
kono
parents: 67
diff changeset
111 };
kono
parents: 67
diff changeset
112
kono
parents: 67
diff changeset
113
kono
parents: 67
diff changeset
114 /* This is how we define the location of the CFA. We use to handle it
kono
parents: 67
diff changeset
115 as REG + OFFSET all the time, but now it can be more complex.
kono
parents: 67
diff changeset
116 It can now be either REG + CFA_OFFSET or *(REG + BASE_OFFSET) + CFA_OFFSET.
kono
parents: 67
diff changeset
117 Instead of passing around REG and OFFSET, we pass a copy
kono
parents: 67
diff changeset
118 of this structure. */
kono
parents: 67
diff changeset
119 struct GTY(()) dw_cfa_location {
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
120 poly_int64_pod offset;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
121 poly_int64_pod base_offset;
111
kono
parents: 67
diff changeset
122 /* REG is in DWARF_FRAME_REGNUM space, *not* normal REGNO space. */
kono
parents: 67
diff changeset
123 unsigned int reg;
kono
parents: 67
diff changeset
124 BOOL_BITFIELD indirect : 1; /* 1 if CFA is accessed via a dereference. */
kono
parents: 67
diff changeset
125 BOOL_BITFIELD in_use : 1; /* 1 if a saved cfa is stored here. */
kono
parents: 67
diff changeset
126 };
kono
parents: 67
diff changeset
127
kono
parents: 67
diff changeset
128
kono
parents: 67
diff changeset
129 /* Each DIE may have a series of attribute/value pairs. Values
kono
parents: 67
diff changeset
130 can take on several forms. The forms that are used in this
kono
parents: 67
diff changeset
131 implementation are listed below. */
kono
parents: 67
diff changeset
132
kono
parents: 67
diff changeset
133 enum dw_val_class
kono
parents: 67
diff changeset
134 {
kono
parents: 67
diff changeset
135 dw_val_class_none,
kono
parents: 67
diff changeset
136 dw_val_class_addr,
kono
parents: 67
diff changeset
137 dw_val_class_offset,
kono
parents: 67
diff changeset
138 dw_val_class_loc,
kono
parents: 67
diff changeset
139 dw_val_class_loc_list,
kono
parents: 67
diff changeset
140 dw_val_class_range_list,
kono
parents: 67
diff changeset
141 dw_val_class_const,
kono
parents: 67
diff changeset
142 dw_val_class_unsigned_const,
kono
parents: 67
diff changeset
143 dw_val_class_const_double,
kono
parents: 67
diff changeset
144 dw_val_class_wide_int,
kono
parents: 67
diff changeset
145 dw_val_class_vec,
kono
parents: 67
diff changeset
146 dw_val_class_flag,
kono
parents: 67
diff changeset
147 dw_val_class_die_ref,
kono
parents: 67
diff changeset
148 dw_val_class_fde_ref,
kono
parents: 67
diff changeset
149 dw_val_class_lbl_id,
kono
parents: 67
diff changeset
150 dw_val_class_lineptr,
kono
parents: 67
diff changeset
151 dw_val_class_str,
kono
parents: 67
diff changeset
152 dw_val_class_macptr,
kono
parents: 67
diff changeset
153 dw_val_class_loclistsptr,
kono
parents: 67
diff changeset
154 dw_val_class_file,
kono
parents: 67
diff changeset
155 dw_val_class_data8,
kono
parents: 67
diff changeset
156 dw_val_class_decl_ref,
kono
parents: 67
diff changeset
157 dw_val_class_vms_delta,
kono
parents: 67
diff changeset
158 dw_val_class_high_pc,
kono
parents: 67
diff changeset
159 dw_val_class_discr_value,
kono
parents: 67
diff changeset
160 dw_val_class_discr_list,
kono
parents: 67
diff changeset
161 dw_val_class_const_implicit,
kono
parents: 67
diff changeset
162 dw_val_class_unsigned_const_implicit,
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
163 dw_val_class_file_implicit,
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
164 dw_val_class_view_list,
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
165 dw_val_class_symview
111
kono
parents: 67
diff changeset
166 };
kono
parents: 67
diff changeset
167
kono
parents: 67
diff changeset
168 /* Describe a floating point constant value, or a vector constant value. */
kono
parents: 67
diff changeset
169
kono
parents: 67
diff changeset
170 struct GTY(()) dw_vec_const {
kono
parents: 67
diff changeset
171 void * GTY((atomic)) array;
kono
parents: 67
diff changeset
172 unsigned length;
kono
parents: 67
diff changeset
173 unsigned elt_size;
kono
parents: 67
diff changeset
174 };
kono
parents: 67
diff changeset
175
kono
parents: 67
diff changeset
176 /* Describe a single value that a discriminant can match.
kono
parents: 67
diff changeset
177
kono
parents: 67
diff changeset
178 Discriminants (in the "record variant part" meaning) are scalars.
kono
parents: 67
diff changeset
179 dw_discr_list_ref and dw_discr_value are a mean to describe a set of
kono
parents: 67
diff changeset
180 discriminant values that are matched by a particular variant.
kono
parents: 67
diff changeset
181
kono
parents: 67
diff changeset
182 Discriminants can be signed or unsigned scalars, and can be discriminants
kono
parents: 67
diff changeset
183 values. Both have to be consistent, though. */
kono
parents: 67
diff changeset
184
kono
parents: 67
diff changeset
185 struct GTY(()) dw_discr_value {
kono
parents: 67
diff changeset
186 int pos; /* Whether the discriminant value is positive (unsigned). */
kono
parents: 67
diff changeset
187 union
kono
parents: 67
diff changeset
188 {
kono
parents: 67
diff changeset
189 HOST_WIDE_INT GTY ((tag ("0"))) sval;
kono
parents: 67
diff changeset
190 unsigned HOST_WIDE_INT GTY ((tag ("1"))) uval;
kono
parents: 67
diff changeset
191 }
kono
parents: 67
diff changeset
192 GTY ((desc ("%1.pos"))) v;
kono
parents: 67
diff changeset
193 };
kono
parents: 67
diff changeset
194
kono
parents: 67
diff changeset
195 struct addr_table_entry;
kono
parents: 67
diff changeset
196
kono
parents: 67
diff changeset
197 /* The dw_val_node describes an attribute's value, as it is
kono
parents: 67
diff changeset
198 represented internally. */
kono
parents: 67
diff changeset
199
kono
parents: 67
diff changeset
200 struct GTY(()) dw_val_node {
kono
parents: 67
diff changeset
201 enum dw_val_class val_class;
kono
parents: 67
diff changeset
202 struct addr_table_entry * GTY(()) val_entry;
kono
parents: 67
diff changeset
203 union dw_val_struct_union
kono
parents: 67
diff changeset
204 {
kono
parents: 67
diff changeset
205 rtx GTY ((tag ("dw_val_class_addr"))) val_addr;
kono
parents: 67
diff changeset
206 unsigned HOST_WIDE_INT GTY ((tag ("dw_val_class_offset"))) val_offset;
kono
parents: 67
diff changeset
207 dw_loc_list_ref GTY ((tag ("dw_val_class_loc_list"))) val_loc_list;
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
208 dw_die_ref GTY ((tag ("dw_val_class_view_list"))) val_view_list;
111
kono
parents: 67
diff changeset
209 dw_loc_descr_ref GTY ((tag ("dw_val_class_loc"))) val_loc;
kono
parents: 67
diff changeset
210 HOST_WIDE_INT GTY ((default)) val_int;
kono
parents: 67
diff changeset
211 unsigned HOST_WIDE_INT
kono
parents: 67
diff changeset
212 GTY ((tag ("dw_val_class_unsigned_const"))) val_unsigned;
kono
parents: 67
diff changeset
213 double_int GTY ((tag ("dw_val_class_const_double"))) val_double;
kono
parents: 67
diff changeset
214 wide_int_ptr GTY ((tag ("dw_val_class_wide_int"))) val_wide;
kono
parents: 67
diff changeset
215 dw_vec_const GTY ((tag ("dw_val_class_vec"))) val_vec;
kono
parents: 67
diff changeset
216 struct dw_val_die_union
kono
parents: 67
diff changeset
217 {
kono
parents: 67
diff changeset
218 dw_die_ref die;
kono
parents: 67
diff changeset
219 int external;
kono
parents: 67
diff changeset
220 } GTY ((tag ("dw_val_class_die_ref"))) val_die_ref;
kono
parents: 67
diff changeset
221 unsigned GTY ((tag ("dw_val_class_fde_ref"))) val_fde_index;
kono
parents: 67
diff changeset
222 struct indirect_string_node * GTY ((tag ("dw_val_class_str"))) val_str;
kono
parents: 67
diff changeset
223 char * GTY ((tag ("dw_val_class_lbl_id"))) val_lbl_id;
kono
parents: 67
diff changeset
224 unsigned char GTY ((tag ("dw_val_class_flag"))) val_flag;
kono
parents: 67
diff changeset
225 struct dwarf_file_data * GTY ((tag ("dw_val_class_file"))) val_file;
kono
parents: 67
diff changeset
226 struct dwarf_file_data *
kono
parents: 67
diff changeset
227 GTY ((tag ("dw_val_class_file_implicit"))) val_file_implicit;
kono
parents: 67
diff changeset
228 unsigned char GTY ((tag ("dw_val_class_data8"))) val_data8[8];
kono
parents: 67
diff changeset
229 tree GTY ((tag ("dw_val_class_decl_ref"))) val_decl_ref;
kono
parents: 67
diff changeset
230 struct dw_val_vms_delta_union
kono
parents: 67
diff changeset
231 {
kono
parents: 67
diff changeset
232 char * lbl1;
kono
parents: 67
diff changeset
233 char * lbl2;
kono
parents: 67
diff changeset
234 } GTY ((tag ("dw_val_class_vms_delta"))) val_vms_delta;
kono
parents: 67
diff changeset
235 dw_discr_value GTY ((tag ("dw_val_class_discr_value"))) val_discr_value;
kono
parents: 67
diff changeset
236 dw_discr_list_ref GTY ((tag ("dw_val_class_discr_list"))) val_discr_list;
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
237 char * GTY ((tag ("dw_val_class_symview"))) val_symbolic_view;
111
kono
parents: 67
diff changeset
238 }
kono
parents: 67
diff changeset
239 GTY ((desc ("%1.val_class"))) v;
kono
parents: 67
diff changeset
240 };
kono
parents: 67
diff changeset
241
kono
parents: 67
diff changeset
242 /* Locations in memory are described using a sequence of stack machine
kono
parents: 67
diff changeset
243 operations. */
kono
parents: 67
diff changeset
244
kono
parents: 67
diff changeset
245 struct GTY((chain_next ("%h.dw_loc_next"))) dw_loc_descr_node {
kono
parents: 67
diff changeset
246 dw_loc_descr_ref dw_loc_next;
kono
parents: 67
diff changeset
247 ENUM_BITFIELD (dwarf_location_atom) dw_loc_opc : 8;
kono
parents: 67
diff changeset
248 /* Used to distinguish DW_OP_addr with a direct symbol relocation
kono
parents: 67
diff changeset
249 from DW_OP_addr with a dtp-relative symbol relocation. */
kono
parents: 67
diff changeset
250 unsigned int dtprel : 1;
kono
parents: 67
diff changeset
251 /* For DW_OP_pick, DW_OP_dup and DW_OP_over operations: true iff.
kono
parents: 67
diff changeset
252 it targets a DWARF prodecure argument. In this case, it needs to be
kono
parents: 67
diff changeset
253 relocated according to the current frame offset. */
kono
parents: 67
diff changeset
254 unsigned int frame_offset_rel : 1;
kono
parents: 67
diff changeset
255 int dw_loc_addr;
kono
parents: 67
diff changeset
256 dw_val_node dw_loc_oprnd1;
kono
parents: 67
diff changeset
257 dw_val_node dw_loc_oprnd2;
kono
parents: 67
diff changeset
258 };
kono
parents: 67
diff changeset
259
kono
parents: 67
diff changeset
260 /* A variant (inside a record variant part) is selected when the corresponding
kono
parents: 67
diff changeset
261 discriminant matches its set of values (see the comment for dw_discr_value).
kono
parents: 67
diff changeset
262 The following datastructure holds such matching information. */
kono
parents: 67
diff changeset
263
kono
parents: 67
diff changeset
264 struct GTY(()) dw_discr_list_node {
kono
parents: 67
diff changeset
265 dw_discr_list_ref dw_discr_next;
kono
parents: 67
diff changeset
266
kono
parents: 67
diff changeset
267 dw_discr_value dw_discr_lower_bound;
kono
parents: 67
diff changeset
268 dw_discr_value dw_discr_upper_bound;
kono
parents: 67
diff changeset
269 /* This node represents only the value in dw_discr_lower_bound when it's
kono
parents: 67
diff changeset
270 zero. It represents the range between the two fields (bounds included)
kono
parents: 67
diff changeset
271 otherwise. */
kono
parents: 67
diff changeset
272 int dw_discr_range;
kono
parents: 67
diff changeset
273 };
kono
parents: 67
diff changeset
274
kono
parents: 67
diff changeset
275 /* Interface from dwarf2out.c to dwarf2cfi.c. */
kono
parents: 67
diff changeset
276 extern struct dw_loc_descr_node *build_cfa_loc
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
277 (dw_cfa_location *, poly_int64);
111
kono
parents: 67
diff changeset
278 extern struct dw_loc_descr_node *build_cfa_aligned_loc
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
279 (dw_cfa_location *, poly_int64, HOST_WIDE_INT);
111
kono
parents: 67
diff changeset
280 extern struct dw_loc_descr_node *mem_loc_descriptor
kono
parents: 67
diff changeset
281 (rtx, machine_mode mode, machine_mode mem_mode,
kono
parents: 67
diff changeset
282 enum var_init_status);
kono
parents: 67
diff changeset
283 extern bool loc_descr_equal_p (dw_loc_descr_ref, dw_loc_descr_ref);
kono
parents: 67
diff changeset
284 extern dw_fde_ref dwarf2out_alloc_current_fde (void);
kono
parents: 67
diff changeset
285
kono
parents: 67
diff changeset
286 extern unsigned long size_of_locs (dw_loc_descr_ref);
kono
parents: 67
diff changeset
287 extern void output_loc_sequence (dw_loc_descr_ref, int);
kono
parents: 67
diff changeset
288 extern void output_loc_sequence_raw (dw_loc_descr_ref);
kono
parents: 67
diff changeset
289
kono
parents: 67
diff changeset
290 /* Interface from dwarf2cfi.c to dwarf2out.c. */
kono
parents: 67
diff changeset
291 extern void lookup_cfa_1 (dw_cfi_ref cfi, dw_cfa_location *loc,
kono
parents: 67
diff changeset
292 dw_cfa_location *remember);
kono
parents: 67
diff changeset
293 extern bool cfa_equal_p (const dw_cfa_location *, const dw_cfa_location *);
kono
parents: 67
diff changeset
294
kono
parents: 67
diff changeset
295 extern void output_cfi (dw_cfi_ref, dw_fde_ref, int);
kono
parents: 67
diff changeset
296
kono
parents: 67
diff changeset
297 extern GTY(()) cfi_vec cie_cfi_vec;
kono
parents: 67
diff changeset
298
kono
parents: 67
diff changeset
299 /* Interface from dwarf2*.c to the rest of the compiler. */
kono
parents: 67
diff changeset
300 extern enum dw_cfi_oprnd_type dw_cfi_oprnd1_desc
kono
parents: 67
diff changeset
301 (enum dwarf_call_frame_info cfi);
kono
parents: 67
diff changeset
302 extern enum dw_cfi_oprnd_type dw_cfi_oprnd2_desc
kono
parents: 67
diff changeset
303 (enum dwarf_call_frame_info cfi);
kono
parents: 67
diff changeset
304
kono
parents: 67
diff changeset
305 extern void output_cfi_directive (FILE *f, struct dw_cfi_node *cfi);
kono
parents: 67
diff changeset
306
kono
parents: 67
diff changeset
307 extern void dwarf2out_emit_cfi (dw_cfi_ref cfi);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
308
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
309 extern void debug_dwarf (void);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
310 struct die_struct;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
311 extern void debug_dwarf_die (struct die_struct *);
111
kono
parents: 67
diff changeset
312 extern void debug_dwarf_loc_descr (dw_loc_descr_ref);
kono
parents: 67
diff changeset
313 extern void debug (die_struct &ref);
kono
parents: 67
diff changeset
314 extern void debug (die_struct *ptr);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
315 extern void dwarf2out_set_demangle_name_func (const char *(*) (const char *));
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
316 #ifdef VMS_DEBUGGING_INFO
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
317 extern void dwarf2out_vms_debug_main_pointer (void);
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
318 #endif
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
319
111
kono
parents: 67
diff changeset
320 enum array_descr_ordering
kono
parents: 67
diff changeset
321 {
kono
parents: 67
diff changeset
322 array_descr_ordering_default,
kono
parents: 67
diff changeset
323 array_descr_ordering_row_major,
kono
parents: 67
diff changeset
324 array_descr_ordering_column_major
kono
parents: 67
diff changeset
325 };
kono
parents: 67
diff changeset
326
kono
parents: 67
diff changeset
327 #define DWARF2OUT_ARRAY_DESCR_INFO_MAX_DIMEN 16
kono
parents: 67
diff changeset
328
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
329 struct array_descr_info
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
330 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
331 int ndimensions;
111
kono
parents: 67
diff changeset
332 enum array_descr_ordering ordering;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
333 tree element_type;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
334 tree base_decl;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
335 tree data_location;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
336 tree allocated;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
337 tree associated;
111
kono
parents: 67
diff changeset
338 tree stride;
kono
parents: 67
diff changeset
339 tree rank;
kono
parents: 67
diff changeset
340 bool stride_in_bits;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
341 struct array_descr_dimen
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
342 {
111
kono
parents: 67
diff changeset
343 /* GCC uses sizetype for array indices, so lower_bound and upper_bound
kono
parents: 67
diff changeset
344 will likely be "sizetype" values. However, bounds may have another
kono
parents: 67
diff changeset
345 type in the original source code. */
kono
parents: 67
diff changeset
346 tree bounds_type;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
347 tree lower_bound;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
348 tree upper_bound;
111
kono
parents: 67
diff changeset
349
kono
parents: 67
diff changeset
350 /* Only Fortran uses more than one dimension for array types. For other
kono
parents: 67
diff changeset
351 languages, the stride can be rather specified for the whole array. */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
352 tree stride;
111
kono
parents: 67
diff changeset
353 } dimen[DWARF2OUT_ARRAY_DESCR_INFO_MAX_DIMEN];
kono
parents: 67
diff changeset
354 };
kono
parents: 67
diff changeset
355
kono
parents: 67
diff changeset
356 enum fixed_point_scale_factor
kono
parents: 67
diff changeset
357 {
kono
parents: 67
diff changeset
358 fixed_point_scale_factor_binary,
kono
parents: 67
diff changeset
359 fixed_point_scale_factor_decimal,
kono
parents: 67
diff changeset
360 fixed_point_scale_factor_arbitrary
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
361 };
111
kono
parents: 67
diff changeset
362
kono
parents: 67
diff changeset
363 struct fixed_point_type_info
kono
parents: 67
diff changeset
364 {
kono
parents: 67
diff changeset
365 /* A scale factor is the value one has to multiply with physical data in
kono
parents: 67
diff changeset
366 order to get the fixed point logical data. The DWARF standard enables one
kono
parents: 67
diff changeset
367 to encode it in three ways. */
kono
parents: 67
diff changeset
368 enum fixed_point_scale_factor scale_factor_kind;
kono
parents: 67
diff changeset
369 union
kono
parents: 67
diff changeset
370 {
kono
parents: 67
diff changeset
371 /* For binary scale factor, the scale factor is: 2 ** binary. */
kono
parents: 67
diff changeset
372 int binary;
kono
parents: 67
diff changeset
373 /* For decimal scale factor, the scale factor is: 10 ** binary. */
kono
parents: 67
diff changeset
374 int decimal;
kono
parents: 67
diff changeset
375 /* For arbitrary scale factor, the scale factor is:
kono
parents: 67
diff changeset
376 numerator / denominator. */
kono
parents: 67
diff changeset
377 struct
kono
parents: 67
diff changeset
378 {
kono
parents: 67
diff changeset
379 unsigned HOST_WIDE_INT numerator;
kono
parents: 67
diff changeset
380 HOST_WIDE_INT denominator;
kono
parents: 67
diff changeset
381 } arbitrary;
kono
parents: 67
diff changeset
382 } scale_factor;
kono
parents: 67
diff changeset
383 };
kono
parents: 67
diff changeset
384
kono
parents: 67
diff changeset
385 void dwarf2out_c_finalize (void);
kono
parents: 67
diff changeset
386
kono
parents: 67
diff changeset
387 #endif /* GCC_DWARF2OUT_H */