2 \label{chap:typeentries}
3 This section presents the debugging information entries
4 that describe program types: base types, modified types and
5 user\dash defined types.
7 If the scope of the declaration of a named type begins after
8 \hypertarget{chap:DWATstartscopetypedeclaration}
9 the low pc value for the scope most closely enclosing the
10 declaration, the declaration may have a
11 \livelink{chap:DWATstartscope}{DW\-\_AT\-\_start\-\_scope}
12 attribute as described for objects in
13 Section \refersec{chap:dataobjectentries}.
15 \section{Base Type Entries}
16 \label{chap:basetypeentries}
18 \textit{A base type is a data type that is not defined in terms of
20 \addtoindexx{fundamental type|see{base type entry}}
21 Each programming language has a set of base
22 types that are considered to be built into that language.}
24 A base type is represented by a debugging information entry
26 \livetarg{chap:DWTAGbasetype}{DW\-\_TAG\-\_base\-\_type}.
28 A \addtoindex{base type entry}
29 has a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
31 \addtoindexx{name attribute}
33 a null\dash terminated string containing the name of the base type
34 as recognized by the programming language of the compilation
35 unit containing the base type entry.
38 \addtoindexx{encoding attribute}
39 a \livelink{chap:DWATencoding}{DW\-\_AT\-\_encoding} attribute describing
40 how the base type is encoded and is to be interpreted. The
41 value of this attribute is an integer constant. The set of
42 values and their meanings for the \livelink{chap:DWATencoding}{DW\-\_AT\-\_encoding} attribute
44 Figure \refersec{fig:encodingattributevalues}
48 may have a \livelink{chap:DWATendianity}{DW\-\_AT\-\_endianity} attribute
49 \addtoindexx{endianity attribute}
51 Section \refersec{chap:dataobjectentries}.
52 If omitted, the encoding assumes the representation that
53 is the default for the target architecture.
56 \hypertarget{chap:DWATbytesizedataobjectordatatypesize}
57 either a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} attribute
58 \hypertarget{chap:DWATbitsizebasetypebitsize}
59 or a \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attribute
60 \addtoindex{bit size attribute}
61 whose integer constant value
62 (see Section \refersec{chap:byteandbitsizes})
63 is the amount of storage needed to hold
66 \textit{For example, the
67 \addtoindex{C} type int on a machine that uses 32\dash bit
68 integers is represented by a base type entry with a name
69 attribute whose value is “int”, an encoding attribute
70 whose value is \livelink{chap:DWATEsigned}{DW\-\_ATE\-\_signed}
71 and a byte size attribute whose value is 4.}
73 If the value of an object of the given type does not fully
74 occupy the storage described by a byte size attribute,
75 \hypertarget{chap:DWATdatabitoffsetbasetypebitlocation}
76 the base type entry may also have
77 \addtoindexx{bit size attribute}
79 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} and a
80 \livelink{chap:DWATdatabitoffset}{DW\-\_AT\-\_data\-\_bit\-\_offset} attribute,
82 \addtoindexx{data bit offset attribute}
84 integer constant values (
85 see Section \refersec{chap:staticanddynamicvaluesofattributes}).
87 attribute describes the actual size in bits used to represent
88 values of the given type. The data bit offset attribute is the
89 offset in bits from the beginning of the containing storage to
90 the beginning of the value. Bits that are part of the offset
91 are padding. The data bit offset uses the bit numbering and
92 direction conventions that are appropriate to the current
94 target system to locate the beginning of the storage and
95 value. If this attribute is omitted a default data bit offset
99 \livelink{chap:DWATdatabitoffset}{DW\-\_AT\-\_data\-\_bit\-\_offset}
101 \addtoindexx{bit offset attribute}
103 \addtoindexx{data bit offset attribute}
105 \addtoindex{DWARF Version 4} and
106 is also used for bit field members
107 (see Section \refersec{chap:datamemberentries}).
109 \hypertarget{chap:DWATbitoffsetbasetypebitlocation}
110 replaces the attribute
111 \livelink{chap:DWATbitoffset}{DW\-\_AT\-\_bit\-\_offset}
113 \addtoindexx{bit offset attribute (V3)}
114 types as defined in DWARF V3 and earlier. The earlier attribute
115 is defined in a manner suitable for bit field members on
116 big\dash endian architectures but which is wasteful for use on
117 little\dash endian architectures.}
119 \textit{The attribute \livelink{chap:DWATbitoffset}{DW\-\_AT\-\_bit\-\_offset} is
121 \addtoindex{DWARF Version 4}
122 for use in base types, but implementations may continue to
123 support its use for compatibility.}
126 \addtoindex{DWARF Version 3}
127 definition of these attributes is as follows.}
129 \begin{myindentpara}{1cm}
130 \textit{A base type entry has a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size}
131 attribute, whose value
132 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
133 is the size in bytes of the storage unit
134 used to represent an object of the given type.}
136 \textit{If the value of an object of the given type does not fully
137 occupy the storage unit described by the byte size attribute,
138 the base type entry may have a
139 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attribute
140 \addtoindexx{bit size attribute (V3)}
142 \livelink{chap:DWATbitoffset}{DW\-\_AT\-\_bit\-\_offset} attribute, both of whose values
143 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
144 are integers. The bit size attribute describes the actual
145 size in bits used to represent a value of the given type.
146 The bit offset attribute describes the offset in bits of the
147 high order bit of a value of the given type from the high
148 order bit of the storage unit used to contain that value.}
153 \addtoindexx{DWARF Version 3}
155 \addtoindexx{DWARF Version 4} and 4, note that DWARF V4
156 defines the following combinations of attributes:}
159 \item \textit{DW\-\_AT\-\_byte\-\_size}
160 \item \textit{DW\-\_AT\-\_bit\-\_size}
161 \item \textit{\livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size},
162 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size}
163 and optionally \livelink{chap:DWATdatabitoffset}{DW\-\_AT\-\_data\-\_bit\-\_offset}}
165 \textit{DWARF V3 defines the following combinations:}
166 \addtoindexx{DWARF Version 3}
167 % FIXME: the figure below interferes with the following
168 % bullet list, which looks horrible as a result.
170 \item \textit{DW\-\_AT\-\_byte\-\_size}
171 \item \textit{\livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size},
172 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} and
173 \livelink{chap:DWATbitoffset}{DW\-\_AT\-\_bit\-\_offset}}
176 \begin{figure}[!here]
178 \begin{tabular}{lp{9cm}}
179 Name&Meaning\\ \hline
180 \livetarg{chap:DWATEaddress}{DW\-\_ATE\-\_address} & linear machine address (for
181 segmented addresses see
182 Section \refersec{chap:segmentedaddresses}) \\
183 \livetarg{chap:DWATEboolean}{DW\-\_ATE\-\_boolean}& true or false \\
185 \livetarg{chap:DWATEcomplexfloat}{DW\-\_ATE\-\_complex\-\_float}& complex binary
186 floating\dash point number \\
187 \livetarg{chap:DWATEfloat}{DW\-\_ATE\-\_float} & binary floating\dash point number \\
188 \livetarg{chap:DWATEimaginaryfloat}{DW\-\_ATE\-\_imaginary\-\_float}& imaginary binary
189 floating\dash point number \\
190 \livetarg{chap:DWATEsigned}{DW\-\_ATE\-\_signed}& signed binary integer \\
191 \livetarg{chap:DWATEsignedchar}{DW\-\_ATE\-\_signed\-\_char}& signed character \\
192 \livetarg{chap:DWATEunsigned}{DW\-\_ATE\-\_unsigned} & unsigned binary integer \\
193 \livetarg{chap:DWATEunsignedchar}{DW\-\_ATE\-\_unsigned\-\_char} & unsigned character \\
194 \livetarg{chap:DWATEpackeddecimal}{DW\-\_ATE\-\_packed\-\_decimal} & packed decimal \\
195 \livetarg{chap:DWATEnumericstring}{DW\-\_ATE\-\_numeric\-\_string}& numeric string \\
196 \livetarg{chap:DWATEedited}{DW\-\_ATE\-\_edited} & edited string \\
197 \livetarg{chap:DWATEsignedfixed}{DW\-\_ATE\-\_signed\-\_fixed} & signed fixed\dash point scaled integer \\
198 \livetarg{chap:DWATEunsignedfixed}{DW\-\_ATE\-\_unsigned\-\_fixed}& unsigned fixed\dash point scaled integer \\
199 \livetarg{chap:DWATEdecimalfloat}{DW\-\_ATE\-\_decimal\-\_float} & decimal floating\dash point number \\
200 \livetarg{chap:DWATEUTF}{DW\-\_ATE\-\_UTF} & \addtoindex{Unicode} character \\
202 \caption{Encoding attribute values}
203 \label{fig:encodingattributevalues}
206 \textit{The \livelink{chap:DWATEdecimalfloat}{DW\-\_ATE\-\_decimal\-\_float} encoding is intended for
207 floating\dash point representations that have a power\dash of\dash ten
208 exponent, such as that specified in IEEE 754R.}
210 \textit{The \livelink{chap:DWATEUTF}{DW\-\_ATE\-\_UTF} encoding is intended for \addtoindex{Unicode}
211 string encodings (see the Universal Character Set standard,
212 ISO/IEC 10646\dash 1:1993). For example, the
213 \addtoindex{C++} type char16\_t is
214 represented by a base type entry with a name attribute whose
215 value is “char16\_t”, an encoding attribute whose value
216 is \livelink{chap:DWATEUTF}{DW\-\_ATE\-\_UTF} and a byte size attribute whose value is 2.}
219 \livelink{chap:DWATEpackeddecimal}{DW\-\_ATE\-\_packed\-\_decimal}
221 \livelink{chap:DWATEnumericstring}{DW\-\_ATE\-\_numeric\-\_string}
223 represent packed and unpacked decimal string numeric data
224 types, respectively, either of which may be
226 \addtoindexx{decimal scale attribute}
228 \addtoindexx{decimal sign attribute}
230 \addtoindexx{digit count attribute}
232 \hypertarget{chap:DWATdecimalsigndecimalsignrepresentation}
234 \hypertarget{chap:DWATdigitcountdigitcountforpackeddecimalornumericstringtype}
235 base types are used in combination with
236 \livelink{chap:DWATdecimalsign}{DW\-\_AT\-\_decimal\-\_sign},
237 \livelink{chap:DWATdigitcount}{DW\-\_AT\-\_digit\-\_count} and
238 \livelink{chap:DWATdecimalscale}{DW\-\_AT\-\_decimal\-\_scale}
241 A \livelink{chap:DWATdecimalsign}{DW\-\_AT\-\_decimal\-\_sign} attribute
242 \addtoindexx{decimal sign attribute}
243 is an integer constant that
244 conveys the representation of the sign of the decimal type
245 (see Figure \refersec{fig:decimalsignattributevalues}).
246 Its integer constant value is interpreted to
247 mean that the type has a leading overpunch, trailing overpunch,
248 leading separate or trailing separate sign representation or,
249 alternatively, no sign at all.
252 \livelink{chap:DWATdigitcount}{DW\-\_AT\-\_digit\-\_count}
254 \addtoindexx{digit count attribute}
255 is an integer constant
256 value that represents the number of digits in an instance of
259 \hypertarget{chap:DWATdecimalscaledecimalscalefactor}
260 The \livelink{chap:DWATdecimalscale}{DW\-\_AT\-\_decimal\-\_scale}
262 \addtoindexx{decimal scale attribute}
263 is an integer constant value
264 that represents the exponent of the base ten scale factor to
265 be applied to an instance of the type. A scale of zero puts the
266 decimal point immediately to the right of the least significant
267 digit. Positive scale moves the decimal point to the right
268 and implies that additional zero digits on the right are not
269 stored in an instance of the type. Negative scale moves the
270 decimal point to the left; if the absolute value of the scale
271 is larger than the digit count, this implies additional zero
272 digits on the left are not stored in an instance of the type.
274 The \livelink{chap:DWATEedited}{DW\-\_ATE\-\_edited}
276 \hypertarget{chap:DWATpicturestringpicturestringfornumericstringtype}
277 type is used to represent an edited
278 numeric or alphanumeric data type. It is used in combination
279 with an \livelink{chap:DWATpicturestring}{DW\-\_AT\-\_picture\-\_string} attribute whose value is a
280 null\dash terminated string containing the target\dash dependent picture
281 string associated with the type.
283 If the edited base type entry describes an edited numeric
284 data type, the edited type entry has a \livelink{chap:DWATdigitcount}{DW\-\_AT\-\_digit\-\_count} and a
285 \livelink{chap:DWATdecimalscale}{DW\-\_AT\-\_decimal\-\_scale} attribute.
286 \addtoindexx{decimal scale attribute}
287 These attributes have the same
288 interpretation as described for the
289 \livelink{chap:DWATEpackeddecimal}{DW\-\_ATE\-\_packed\-\_decimal} and
290 \livelink{chap:DWATEnumericstring}{DW\-\_ATE\-\_numeric\-\_string} base
291 types. If the edited type entry
292 describes an edited alphanumeric data type, the edited type
293 entry does not have these attributes.
296 \textit{The presence or absence of the \livelink{chap:DWATdigitcount}{DW\-\_AT\-\_digit\-\_count} and
297 \livelink{chap:DWATdecimalscale}{DW\-\_AT\-\_decimal\-\_scale} attributes
298 \addtoindexx{decimal scale attribute}
299 allows a debugger to easily
300 distinguish edited numeric from edited alphanumeric, although
301 in principle the digit count and scale are derivable by
302 interpreting the picture string.}
304 The \livelink{chap:DWATEsignedfixed}{DW\-\_ATE\-\_signed\-\_fixed} and \livelink{chap:DWATEunsignedfixed}{DW\-\_ATE\-\_unsigned\-\_fixed} entries
305 describe signed and unsigned fixed\dash point binary data types,
308 The fixed binary type entries have
309 \addtoindexx{digit count attribute}
311 \livelink{chap:DWATdigitcount}{DW\-\_AT\-\_digit\-\_count}
312 attribute with the same interpretation as described for the
313 \livelink{chap:DWATEpackeddecimal}{DW\-\_ATE\-\_packed\-\_decimal} and \livelink{chap:DWATEnumericstring}{DW\-\_ATE\-\_numeric\-\_string} base types.
315 For a data type with a decimal scale factor, the fixed binary
317 \livelink{chap:DWATdecimalscale}{DW\-\_AT\-\_decimal\-\_scale} attribute
318 \addtoindexx{decimal scale attribute}
320 interpretation as described for the
321 \livelink{chap:DWATEpackeddecimal}{DW\-\_ATE\-\_packed\-\_decimal}
322 and \livelink{chap:DWATEnumericstring}{DW\-\_ATE\-\_numeric\-\_string} base types.
324 \hypertarget{chap:DWATbinaryscalebinaryscalefactorforfixedpointtype}
325 For a data type with a binary scale factor, the fixed
326 \addtoindexx{binary scale attribute}
327 binary type entry has a
328 \livelink{chap:DWATbinaryscale}{DW\-\_AT\-\_binary\-\_scale} attribute.
330 \livelink{chap:DWATbinaryscale}{DW\-\_AT\-\_binary\-\_scale} attribute
331 is an integer constant value
332 that represents the exponent of the base two scale factor to
333 be applied to an instance of the type. Zero scale puts the
334 binary point immediately to the right of the least significant
335 bit. Positive scale moves the binary point to the right and
336 implies that additional zero bits on the right are not stored
337 in an instance of the type. Negative scale moves the binary
338 point to the left; if the absolute value of the scale is
339 larger than the number of bits, this implies additional zero
340 bits on the left are not stored in an instance of the type.
343 \hypertarget{chap:DWATsmallscalefactorforfixedpointtype}
344 a data type with a non\dash decimal and non\dash binary scale factor,
345 the fixed binary type entry has a
346 \livelink{chap:DWATsmall}{DW\-\_AT\-\_small} attribute which
347 \addtoindexx{small attribute}
349 \livelink{chap:DWTAGconstant}{DW\-\_TAG\-\_constant} entry. The scale factor value
350 is interpreted in accordance with the value defined by the
351 \livelink{chap:DWTAGconstant}{DW\-\_TAG\-\_constant} entry. The value represented is the product
352 of the integer value in memory and the associated constant
355 \textit{The \livelink{chap:DWATsmall}{DW\-\_AT\-\_small} attribute
356 is defined with the \addtoindex{Ada} small
361 \begin{tabular}{lp{9cm}}
362 Name&Meaning\\ \hline
363 \livetarg{chap:DWDSunsigned}{DW\-\_DS\-\_unsigned} & unsigned \\
364 \livetarg{chap:DWDSleadingoverpunch}{DW\-\_DS\-\_leading\-\_overpunch} & Sign
365 is encoded in the most significant digit in a target\dash dependent manner \\
366 \livetarg{chap:DWDStrailingoverpunch}{DW\-\_DS\-\_trailing\-\_overpunch} & Sign
367 is encoded in the least significant digit in a target\dash dependent manner \\
368 \livetarg{chap:DWDSleadingseparate}{DW\-\_DS\-\_leading\-\_separate}
369 & Decimal type: Sign is a ``+'' or ``-'' character
370 to the left of the most significant digit. \\
371 \livetarg{chap:DWDStrailingseparate}{DW\-\_DS\-\_trailing\-\_separate}
372 & Decimal type: Sign is a ``+'' or ``-'' character
373 to the right of the least significant digit. \\
374 &Packed decimal type: Least significant nibble contains
375 a target\dash dependent value
376 indicating positive or negative. \\
378 \caption{Decimal sign attribute values}
379 \label{fig:decimalsignattributevalues}
382 \section{Unspecified Type Entries}
383 \label{chap:unspecifiedtypeentries}
384 \addtoindexx{unspecified type entry}
385 \addtoindexx{void type|see{unspecified type entry}}
386 Some languages have constructs in which a type
387 may be left unspecified or the absence of a type
388 may be explicitly indicated.
390 An unspecified (implicit, unknown, ambiguous or nonexistent)
391 type is represented by a debugging information entry with
392 the tag \livetarg{chap:DWTAGunspecifiedtype}{DW\-\_TAG\-\_unspecified\-\_type}.
393 If a name has been given
394 to the type, then the corresponding unspecified type entry
395 has a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
396 \addtoindexx{name attribute}
398 a null\dash terminated
399 string containing the name as it appears in the source program.
401 The interpretation of this debugging information entry is
402 intentionally left flexible to allow it to be interpreted
403 appropriately in different languages. For example, in
404 \addtoindex{C} and \addtoindex{C++}
405 the language implementation can provide an unspecified type
406 entry with the name “void” which can be referenced by the
407 type attribute of pointer types and typedef declarations for
409 % FIXME: the following reference was wrong in DW4 so DavidA guessed
411 Sections \refersec{chap:unspecifiedtypeentries} and
412 %The following reference was valid, so the following is probably correct.
413 Section \refersec{chap:typedefentries},
414 respectively). As another
415 example, in \addtoindex{Ada} such an unspecified type entry can be referred
416 to by the type attribute of an access type where the denoted
417 \addtoindexx{incomplete type (Ada)}
418 type is incomplete (the name is declared as a type but the
419 definition is deferred to a separate compilation unit).
421 \section{Type Modifier Entries}
422 \label{chap:typemodifierentries}
423 \addtoindexx{type modifier entry}
425 A base or user\dash defined type may be modified in different ways
426 in different languages. A type modifier is represented in
427 DWARF by a debugging information entry with one of the tags
428 given in Figure \refersec{fig:typemodifiertags}.
429 \addtoindexx{type modifier|see{constant type entry}}
430 \addtoindexx{type modifier|see{reference type entry}}
431 \addtoindexx{type modifier|see{restricted type entry}}
432 \addtoindexx{type modifier|see{packed type entry}}
433 \addtoindexx{type modifier|see{pointer type entry}}
434 \addtoindexx{type modifier|see{shared type entry}}
435 \addtoindexx{type modifier|see{volatile type entry}}
437 If a name has been given to the modified type in the source
438 program, then the corresponding modified type entry has
439 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
440 \addtoindexx{name attribute}
441 whose value is a null\dash terminated
442 string containing the modified type name as it appears in
445 Each of the type modifier entries has
446 \addtoindexx{type attribute}
448 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute,
449 whose value is a reference to a debugging information entry
450 describing a base type, a user-defined type or another type
453 A modified type entry describing a
454 \addtoindexx{pointer type entry}
455 pointer or \addtoindex{reference type}
456 (using \livelink{chap:DWTAGpointertype}{DW\-\_TAG\-\_pointer\-\_type},
457 \livelink{chap:DWTAGreferencetype}{DW\-\_TAG\-\_reference\-\_type} or
458 \livelink{chap:DWTAGrvaluereferencetype}{DW\-\_TAG\-\_rvalue\-\_reference\-\_type})
459 % Another instance of no-good-place-to-put-index entry.
461 \addtoindexx{address class!attribute}
463 \hypertarget{chap:DWATadressclasspointerorreferencetypes}
465 \livelink{chap:DWATaddressclass}{DW\-\_AT\-\_address\-\_class}
466 attribute to describe how objects having the given pointer
467 or reference type ought to be dereferenced.
469 A modified type entry describing a shared qualified type
470 (using \livelink{chap:DWTAGsharedtype}{DW\-\_TAG\-\_shared\-\_type}) may have a
471 \livelink{chap:DWATcount}{DW\-\_AT\-\_count} attribute
472 \addtoindexx{count attribute}
473 whose value is a constant expressing the blocksize of the
474 type. If no count attribute is present, then the “infinite”
475 blocksize is assumed.
477 When multiple type modifiers are chained together to modify
478 a base or user-defined type, the tree ordering reflects the
480 \addtoindexx{reference type entry, lvalue|see{reference type entry}}
482 \addtoindexx{reference type entry, rvalue|see{rvalue reference type entry}}
484 \addtoindexx{parameter|see{macro formal parameter list}}
486 \addtoindexx{parameter|see{\textit{this} parameter}}
488 \addtoindexx{parameter|see{variable parameter attribute}}
490 \addtoindexx{parameter|see{optional parameter attribute}}
492 \addtoindexx{parameter|see{unspecified parameters entry}}
494 \addtoindexx{parameter|see{template value parameter entry}}
496 \addtoindexx{parameter|see{template type parameter entry}}
498 \addtoindexx{parameter|see{formal parameter entry}}
503 \begin{tabular}{lp{9cm}}
504 Name&Meaning\\ \hline
505 \livetarg{chap:DWTAGconsttype}{DW\-\_TAG\-\_const\-\_type} & C or C++ const qualified type
506 \addtoindexx{const qualified type entry} \addtoindexx{C} \addtoindexx{C++} \\
507 \livetarg{chap:DWTAGpackedtype}{DW\-\_TAG\-\_packed\-\_type}& \addtoindex{Pascal} or Ada packed type\addtoindexx{packed type entry}
508 \addtoindexx{packed qualified type entry} \addtoindexx{Ada} \addtoindexx{Pascal} \\
509 \livetarg{chap:DWTAGpointertype}{DW\-\_TAG\-\_pointer\-\_type} & Pointer to an object of
510 the type being modified \addtoindexx{pointer qualified type entry} \\
511 \livetarg{chap:DWTAGreferencetype}{DW\-\_TAG\-\_reference\-\_type}& C++ (lvalue) reference
512 to an object of the type
513 \addtoindexx{reference type entry}
515 \addtoindexx{reference qualified type entry} \\
516 \livetarg{chap:DWTAGrestricttype}{DW\-\_TAG\-\_restrict\-\_type}& \addtoindex{C}
518 \addtoindexx{restricted type entry}
520 \addtoindexx{restrict qualified type} \\
521 \livetarg{chap:DWTAGrvaluereferencetype}{DW\-\_TAG\-\_rvalue\-\_reference\-\_type} & C++
522 \addtoindexx{rvalue reference type entry}
524 \addtoindexx{restricted type entry}
525 reference to an object of the type being modified
526 \addtoindexx{rvalue reference qualified type entry} \\
527 \livetarg{chap:DWTAGsharedtype}{DW\-\_TAG\-\_shared\-\_type}&\addtoindex{UPC} shared qualified type
528 \addtoindexx{shared qualified type entry} \\
529 \livetarg{chap:DWTAGvolatiletype}{DW\-\_TAG\-\_volatile\-\_type}&C or C++ volatile qualified type
530 \addtoindex{volatile qualified type entry} \\
532 \caption{Type modifier tags}
533 \label{fig:typemodifiertags}
536 %The following clearpage prevents splitting the example across pages.
538 \textit{As examples of how type modifiers are ordered, take the following C
542 const unsigned char * volatile p;
544 \textit{which represents a volatile pointer to a constant
545 character. This is encoded in DWARF as:}
547 \livelink{chap:DWTAGvariable}{DW\-\_TAG\-\_variable}(p) -->
548 \livelink{chap:DWTAGvolatiletype}{DW\-\_TAG\-\_volatile\-\_type} -->
549 \livelink{chap:DWTAGpointertype}{DW\-\_TAG\-\_pointer\-\_type} -->
550 \livelink{chap:DWTAGconsttype}{DW\-\_TAG\-\_const\-\_type} -->
551 \livelink{chap:DWTAGbasetype}{DW\-\_TAG\-\_base\-\_type}(unsigned char)
553 \textit{On the other hand}
555 volatile unsigned char * const restrict p;
557 \textit{represents a restricted constant
558 pointer to a volatile character. This is encoded as:}
560 \livelink{chap:DWTAGvariable}{DW\-\_TAG\-\_variable}(p) -->
561 \livelink{chap:DWTAGrestricttype}{DW\-\_TAG\-\_restrict\-\_type} -->
562 \livelink{chap:DWTAGconsttype}{DW\-\_TAG\-\_const\-\_type} -->
563 \livelink{chap:DWTAGpointertype}{DW\-\_TAG\-\_pointer\-\_type} -->
564 \livelink{chap:DWTAGvolatiletype}{DW\-\_TAG\-\_volatile\-\_type} -->
565 \livelink{chap:DWTAGbasetype}{DW\-\_TAG\-\_base\-\_type}(unsigned char)
568 \section{Typedef Entries}
569 \label{chap:typedefentries}
570 A named type that is defined in terms of another type
571 definition is represented by a debugging information entry with
572 \addtoindexx{typedef entry}
573 the tag \livetarg{chap:DWTAGtypedef}{DW\-\_TAG\-\_typedef}.
574 The typedef entry has a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
575 \addtoindexx{name attribute}
576 whose value is a null\dash terminated string containing
577 the name of the typedef as it appears in the source program.
579 The typedef entry may also contain
580 \addtoindexx{type attribute}
582 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute whose
583 value is a reference to the type named by the typedef. If
584 the debugging information entry for a typedef represents
585 a declaration of the type that is not also a definition,
586 it does not contain a type attribute.
588 \textit{Depending on the language, a named type that is defined in
589 terms of another type may be called a type alias, a subtype,
590 a constrained type and other terms. A type name declared with
591 no defining details may be termed an
592 \addtoindexx{incomplete type}
593 incomplete, forward or hidden type.
594 While the DWARF \livelink{chap:DWTAGtypedef}{DW\-\_TAG\-\_typedef} entry was
595 originally inspired by the like named construct in
596 \addtoindex{C} and \addtoindex{C++},
597 it is broadly suitable for similar constructs (by whatever
598 source syntax) in other languages.}
600 \section{Array Type Entries}
601 \label{chap:arraytypeentries}
603 \textit{Many languages share the concept of an ``array,'' which is
604 \addtoindexx{array type entry}
605 a table of components of identical type.}
607 An array type is represented by a debugging information entry
608 with the tag \livetarg{chap:DWTAGarraytype}{DW\-\_TAG\-\_array\-\_type}.
609 If a name has been given to
610 \addtoindexx{array!declaration of type}
611 the array type in the source program, then the corresponding
612 array type entry has a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
613 \addtoindexx{name attribute}
615 null\dash terminated string containing the array type name as it
616 appears in the source program.
619 \hypertarget{chap:DWATorderingarrayrowcolumnordering}
620 array type entry describing a multidimensional array may
621 \addtoindexx{array!element ordering}
622 have a \livelink{chap:DWATordering}{DW\-\_AT\-\_ordering} attribute whose integer constant value is
623 interpreted to mean either row-major or column-major ordering
624 of array elements. The set of values and their meanings
625 for the ordering attribute are listed in
626 Figure \refersec{fig:arrayordering}.
628 ordering attribute is present, the default ordering for the
629 source language (which is indicated by the
630 \livelink{chap:DWATlanguage}{DW\-\_AT\-\_language}
632 \addtoindexx{language attribute}
633 of the enclosing compilation unit entry) is assumed.
636 \autorows[0pt]{c}{1}{l}{
637 \livetarg{chap:DWORDcolmajor}{DW\-\_ORD\-\_col\-\_major},
638 \livetarg{chap:DWORDrowmajor}{DW\-\_ORD\-\_row\-\_major}
640 \caption{Array ordering}\label{fig:arrayordering}
643 The ordering attribute may optionally appear on one-dimensional
644 arrays; it will be ignored.
646 An array type entry has
647 \addtoindexx{type attribute}
648 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute
650 \addtoindexx{array!element type}
651 the type of each element of the array.
653 If the amount of storage allocated to hold each element of an
654 object of the given array type is different from the amount
655 \addtoindexx{stride attribute|see{bit stride attribute or byte stride attribute}}
656 of storage that is normally allocated to hold an individual
657 \hypertarget{chap:DWATbitstridearrayelementstrideofarraytype}
659 \hypertarget{chap:DWATbytestridearrayelementstrideofarraytype}
660 indicated element type, then the array type
661 \addtoindexx{bit stride attribute}
663 \livelink{chap:DWATbytestride}{DW\-\_AT\-\_byte\-\_stride}
665 \addtoindexx{byte stride attribute}
666 a \livelink{chap:DWATbitstride}{DW\-\_AT\-\_bit\-\_stride}
668 \addtoindexx{bit stride attribute}
670 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
672 element of the array.
674 The array type entry may have either a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} or a
675 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attribute
676 (see Section \refersec{chap:byteandbitsizes}),
678 amount of storage needed to hold an instance of the array type.
680 \textit{If the size of the array can be determined statically at
681 compile time, this value can usually be computed by multiplying
682 the number of array elements by the size of each element.}
685 Each array dimension is described by a debugging information
686 entry with either the
687 \addtoindexx{subrange type entry!as array dimension}
688 tag \livelink{chap:DWTAGsubrangetype}{DW\-\_TAG\-\_subrange\-\_type} or the
689 \addtoindexx{enumeration type entry!as array dimension}
691 \livelink{chap:DWTAGenumerationtype}{DW\-\_TAG\-\_enumeration\-\_type}. These entries are
693 array type entry and are ordered to reflect the appearance of
694 the dimensions in the source program (i.e., leftmost dimension
695 first, next to leftmost second, and so on).
697 \textit{In languages, such as C, in which there is no concept of
698 a “multidimensional array”, an array of arrays may
699 be represented by a debugging information entry for a
700 multidimensional array.}
702 Other attributes especially applicable to arrays are
703 \livelink{chap:DWATallocated}{DW\-\_AT\-\_allocated},
704 \livelink{chap:DWATassociated}{DW\-\_AT\-\_associated} and
705 \livelink{chap:DWATdatalocation}{DW\-\_AT\-\_data\-\_location},
706 which are described in
707 Section \refersec{chap:dynamictypeproperties}.
708 For relevant examples, see also Appendix \refersec{app:fortran90example}.
710 \section{ Structure, Union, Class and Interface Type Entries}
711 \label{chap:structureunionclassandinterfacetypeentries}
713 \textit{The languages
715 \addtoindex{C++}, and
716 \addtoindex{Pascal}, among others, allow the
717 programmer to define types that are collections of related
718 \addtoindexx{structure type entry}
720 In \addtoindex{C} and \addtoindex{C++}, these collections are called
722 In \addtoindex{Pascal}, they are called “records.”
723 The components may be of different types. The components are
724 called “members” in \addtoindex{C} and
725 \addtoindex{C++}, and “fields” in \addtoindex{Pascal}.}
727 \textit{The components of these collections each exist in their
728 own space in computer memory. The components of a C or C++
729 “union” all coexist in the same memory.}
731 \textit{\addtoindex{Pascal} and
732 other languages have a “discriminated union,”
733 \addtoindex{discriminated union|see {variant entry}}
734 also called a “variant record.” Here, selection of a
735 number of alternative substructures (“variants”) is based
736 on the value of a component that is not part of any of those
737 substructures (the “discriminant”).}
739 \textit{\addtoindex{C++} and
740 \addtoindex{Java} have the notion of ``class'', which is in some
741 ways similar to a structure. A class may have “member
742 functions” which are subroutines that are within the scope
743 of a class or structure.}
745 \textit{The \addtoindex{C++} notion of
746 structure is more general than in \addtoindex{C}, being
747 equivalent to a class with minor differences. Accordingly,
748 in the following discussion statements about
749 \addtoindex{C++} classes may
750 be understood to apply to \addtoindex{C++} structures as well.}
752 \subsection{Structure, Union and Class Type Entries}
753 \label{chap:structureunionandclasstypeentries}
756 Structure, union, and class types are represented by debugging
757 \addtoindexx{structure type entry}
759 \addtoindexx{union type entry}
761 \addtoindexx{class type entry}
763 \livetarg{chap:DWTAGstructuretype}{DW\-\_TAG\-\_structure\-\_type},
764 \livetarg{chap:DWTAGuniontype}{DW\-\_TAG\-\_union\-\_type},
765 and \livetarg{chap:DWTAGclasstype}{DW\-\_TAG\-\_class\-\_type},
766 respectively. If a name has been given to the structure,
767 union, or class in the source program, then the corresponding
768 structure type, union type, or class type entry has a
769 \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
770 \addtoindexx{name attribute}
771 whose value is a null\dash terminated string
772 containing the type name as it appears in the source program.
774 The members of a structure, union, or class are represented
775 by debugging information entries that are owned by the
776 corresponding structure type, union type, or class type entry
777 and appear in the same order as the corresponding declarations
778 in the source program.
780 A structure type, union type or class type entry may have
781 either a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} or a
782 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attribute
783 \hypertarget{chap:DWATbitsizedatamemberbitsize}
784 (see Section \refersec{chap:byteandbitsizes}),
785 whose value is the amount of storage needed
786 to hold an instance of the structure, union or class type,
787 including any padding.
789 An incomplete structure, union or class type
790 \addtoindexx{incomplete structure/union/class}
792 \addtoindexx{incomplete type}
793 represented by a structure, union or class
794 entry that does not have a byte size attribute and that has
795 \addtoindexx{declaration attribute}
796 a \livelink{chap:DWATdeclaration}{DW\-\_AT\-\_declaration} attribute.
798 If the complete declaration of a type has been placed in
799 \hypertarget{chap:DWATsignaturetypesignature}
800 a separate \addtoindex{type unit}
801 (see Section \refersec{chap:separatetypeunitentries}),
802 an incomplete declaration
803 \addtoindexx{incomplete type}
804 of that type in the compilation unit may provide
805 the unique 64\dash bit signature of the type using
806 \addtoindexx{type signature}
807 a \livelink{chap:DWATsignature}{DW\-\_AT\-\_signature}
810 If a structure, union or class entry represents the definition
811 of a structure, class or union member corresponding to a prior
812 incomplete structure, class or union, the entry may have a
813 \livelink{chap:DWATspecification}{DW\-\_AT\-\_specification} attribute
814 \addtoindexx{specification attribute}
815 whose value is a reference to
816 the debugging information entry representing that incomplete
819 Structure, union and class entries containing the
820 \livelink{chap:DWATspecification}{DW\-\_AT\-\_specification} attribute
821 \addtoindexx{specification attribute}
822 do not need to duplicate
823 information provided by the declaration entry referenced by the
824 specification attribute. In particular, such entries do not
825 need to contain an attribute for the name of the structure,
826 class or union they represent if such information is already
827 provided in the declaration.
829 \textit{For \addtoindex{C} and \addtoindex{C++},
831 \addtoindexx{data member|see {member entry (data)}}
832 member declarations occurring within
833 the declaration of a structure, union or class type are
834 considered to be “definitions” of those members, with
835 the exception of “static” data members, whose definitions
836 appear outside of the declaration of the enclosing structure,
837 union or class type. Function member declarations appearing
838 within a structure, union or class type declaration are
839 definitions only if the body of the function also appears
840 within the type declaration.}
842 If the definition for a given member of the structure, union
843 or class does not appear within the body of the declaration,
844 that member also has a debugging information entry describing
845 its definition. That latter entry has a
846 \livelink{chap:DWATspecification}{DW\-\_AT\-\_specification} attribute
847 \addtoindexx{specification attribute}
848 referencing the debugging information entry
849 owned by the body of the structure, union or class entry and
850 representing a non\dash defining declaration of the data, function
851 or type member. The referenced entry will not have information
852 about the location of that member (low and high pc attributes
853 for function members, location descriptions for data members)
854 and will have a \livelink{chap:DWATdeclaration}{DW\-\_AT\-\_declaration} attribute.
856 \textit{Consider a nested class whose
857 definition occurs outside of the containing class definition, as in:}
866 \textit{The two different structs can be described in
867 different compilation units to
868 facilitate DWARF space compression
869 (see Appendix \refersec{app:usingcompilationunits}).}
871 \subsection{Interface Type Entries}
872 \label{chap:interfacetypeentries}
874 \textit{The \addtoindex{Java} language defines ``interface'' types.
876 \addtoindex{interface type entry}
877 in \addtoindex{Java} is similar to a \addtoindex{C++} or
878 \addtoindex{Java} class with only abstract
879 methods and constant data members.}
882 \addtoindexx{interface type entry}
883 are represented by debugging information
885 tag \livetarg{chap:DWTAGinterfacetype}{DW\-\_TAG\-\_interface\-\_type}.
887 An interface type entry has
888 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
889 \addtoindexx{name attribute}
891 value is a null\dash terminated string containing the type name
892 as it appears in the source program.
894 The members of an interface are represented by debugging
895 information entries that are owned by the interface type
896 entry and that appear in the same order as the corresponding
897 declarations in the source program.
899 \subsection{Derived or Extended Structs, Classes and Interfaces}
900 \label{chap:derivedorextendedstructsclasesandinterfaces}
902 \textit{In \addtoindex{C++}, a class (or struct)
904 \addtoindexx{derived type (C++)|see{inheritance entry}}
905 be ``derived from'' or be a
906 ``subclass of'' another class.
907 In \addtoindex{Java}, an interface may ``extend''
908 \addtoindexx{extended type (Java)|see{inheritance entry}}
910 \addtoindexx{implementing type (Java)|see{inheritance entry}}
911 or more other interfaces, and a class may ``extend'' another
912 class and/or ``implement'' one or more interfaces. All of these
913 relationships may be described using the following. Note that
914 in \addtoindex{Java},
915 the distinction between extends and implements is
916 implied by the entities at the two ends of the relationship.}
918 A class type or interface type entry that describes a
919 derived, extended or implementing class or interface owns
920 \addtoindexx{implementing type (Java)|see{inheritance entry}}
921 debugging information entries describing each of the classes
922 or interfaces it is derived from, extending or implementing,
923 respectively, ordered as they were in the source program. Each
925 \addtoindexx{inheritance entry}
927 tag \livetarg{chap:DWTAGinheritance}{DW\-\_TAG\-\_inheritance}.
930 \addtoindexx{type attribute}
932 \addtoindexx{inheritance entry}
934 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute whose value is
935 a reference to the debugging information entry describing the
936 class or interface from which the parent class or structure
937 of the inheritance entry is derived, extended or implementing.
940 \addtoindexx{inheritance entry}
941 for a class that derives from or extends
942 \hypertarget{chap:DWATdatamemberlocationinheritedmemberlocation}
943 another class or struct also has
944 \addtoindexx{data member location attribute}
946 \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location}
947 attribute, whose value describes the location of the beginning
948 of the inherited type relative to the beginning address of the
949 derived class. If that value is a constant, it is the offset
950 in bytes from the beginning of the class to the beginning of
951 the inherited type. Otherwise, the value must be a location
952 description. In this latter case, the beginning address of
953 the derived class is pushed on the expression stack before
954 the \addtoindex{location description}
955 is evaluated and the result of the
956 evaluation is the location of the inherited type.
958 \textit{The interpretation of the value of this attribute for
959 inherited types is the same as the interpretation for data
961 (see Section \refersec{chap:datamemberentries}). }
964 \addtoindexx{inheritance entry}
966 \hypertarget{chap:DWATaccessibilitycppinheritedmembers}
968 \addtoindexx{accessibility attribute}
970 \livelink{chap:DWATaccessibility}{DW\-\_AT\-\_accessibility}
972 If no accessibility attribute
973 is present, private access is assumed for an entry of a class
974 and public access is assumed for an entry of an interface,
978 \hypertarget{chap:DWATvirtualityvirtualityofbaseclass}
979 the class referenced by the
980 \addtoindexx{inheritance entry}
981 inheritance entry serves
982 as a \addtoindex{C++} virtual base class, the inheritance entry has a
983 \livelink{chap:DWATvirtuality}{DW\-\_AT\-\_virtuality} attribute.
985 \textit{For a \addtoindex{C++} virtual base, the
986 \addtoindex{data member location attribute}
987 will usually consist of a non-trivial
988 \addtoindex{location description}.}
990 \subsection{Access Declarations}
991 \label{chap:accessdeclarations}
993 \textit{In \addtoindex{C++}, a derived class may contain access declarations that
994 \addtoindex{access declaration entry}
995 change the accessibility of individual class members from the
996 overall accessibility specified by the inheritance declaration.
997 A single access declaration may refer to a set of overloaded
1000 If a derived class or structure contains access declarations,
1001 each such declaration may be represented by a debugging
1002 information entry with the tag
1003 \livetarg{chap:DWTAGaccessdeclaration}{DW\-\_TAG\-\_access\-\_declaration}.
1005 such entry is a child of the class or structure type entry.
1007 An access declaration entry has
1008 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
1009 \addtoindexx{name attribute}
1011 value is a null\dash terminated string representing the name used
1012 in the declaration in the source program, including any class
1013 or structure qualifiers.
1015 An access declaration entry
1016 \hypertarget{chap:DWATaccessibilitycppbaseclasses}
1019 \livelink{chap:DWATaccessibility}{DW\-\_AT\-\_accessibility}
1020 attribute describing the declared accessibility of the named
1024 \subsection{Friends}
1025 \label{chap:friends}
1028 \addtoindexx{friend entry}
1029 declared by a structure, union or class
1030 \hypertarget{chap:DWATfriendfriendrelationship}
1031 type may be represented by a debugging information entry
1032 that is a child of the structure, union or class type entry;
1033 the friend entry has the
1034 tag \livetarg{chap:DWTAGfriend}{DW\-\_TAG\-\_friend}.
1037 \addtoindexx{friend attribute}
1038 a \livelink{chap:DWATfriend}{DW\-\_AT\-\_friend} attribute, whose value is
1039 a reference to the debugging information entry describing
1040 the declaration of the friend.
1043 \subsection{Data Member Entries}
1044 \label{chap:datamemberentries}
1046 A data member (as opposed to a member function) is
1047 represented by a debugging information entry with the
1048 tag \livetarg{chap:DWTAGmember}{DW\-\_TAG\-\_member}.
1050 \addtoindexx{member entry (data)}
1051 member entry for a named member has
1052 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
1053 \addtoindexx{name attribute}
1054 whose value is a null\dash terminated
1055 string containing the member name as it appears in the source
1056 program. If the member entry describes an
1057 \addtoindex{anonymous union},
1059 name attribute is omitted or consists of a single zero byte.
1061 The data member entry has
1062 \addtoindexx{type attribute}
1064 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute to denote
1065 \addtoindexx{member entry (data)}
1066 the type of that member.
1068 A data member entry may
1069 \addtoindexx{accessibility attribute}
1071 \livelink{chap:DWATaccessibility}{DW\-\_AT\-\_accessibility}
1072 attribute. If no accessibility attribute is present, private
1073 access is assumed for an entry of a class and public access
1074 is assumed for an entry of a structure, union, or interface.
1077 \hypertarget{chap:DWATmutablemutablepropertyofmemberdata}
1079 \addtoindexx{member entry (data)}
1081 \addtoindexx{mutable attribute}
1082 have a \livelink{chap:DWATmutable}{DW\-\_AT\-\_mutable} attribute,
1083 which is a \livelink{chap:flag}{flag}.
1084 This attribute indicates whether the data
1085 member was declared with the mutable storage class specifier.
1087 The beginning of a data member
1088 \addtoindex{beginning of a data member}
1089 is described relative to
1090 \addtoindexx{beginning of an object}
1091 the beginning of the object in which it is immediately
1092 contained. In general, the beginning is characterized by
1093 both an address and a bit offset within the byte at that
1094 address. When the storage for an entity includes all of
1095 the bits in the beginning byte, the beginning bit offset is
1098 Bit offsets in DWARF use the bit numbering and direction
1099 conventions that are appropriate to the current language on
1103 \addtoindexx{member entry (data)}
1104 corresponding to a data member that is
1105 \hypertarget{chap:DWATdatabitoffsetdatamemberbitlocation}
1107 \hypertarget{chap:DWATdatamemberlocationdatamemberlocation}
1108 in a structure, union or class may have either
1109 \addtoindexx{data member location attribute}
1111 \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location} attribute or a
1112 \livelink{chap:DWATdatabitoffset}{DW\-\_AT\-\_data\-\_bit\-\_offset}
1113 attribute. If the beginning of the data member is the same as
1114 the beginning of the containing entity then neither attribute
1117 For a \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location} attribute
1118 \addtoindexx{data member location attribute}
1119 there are two cases:
1121 \begin{enumerate}[1.]
1123 \item If the value is an integer constant, it is the offset
1124 in bytes from the beginning of the containing entity. If
1125 the beginning of the containing entity has a non-zero bit
1126 offset then the beginning of the member entry has that same
1129 \item Otherwise, the value must be a \addtoindex{location description}.
1131 this case, the beginning of the containing entity must be byte
1132 aligned. The beginning address is pushed on the DWARF stack
1133 before the \addtoindex{location} description is evaluated; the result of
1134 the evaluation is the base address of the member entry.
1136 \textit{The push on the DWARF expression stack of the base address of
1137 the containing construct is equivalent to execution of the
1138 \livelink{chap:DWOPpushobjectaddress}{DW\-\_OP\-\_push\-\_object\-\_address} operation
1139 (see Section \refersec{chap:stackoperations});
1140 \livelink{chap:DWOPpushobjectaddress}{DW\-\_OP\-\_push\-\_object\-\_address} therefore
1141 is not needed at the
1142 beginning of a \addtoindex{location description} for a data member.
1144 result of the evaluation is a location--either an address or
1145 the name of a register, not an offset to the member.}
1147 \textit{A \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location}
1149 \addtoindexx{data member location attribute}
1150 that has the form of a
1151 \addtoindex{location description} is not valid for a data member contained
1152 in an entity that is not byte aligned because DWARF operations
1153 do not allow for manipulating or computing bit offsets.}
1157 For a \livelink{chap:DWATdatabitoffset}{DW\-\_AT\-\_data\-\_bit\-\_offset} attribute,
1158 the value is an integer constant
1159 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
1160 that specifies the number of bits
1161 from the beginning of the containing entity to the beginning
1162 of the data member. This value must be greater than or equal
1163 to zero, but is not limited to less than the number of bits
1166 If the size of a data member is not the same as the size
1167 of the type given for the data member, the data member has
1168 \addtoindexx{bit size attribute}
1169 either a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size}
1170 or a \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attribute whose
1171 integer constant value
1172 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
1174 of storage needed to hold the value of the data member.
1176 \textit{\addtoindex{C} and \addtoindex{C++}
1178 \addtoindex{bit fields}
1180 \addtoindexx{data bit offset}
1182 \addtoindexx{data bit size}
1184 \livelink{chap:DWATdatabitoffset}{DW\-\_AT\-\_data\-\_bit\-\_offset} and
1185 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attributes.}
1187 \textit{This Standard uses the following bit numbering and direction
1188 conventions in examples. These conventions are for illustrative
1189 purposes and other conventions may apply on particular
1194 \item \textit{For big\dash endian architectures, bit offsets are
1195 counted from high-order to low\dash order bits within a byte (or
1196 larger storage unit); in this case, the bit offset identifies
1197 the high\dash order bit of the object.}
1199 \item \textit{For little\dash endian architectures, bit offsets are
1200 counted from low\dash order to high\dash order bits within a byte (or
1201 larger storage unit); in this case, the bit offset identifies
1202 the low\dash order bit of the object.}
1206 \textit{In either case, the bit so identified is defined as the
1207 \addtoindexx{beginning of an object}
1208 beginning of the object.}
1210 \textit{For example, take one possible representation of the following
1211 \addtoindex{C} structure definition
1212 in both big\dash and little\dash endian byte orders:}
1223 \textit{The following diagrams show the structure layout
1224 and data bit offsets for example big\dash\ and little\dash endian
1225 architectures, respectively. Both diagrams show a structure
1226 that begins at address A and whose size is four bytes. Also,
1227 high order bits are to the left and low order bits are to
1230 \textit{Big\dash Endian Data Bit Offsets:}
1238 Addresses increase ->
1239 | A | A + 1 | A + 2 | A + 3 |
1241 Data bit offsets increase ->
1242 +---------------+---------------+---------------+---------------+
1243 |0 4|5 10|11 15|16 23|24 31|
1244 | j | k | m | n | <pad> |
1246 +---------------------------------------------------------------+
1249 \textit{Little\dash Endian Data Bit Offsets:}
1255 <- Addresses increase
1256 | A | A + 1 | A + 2 | A + 3 |
1258 <- Data bit offsets increase
1260 +---------------+---------------+---------------+---------------+
1261 |31 24|23 16|15 11|10 5|4 0|
1262 | <pad> | n | m | k | j |
1264 +---------------------------------------------------------------+
1268 \textit{Note that data member bit offsets in this example are the
1269 same for both big\dash\ and little\dash endian architectures even
1270 though the fields are allocated in different directions
1271 (high\dash order to low-order versus low\dash order to high\dash order);
1272 the bit naming conventions for memory and/or registers of
1273 the target architecture may or may not make this seem natural.}
1275 \textit{For a more extensive example showing nested and packed records
1277 Appendix \refersec{app:pascalexample}.}
1279 \textit{Attribute \livelink{chap:DWATdatabitoffset}{DW\-\_AT\-\_data\-\_bit\-\_offset}
1281 \addtoindex{DWARF Version 4}
1282 and is also used for base types
1284 \refersec{chap:basetypeentries}).
1286 \livetarg{chap:DWATbitoffsetdatamemberbitlocation}
1287 attributes \livelink{chap:DWATbitoffset}{DW\-\_AT\-\_bit\-\_offset} and
1288 \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} when used to
1289 identify the beginning of bit field data members as defined
1290 in DWARF V3 and earlier. The earlier attributes are defined
1291 in a manner suitable for bit field members on big-endian
1292 architectures but which is either awkward or incomplete for
1293 use on little-endian architectures.
1294 (\livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} also
1295 has other uses that are not affected by this change.)}
1297 \textit{The \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size},
1298 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} and
1299 \livelink{chap:DWATbitoffset}{DW\-\_AT\-\_bit\-\_offset}
1300 attribute combination is deprecated for data members in DWARF
1301 Version 4, but implementations may continue to support this
1302 use for compatibility.}
1305 \addtoindex{DWARF Version 3}
1306 definitions of these attributes are
1309 \begin{myindentpara}{1cm}
1310 \textit{If the data member entry describes a bit field, then that
1311 entry has the following attributes:}
1314 \item \textit{A \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size}
1315 attribute whose value
1316 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
1317 is the number of bytes that contain an instance of the
1318 bit field and any padding bits.}
1320 \textit{The byte size attribute may be omitted if the size of the
1321 object containing the bit field can be inferred from the type
1322 attribute of the data member containing the bit field.}
1324 \item \textit{A \livelink{chap:DWATbitoffset}{DW\-\_AT\-\_bit\-\_offset}
1326 \addtoindexx{bit offset attribute (V3)}
1328 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
1329 is the number of bits to the left of the leftmost
1330 (most significant) bit of the bit field value.}
1332 \item \textit{A \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size}
1334 \addtoindexx{bit size attribute (V3)}
1336 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
1337 is the number of bits occupied by the bit field value.}
1342 \addtoindex{location description} for a bit field calculates the address
1343 of an anonymous object containing the bit field. The address
1344 is relative to the structure, union, or class that most closely
1345 encloses the bit field declaration. The number of bytes in this
1346 anonymous object is the value of the byte size attribute of
1347 the bit field. The offset (in bits) from the most significant
1348 bit of the anonymous object to the most significant bit of
1349 the bit field is the value of the bit offset attribute.}
1353 \textit{Diagrams similar to the above that show the use of the
1354 \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size},
1355 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} and
1356 \livelink{chap:DWATbitoffset}{DW\-\_AT\-\_bit\-\_offset} attribute
1357 combination may be found in the
1358 \addtoindex{DWARF Version 3} Standard.}
1360 \textit{In comparing
1362 \addtoindexx{DWARF Version 3}
1364 \addtoindexx{DWARF Version 4}
1365 4, note that DWARF V4
1366 defines the following combinations of attributes:}
1369 \item \textit{either \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location}
1371 \livelink{chap:DWATdatabitoffset}{DW\-\_AT\-\_data\-\_bit\-\_offset}
1372 (to specify the beginning of the data member)}
1374 % FIXME: the indentation of the following line is suspect.
1375 \textit{optionally together with}
1377 \item \textit{either \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} or
1378 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} (to
1379 specify the size of the data member)}
1383 \textit{DWARF V3 defines the following combinations}
1386 \item \textit{\livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location}
1387 (to specify the beginning
1388 of the data member, except this specification is only partial
1389 in the case of a bit field) }
1391 % FIXME: the indentation of the following line is suspect.
1392 \textit{optionally together with}
1394 \item \textit{\livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size},
1395 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} and
1396 \livelink{chap:DWATbitoffset}{DW\-\_AT\-\_bit\-\_offset}
1397 (to further specify the beginning of a bit field data member
1398 as well as specify the size of the data member) }
1401 \subsection{Member Function Entries}
1402 \label{chap:memberfunctionentries}
1404 A member function is represented by a
1405 \addtoindexx{member function entry}
1406 debugging information entry
1408 \addtoindexx{subprogram entry!as member function}
1409 tag \livelink{chap:DWTAGsubprogram}{DW\-\_TAG\-\_subprogram}.
1410 The member function entry
1411 may contain the same attributes and follows the same rules
1412 as non\dash member global subroutine entries
1413 (see Section \refersec{chap:subroutineandentrypointentries}).
1416 \addtoindexx{accessibility attribute}
1417 member function entry may have a
1418 \livelink{chap:DWATaccessibility}{DW\-\_AT\-\_accessibility}
1419 attribute. If no accessibility attribute is present, private
1420 access is assumed for an entry of a class and public access
1421 is assumed for an entry of a structure, union or interface.
1424 \hypertarget{chap:DWATvirtualityvirtualityoffunction}
1425 the member function entry describes a virtual function,
1426 then that entry has a
1427 \livelink{chap:DWATvirtuality}{DW\-\_AT\-\_virtuality} attribute.
1430 \hypertarget{chap:DWATexplicitexplicitpropertyofmemberfunction}
1431 the member function entry describes an explicit member
1432 function, then that entry has
1433 \addtoindexx{explicit attribute}
1435 \livelink{chap:DWATexplicit}{DW\-\_AT\-\_explicit} attribute.
1438 \hypertarget{chap:DWATvtableelemlocationvirtualfunctiontablevtableslot}
1439 entry for a virtual function also has a
1440 \livelink{chap:DWATvtableelemlocation}{DW\-\_AT\-\_vtable\-\_elem\-\_location}
1441 \addtoindexi{attribute}{vtable element location attribute} whose value contains
1442 a \addtoindex{location description}
1443 yielding the address of the slot
1444 for the function within the virtual function table for the
1445 enclosing class. The address of an object of the enclosing
1446 type is pushed onto the expression stack before the location
1447 description is evaluated.
1450 \hypertarget{chap:DWATobjectpointerobjectthisselfpointerofmemberfunction}
1451 the member function entry describes a non\dash static member
1452 \addtoindexx{this pointer attribute|see{object pointer attribute}}
1453 function, then that entry
1454 \addtoindexx{self pointer attribute|see{object pointer attribute}}
1456 \addtoindexx{object pointer attribute}
1457 a \livelink{chap:DWATobjectpointer}{DW\-\_AT\-\_object\-\_pointer}
1459 whose value is a reference to the formal parameter entry
1460 that corresponds to the object for which the function is
1461 called. The name attribute of that formal parameter is defined
1462 by the current language (for example,
1463 this for \addtoindex{C++} or self
1464 for \addtoindex{Objective C}
1465 and some other languages). That parameter
1466 also has a \livelink{chap:DWATartificial}{DW\-\_AT\-\_artificial} attribute whose value is true.
1468 Conversely, if the member function entry describes a static
1469 member function, the entry does not have
1470 \addtoindexx{object pointer attribute}
1472 \livelink{chap:DWATobjectpointer}{DW\-\_AT\-\_object\-\_pointer}
1475 If the member function entry describes a non\dash static member
1476 function that has a const\dash volatile qualification, then
1477 the entry describes a non\dash static member function whose
1478 object formal parameter has a type that has an equivalent
1479 const\dash volatile qualification.
1481 If a subroutine entry represents the defining declaration
1482 of a member function and that definition appears outside of
1483 the body of the enclosing class declaration, the subroutine
1485 \livelink{chap:DWATspecification}{DW\-\_AT\-\_specification} attribute,
1486 \addtoindexx{specification attribute}
1488 a reference to the debugging information entry representing
1489 the declaration of this function member. The referenced entry
1490 will be a child of some class (or structure) type entry.
1492 Subroutine entries containing the
1493 \livelink{chap:DWATspecification}{DW\-\_AT\-\_specification} attribute
1494 \addtoindexx{specification attribute}
1495 do not need to duplicate information provided
1496 by the declaration entry referenced by the specification
1497 attribute. In particular, such entries do not need to contain
1498 attributes for the name or return type of the function member
1499 whose definition they represent.
1501 \subsection{Class Template Instantiations}
1502 \label{chap:classtemplateinstantiations}
1504 \textit{In \addtoindex{C++} a class template is a generic definition of a class
1505 type that may be instantiated when an instance of the class
1506 is declared or defined. The generic description of the
1507 class may include both parameterized types and parameterized
1508 constant values. DWARF does not represent the generic template
1509 definition, but does represent each instantiation.}
1511 A class template instantiation is represented by a
1512 debugging information entry with the tag \livelink{chap:DWTAGclasstype}{DW\-\_TAG\-\_class\-\_type},
1513 \livelink{chap:DWTAGstructuretype}{DW\-\_TAG\-\_structure\-\_type} or
1514 \livelink{chap:DWTAGuniontype}{DW\-\_TAG\-\_union\-\_type}. With five
1515 exceptions, such an entry will contain the same attributes
1516 and have the same types of child entries as would an entry
1517 for a class type defined explicitly using the instantiation
1518 types and values. The exceptions are:
1520 \begin{enumerate}[1.]
1521 \item Each formal parameterized type declaration appearing in the
1522 template definition is represented by a debugging information
1524 \livelink{chap:DWTAGtemplatetypeparameter}{DW\-\_TAG\-\_template\-\_type\-\_parameter}. Each
1525 such entry may have a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
1526 \addtoindexx{name attribute}
1528 a null\dash terminated string containing the name of the formal
1529 type parameter as it appears in the source program. The
1530 template type parameter entry also has
1531 \addtoindexx{type attribute}
1533 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute
1534 describing the actual type by which the formal is replaced
1535 for this instantiation.
1537 \item Each formal parameterized value declaration appearing in the
1538 template definition is represented by a
1539 debugging information entry with the
1540 \addtoindexx{template value parameter entry}
1541 tag \livetarg{chap:DWTAGtemplatevalueparameter}{DW\-\_TAG\-\_template\-\_value\-\_parameter}.
1543 such entry may have a
1544 \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
1545 \addtoindexx{name attribute}
1547 a null\dash terminated string containing the name of the formal
1548 value parameter as it appears in the source program.
1550 \hypertarget{chap:DWATconstvaluetemplatevalueparameter}
1551 template value parameter entry
1552 \addtoindexx{template value parameter entry}
1554 \addtoindexx{type attribute}
1556 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute
1557 describing the type of the parameterized value. Finally,
1558 the template value parameter entry has a
1559 \livelink{chap:DWATconstvalue}{DW\-\_AT\-\_const\-\_value}
1560 attribute, whose value is the actual constant value of the
1561 value parameter for this instantiation as represented on the
1562 target architecture.
1564 \item The class type entry and each of its child entries references
1565 a \addtoindex{template type parameter entry} in any circumstance where the
1566 source template definition references a formal parameterized
1568 Similarly, the class type entry and each of its child
1569 entries references a template value parameter entry in any
1570 circumstance where the source template definition references
1571 a formal parameterized value.
1573 \item If the compiler has generated a special compilation unit to
1575 \addtoindexx{template instantiation!and special compilation unit}
1576 template instantiation and that special compilation
1577 unit has a different name from the compilation unit containing
1578 the template definition, the name attribute for the debugging
1579 information entry representing the special compilation unit
1580 should be empty or omitted.
1582 \item If the class type entry representing the template
1583 instantiation or any of its child entries contains declaration
1584 coordinate attributes, those attributes should refer to
1585 the source for the template definition, not to any source
1586 generated artificially by the compiler.
1590 \subsection{Variant Entries}
1591 \label{chap:variantentries}
1593 A variant part of a structure is represented by a debugging
1594 information entry\addtoindexx{variant part entry} with the
1595 tag \livetarg{chap:DWTAGvariantpart}{DW\-\_TAG\-\_variant\-\_part} and is
1596 owned by the corresponding structure type entry.
1598 If the variant part has a discriminant, the discriminant is
1599 \hypertarget{chap:DWATdiscrdiscriminantofvariantpart}
1601 \addtoindexx{discriminant (entry)}
1602 separate debugging information entry which
1603 is a child of the variant part entry. This entry has the form
1605 \addtoindexx{member entry (data)!as discriminant}
1606 structure data member entry. The variant part entry will
1607 \addtoindexx{discriminant attribute}
1609 \livelink{chap:DWATdiscr}{DW\-\_AT\-\_discr} attribute
1610 whose value is a reference to
1611 the member entry for the discriminant.
1613 If the variant part does not have a discriminant (tag field),
1614 the variant part entry has
1615 \addtoindexx{type attribute}
1617 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute to represent
1620 Each variant of a particular variant part is represented by
1621 \hypertarget{chap:DWATdiscrvaluediscriminantvalue}
1622 a debugging information entry\addtoindexx{variant entry} with the
1623 tag \livetarg{chap:DWTAGvariant}{DW\-\_TAG\-\_variant}
1624 and is a child of the variant part entry. The value that
1625 selects a given variant may be represented in one of three
1626 ways. The variant entry may have a
1627 \livelink{chap:DWATdiscrvalue}{DW\-\_AT\-\_discr\-\_value} attribute
1628 whose value represents a single case label. The value of this
1629 attribute is encoded as an LEB128 number. The number is signed
1630 if the tag type for the variant part containing this variant
1631 is a signed type. The number is unsigned if the tag type is
1635 \hypertarget{chap:DWATdiscrlistlistofdiscriminantvalues}
1636 the variant entry may contain
1637 \addtoindexx{discriminant list attribute}
1639 \livelink{chap:DWATdiscrlist}{DW\-\_AT\-\_discr\-\_list}
1640 attribute, whose value represents a list of discriminant
1641 values. This list is represented by any of the
1642 \livelink{chap:block}{block} forms and
1643 may contain a mixture of case labels and label ranges. Each
1644 item on the list is prefixed with a discriminant value
1645 descriptor that determines whether the list item represents
1646 a single label or a label range. A single case label is
1647 represented as an LEB128 number as defined above for
1648 \addtoindexx{discriminant value attribute}
1650 \livelink{chap:DWATdiscrvalue}{DW\-\_AT\-\_discr\-\_value}
1651 attribute. A label range is represented by
1652 two LEB128 numbers, the low value of the range followed by the
1653 high value. Both values follow the rules for signedness just
1654 described. The discriminant value descriptor is an integer
1655 constant that may have one of the values given in
1656 Figure \refersec{fig:discriminantdescriptorvalues}.
1658 \begin{figure}[here]
1659 \autorows[0pt]{c}{1}{l}{
1660 \addtoindex{DW\-\_DSC\-\_label},
1661 \addtoindex{DW\-\_DSC\-\_range}
1663 \caption{Discriminant descriptor values}\label{fig:discriminantdescriptorvalues}
1666 If a variant entry has neither a \livelink{chap:DWATdiscrvalue}{DW\-\_AT\-\_discr\-\_value}
1667 attribute nor a \livelink{chap:DWATdiscrlist}{DW\-\_AT\-\_discr\-\_list} attribute, or if it has
1668 a \livelink{chap:DWATdiscrlist}{DW\-\_AT\-\_discr\-\_list} attribute with 0 size, the variant is a
1671 The components selected by a particular variant are represented
1672 by debugging information entries owned by the corresponding
1673 variant entry and appear in the same order as the corresponding
1674 declarations in the source program.
1676 \section{Condition Entries}
1677 \label{chap:conditionentries}
1679 \textit{COBOL has the notion of
1680 \addtoindexx{level-88 condition, COBOL}
1681 a ``level\dash 88 condition'' that
1682 associates a data item, called the conditional variable, with
1683 a set of one or more constant values and/or value ranges.
1684 Semantically, the condition is ‛true’ if the conditional
1685 variable's value matches any of the described constants,
1686 and the condition is ‛false’ otherwise.}
1688 The \livetarg{chap:DWTAGcondition}{DW\-\_TAG\-\_condition}
1689 debugging information entry\addtoindexx{condition entry}
1691 logical condition that tests whether a given data item’s
1692 value matches one of a set of constant values. If a name
1693 has been given to the condition, the condition entry has a
1694 \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
1695 \addtoindexx{name attribute}
1696 whose value is a null\dash terminated string
1697 giving the condition name as it appears in the source program.
1699 The condition entry's parent entry describes the conditional
1700 variable; normally this will be a \livelink{chap:DWTAGvariable}{DW\-\_TAG\-\_variable},
1701 \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member} or
1702 \livelink{chap:DWTAGformalparameter}{DW\-\_TAG\-\_formal\-\_parameter} entry.
1704 \addtoindexx{formal parameter entry}
1706 entry has an array type, the condition can test any individual
1707 element, but not the array as a whole. The condition entry
1708 implicitly specifies a “comparison type” that is the
1709 type of an array element if the parent has an array type;
1710 otherwise it is the type of the parent entry.
1712 The condition entry owns \livelink{chap:DWTAGconstant}{DW\-\_TAG\-\_constant} and/or
1713 \livelink{chap:DWTAGsubrangetype}{DW\-\_TAG\-\_subrange\-\_type} entries that describe the constant
1714 values associated with the condition. If any child entry
1715 \addtoindexx{type attribute}
1717 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute,
1718 that attribute should describe a type
1719 compatible with the comparison type (according to the source
1720 language); otherwise the child’s type is the same as the
1723 \textit{For conditional variables with alphanumeric types, COBOL
1724 permits a source program to provide ranges of alphanumeric
1725 constants in the condition. Normally a subrange type entry
1726 does not describe ranges of strings; however, this can be
1727 represented using bounds attributes that are references to
1728 constant entries describing strings. A subrange type entry may
1729 refer to constant entries that are siblings of the subrange
1733 \section{Enumeration Type Entries}
1734 \label{chap:enumerationtypeentries}
1736 \textit{An “enumeration type” is a scalar that can assume one of
1737 a fixed number of symbolic values.}
1739 An enumeration type is represented by a debugging information
1741 \livetarg{chap:DWTAGenumerationtype}{DW\-\_TAG\-\_enumeration\-\_type}.
1743 If a name has been given to the enumeration type in the source
1744 program, then the corresponding enumeration type entry has
1745 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
1746 \addtoindexx{name attribute}
1747 whose value is a null\dash terminated
1748 string containing the enumeration type name as it appears
1749 in the source program. This entry also has a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size}
1750 attribute whose integer constant value is the number of bytes
1751 required to hold an instance of the enumeration.
1753 The \addtoindex{enumeration type entry}
1755 \addtoindexx{type attribute}
1756 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute
1757 which refers to the underlying data type used to implement
1760 If an enumeration type has type safe
1761 \addtoindexx{type safe enumeration types}
1764 \begin{enumerate}[1.]
1765 \item Enumerators are contained in the scope of the enumeration type, and/or
1767 \item Enumerators are not implicitly converted to another type
1770 then the \addtoindex{enumeration type entry} may
1771 \addtoindexx{enum class|see{type-safe enumeration}}
1772 have a \livelink{chap:DWATenumclass}{DW\-\_AT\-\_enum\-\_class}
1773 attribute, which is a \livelink{chap:flag}{flag}.
1774 In a language that offers only
1775 one kind of enumeration declaration, this attribute is not
1778 \textit{In \addtoindex{C} or \addtoindex{C++},
1779 the underlying type will be the appropriate
1780 integral type determined by the compiler from the properties of
1781 \hypertarget{chap:DWATenumclasstypesafeenumerationdefinition}
1782 the enumeration literal values.
1783 A \addtoindex{C++} type declaration written
1784 using enum class declares a strongly typed enumeration and
1785 is represented using \livelink{chap:DWTAGenumerationtype}{DW\-\_TAG\-\_enumeration\-\_type}
1786 in combination with \livelink{chap:DWATenumclass}{DW\-\_AT\-\_enum\-\_class}.}
1788 Each enumeration literal is represented by a debugging
1789 \addtoindexx{enumeration literal|see{enumeration entry}}
1790 information entry with the
1791 tag \livetarg{chap:DWTAGenumerator}{DW\-\_TAG\-\_enumerator}.
1793 such entry is a child of the
1794 \addtoindex{enumeration type entry}, and the
1795 enumerator entries appear in the same order as the declarations
1796 of the enumeration literals in the source program.
1798 Each \addtoindex{enumerator entry} has a
1799 \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute, whose
1800 \addtoindexx{name attribute}
1801 value is a null\dash terminated string containing the name of the
1802 \hypertarget{chap:DWATconstvalueenumerationliteralvalue}
1803 enumeration literal as it appears in the source program.
1804 Each enumerator entry also has a
1805 \livelink{chap:DWATconstvalue}{DW\-\_AT\-\_const\-\_value} attribute,
1806 whose value is the actual numeric value of the enumerator as
1807 represented on the target system.
1810 If the enumeration type occurs as the description of a
1811 \addtoindexx{enumeration type endry!as array dimension}
1812 dimension of an array type, and the stride for that dimension
1813 \hypertarget{chap:DWATbytestrideenumerationstridedimensionofarraytype}
1814 is different than what would otherwise be determined, then
1815 \hypertarget{chap:DWATbitstrideenumerationstridedimensionofarraytype}
1816 the enumeration type entry has either a
1817 \livelink{chap:DWATbytestride}{DW\-\_AT\-\_byte\-\_stride}
1818 or \livelink{chap:DWATbitstride}{DW\-\_AT\-\_bit\-\_stride} attribute
1819 \addtoindexx{bit stride attribute}
1820 which specifies the separation
1821 between successive elements along the dimension as described
1823 Section \refersec{chap:visibilityofdeclarations}.
1825 \livelink{chap:DWATbitstride}{DW\-\_AT\-\_bit\-\_stride} attribute
1826 \addtoindexx{bit stride attribute}
1827 is interpreted as bits and the value of
1828 \addtoindexx{byte stride attribute}
1830 \livelink{chap:DWATbytestride}{DW\-\_AT\-\_byte\-\_stride}
1831 attribute is interpreted as bytes.
1834 \section{Subroutine Type Entries}
1835 \label{chap:subroutinetypeentries}
1837 \textit{It is possible in \addtoindex{C}
1838 to declare pointers to subroutines
1839 that return a value of a specific type. In both
1840 \addtoindex{C} and \addtoindex{C++},
1841 it is possible to declare pointers to subroutines that not
1842 only return a value of a specific type, but accept only
1843 arguments of specific types. The type of such pointers would
1844 be described with a ``pointer to'' modifier applied to a
1845 user\dash defined type.}
1847 A subroutine type is represented by a debugging information
1849 \addtoindexx{subroutine type entry}
1850 tag \livetarg{chap:DWTAGsubroutinetype}{DW\-\_TAG\-\_subroutine\-\_type}.
1852 been given to the subroutine type in the source program,
1853 then the corresponding subroutine type entry has
1854 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
1855 \addtoindexx{name attribute}
1856 whose value is a null\dash terminated string containing
1857 the subroutine type name as it appears in the source program.
1859 If the subroutine type describes a function that returns
1860 a value, then the subroutine type entry has
1861 \addtoindexx{type attribute}
1862 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type}
1863 attribute to denote the type returned by the subroutine. If
1864 the types of the arguments are necessary to describe the
1865 subroutine type, then the corresponding subroutine type
1866 entry owns debugging information entries that describe the
1867 arguments. These debugging information entries appear in the
1868 order that the corresponding argument types appear in the
1871 \textit{In \addtoindex{C} there
1872 is a difference between the types of functions
1873 declared using function prototype style declarations and
1874 those declared using non\dash prototype declarations.}
1877 \hypertarget{chap:DWATprototypedsubroutineprototype}
1878 subroutine entry declared with a function prototype style
1879 declaration may have
1880 \addtoindexx{prototyped attribute}
1882 \livelink{chap:DWATprototyped}{DW\-\_AT\-\_prototyped} attribute, which is
1883 a \livelink{chap:flag}{flag}.
1885 Each debugging information entry owned by a subroutine
1886 type entry has a tag whose value has one of two possible
1889 \begin{enumerate}[1.]
1890 \item The formal parameters of a parameter list (that have a
1891 specific type) are represented by a debugging information entry
1892 with the tag \livelink{chap:DWTAGformalparameter}{DW\-\_TAG\-\_formal\-\_parameter}.
1893 Each formal parameter
1895 \addtoindexx{type attribute}
1896 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute that refers to the type of
1897 the formal parameter.
1899 \item The unspecified parameters of a variable parameter list
1900 \addtoindexx{unspecified parameters entry}
1902 \addtoindexx{... parameters|see{unspecified parameters entry}}
1903 represented by a debugging information entry with the
1904 tag \livelink{chap:DWTAGunspecifiedparameters}{DW\-\_TAG\-\_unspecified\-\_parameters}.
1909 \section{String Type Entries}
1910 \label{chap:stringtypeentries}
1912 \textit{A ``string'' is a sequence of characters that have specific
1913 \addtoindexx{string type entry}
1914 semantics and operations that separate them from arrays of
1916 \addtoindex{Fortran} is one of the languages that has a string
1917 type. Note that ``string'' in this context refers to a target
1918 machine concept, not the class string as used in this document
1919 (except for the name attribute).}
1921 A string type is represented by a debugging information entry
1922 with the tag \livetarg{chap:DWTAGstringtype}{DW\-\_TAG\-\_string\-\_type}.
1923 If a name has been given to
1924 the string type in the source program, then the corresponding
1925 string type entry has a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
1926 \addtoindexx{name attribute}
1928 a null\dash terminated string containing the string type name as
1929 it appears in the source program.
1932 \hypertarget{chap:DWATstringlengthstringlengthofstringtype}
1933 string type entry may have a
1934 \livelink{chap:DWATstringlength}{DW\-\_AT\-\_string\-\_length} attribute
1936 \addtoindexx{string length attribute}
1938 \addtoindex{location description} yielding the location
1939 where the length of the string is stored in the program. The
1940 string type entry may also have a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} attribute
1941 or \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attribute, whose value
1942 (see Section \refersec{chap:byteandbitsizes})
1943 is the size of the data to be retrieved from the location
1944 referenced by the string length attribute. If no (byte or bit)
1945 size attribute is present, the size of the data to be retrieved
1947 \addtoindex{size of an address} on the target machine.
1949 If no string length attribute is present, the string type
1950 entry may have a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} attribute or
1951 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size}
1952 attribute, whose value
1953 (see Section \refersec{chap:byteandbitsizes})
1955 storage needed to hold a value of the string type.
1958 \section{Set Type Entries}
1959 \label{chap:settypeentries}
1961 \textit{\addtoindex{Pascal} provides the concept of a “set,” which represents
1962 a group of values of ordinal type.}
1964 A set is represented by a debugging information entry with
1965 the tag \livetarg{chap:DWTAGsettype}{DW\-\_TAG\-\_set\-\_type}.
1966 \addtoindexx{set type entry}
1967 If a name has been given to the
1968 set type, then the set type entry has
1969 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
1970 \addtoindexx{name attribute}
1971 whose value is a null\dash terminated string containing the
1972 set type name as it appears in the source program.
1974 The set type entry has
1975 \addtoindexx{type attribute}
1976 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute to denote the
1977 type of an element of the set.
1979 If the amount of storage allocated to hold each element of an
1980 object of the given set type is different from the amount of
1981 storage that is normally allocated to hold an individual object
1982 of the indicated element type, then the set type entry has
1983 either a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} attribute, or
1984 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attribute
1985 whose value (see Section \refersec{chap:byteandbitsizes}) is
1986 the amount of storage needed to hold a value of the set type.
1989 \section{Subrange Type Entries}
1990 \label{chap:subrangetypeentries}
1992 \textit{Several languages support the concept of a ``subrange''
1993 type object. These objects can represent a subset of the
1994 values that an object of the basis type for the subrange can
1996 Subrange type entries may also be used to represent
1997 the bounds of array dimensions.}
1999 A subrange type is represented by a debugging information
2001 \addtoindexx{subrange type entry}
2002 tag \livetarg{chap:DWTAGsubrangetype}{DW\-\_TAG\-\_subrange\-\_type}.
2004 given to the subrange type, then the subrange type entry
2005 has a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
2006 \addtoindexx{name attribute}
2007 whose value is a null\dash terminated
2008 string containing the subrange type name as it appears in
2011 The subrange entry may have
2012 \addtoindexx{type attribute}
2013 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute to describe
2014 the type of object, called the basis type, of whose values
2015 this subrange is a subset.
2017 If the amount of storage allocated to hold each element of an
2018 object of the given subrange type is different from the amount
2019 of storage that is normally allocated to hold an individual
2020 object of the indicated element type, then the subrange
2022 \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} attribute or
2023 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size}
2024 attribute, whose value
2025 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
2027 storage needed to hold a value of the subrange type.
2030 \hypertarget{chap:DWATthreadsscaledupcarrayboundthreadsscalfactor}
2031 subrange entry may have
2032 \addtoindexx{threads scaled attribute}
2034 \livelink{chap:DWATthreadsscaled}{DW\-\_AT\-\_threads\-\_scaled} attribute,
2035 which is a \livelink{chap:flag}{flag}.
2036 If present, this attribute indicates whether
2037 this subrange represents a \addtoindex{UPC} array bound which is scaled
2038 by the runtime THREADS value (the number of UPC threads in
2039 this execution of the program).
2041 \textit{This allows the representation of a \addtoindex{UPC} shared array such as}
2044 int shared foo[34*THREADS][10][20];
2048 \hypertarget{chap:DWATlowerboundlowerboundofsubrange}
2050 \hypertarget{chap:DWATupperboundupperboundofsubrange}
2051 entry may have the attributes
2052 \livelink{chap:DWATlowerbound}{DW\-\_AT\-\_lower\-\_bound}
2053 \addtoindexx{lower bound attribute}
2054 and \livelink{chap:DWATupperbound}{DW\-\_AT\-\_upper\-\_bound}
2055 \addtoindexx{upper bound attribute} to specify, respectively, the lower
2056 and upper bound values of the subrange. The
2057 \livelink{chap:DWATupperbound}{DW\-\_AT\-\_upper\-\_bound}
2059 \hypertarget{chap:DWATcountelementsofsubrangetype}
2061 % FIXME: The following matches DWARF4: odd as there is no default count.
2062 \addtoindexx{count attribute!default}
2064 \addtoindexx{count attribute}
2066 \livelink{chap:DWATcount}{DW\-\_AT\-\_count} attribute,
2068 value describes the number of elements in the subrange rather
2069 than the value of the last element. The value of each of
2070 these attributes is determined as described in
2071 Section \refersec{chap:staticanddynamicvaluesofattributes}.
2073 If the lower bound value is missing, the value is assumed to
2074 be a language\dash dependent default constant.
2075 \addtoindexx{lower bound attribute!default}
2076 The default lower bound is 0 for
2077 \addtoindex{C}, \addtoindex{C++},
2080 \addtoindex{Objective C},
2081 \addtoindex{Objective C++},
2082 \addtoindex{Python}, and
2084 The default lower bound is 1 for
2085 \addtoindex{Ada}, \addtoindex{COBOL},
2086 \addtoindex{Fortran},
2087 \addtoindex{Modula-2},
2088 \addtoindex{Pascal} and
2091 \textit{No other default lower bound values are currently defined.}
2093 If the upper bound and count are missing, then the upper bound value is
2094 \textit{unknown}.\addtoindexx{upper bound attribute!default unknown}
2096 If the subrange entry has no type attribute describing the
2097 basis type, the basis type is assumed to be the same as
2098 the object described by the lower bound attribute (if it
2099 references an object). If there is no lower bound attribute,
2100 or that attribute does not reference an object, the basis type
2101 is the type of the upper bound or \addtoindex{count attribute}
2103 of them references an object). If there is no upper bound or
2104 count attribute, or neither references an object, the type is
2105 assumed to be the same type, in the source language of the
2106 compilation unit containing the subrange entry, as a signed
2107 integer with the same size as an address on the target machine.
2109 If the subrange type occurs as the description of a dimension
2110 of an array type, and the stride for that dimension is
2111 \hypertarget{chap:DWATbytestridesubrangestridedimensionofarraytype}
2112 different than what would otherwise be determined, then
2113 \hypertarget{chap:DWATbitstridesubrangestridedimensionofarraytype}
2114 the subrange type entry has either
2115 \addtoindexx{byte stride attribute}
2117 \livelink{chap:DWATbytestride}{DW\-\_AT\-\_byte\-\_stride} or
2118 \livelink{chap:DWATbitstride}{DW\-\_AT\-\_bit\-\_stride} attribute
2119 \addtoindexx{bit stride attribute}
2120 which specifies the separation
2121 between successive elements along the dimension as described
2123 Section \refersec{chap:byteandbitsizes}.
2125 \textit{Note that the stride can be negative.}
2127 \section{Pointer to Member Type Entries}
2128 \label{chap:pointertomembertypeentries}
2130 \textit{In \addtoindex{C++}, a
2131 pointer to a data or function member of a class or
2132 structure is a unique type.}
2134 A debugging information entry representing the type of an
2135 object that is a pointer to a structure or class member has
2136 the tag \livetarg{chap:DWTAGptrtomembertype}{DW\-\_TAG\-\_ptr\-\_to\-\_member\-\_type}.
2138 If the \addtoindex{pointer to member type} has a name, the
2139 \addtoindexx{pointer to member type entry}
2140 pointer to member entry has a
2141 \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
2142 \addtoindexx{name attribute}
2144 null\dash terminated string containing the type name as it appears
2145 in the source program.
2147 The \addtoindex{pointer to member} entry
2149 \addtoindexx{type attribute}
2150 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute to
2151 describe the type of the class or structure member to which
2152 objects of this type may point.
2154 The \addtoindex{pointer to member} entry also
2155 \hypertarget{chap:DWATcontainingtypecontainingtypeofpointertomembertype}
2157 \livelink{chap:DWATcontainingtype}{DW\-\_AT\-\_containing\-\_type}
2158 attribute, whose value is a reference to a debugging
2159 information entry for the class or structure to whose members
2160 objects of this type may point.
2163 \hypertarget{chap:DWATuselocationmemberlocationforpointertomembertype}
2165 \addtoindex{pointer to member entry}
2167 \livelink{chap:DWATuselocation}{DW\-\_AT\-\_use\-\_location} attribute
2168 \addtoindexx{use location attribute}
2170 \addtoindex{location description} that computes the
2171 address of the member of the class to which the pointer to
2172 member entry points.
2174 \textit{The method used to find the address of a given member of a
2175 class or structure is common to any instance of that class
2176 or structure and to any instance of the pointer or member
2177 type. The method is thus associated with the type entry,
2178 rather than with each instance of the type.}
2180 The \livelink{chap:DWATuselocation}{DW\-\_AT\-\_use\-\_location} description is used in conjunction
2181 with the location descriptions for a particular object of the
2182 given \addtoindex{pointer to member type} and for a particular structure or
2183 class instance. The \livelink{chap:DWATuselocation}{DW\-\_AT\-\_use\-\_location}
2184 attribute expects two values to be
2185 \addtoindexi{pushed}{address!implicit push for member operator}
2186 onto the DWARF expression stack before
2187 the \livelink{chap:DWATuselocation}{DW\-\_AT\-\_use\-\_location} description is evaluated.
2189 \addtoindexi{pushed}{address!implicit push for member operator}
2190 is the value of the \addtoindex{pointer to member} object
2191 itself. The second value
2192 \addtoindexi{pushed}{address!implicit push for member operator}
2193 is the base address of the
2194 entire structure or union instance containing the member
2195 whose address is being calculated.
2197 \textit{For an expression such as}
2202 % FIXME: object and mbr\_ptr should be distinguished from italic. See DW4.
2203 \textit{where mbr\_ptr has some \addtoindex{pointer to member type}, a debugger should:}
2205 \textit{1. Push the value of mbr\_ptr onto the DWARF expression stack.}
2207 \textit{2. Push the base address of object onto the DWARF expression stack.}
2209 \textit{3. Evaluate the \livelink{chap:DWATuselocation}{DW\-\_AT\-\_use\-\_location} description
2210 given in the type of mbr\_ptr.}
2212 \section{File Type Entries}
2213 \label{chap:filetypeentries}
2215 \textit{Some languages, such as \addtoindex{Pascal},
2216 provide a data type to represent
2219 A file type is represented by a debugging information entry
2221 \addtoindexx{file type entry}
2223 \livetarg{chap:DWTAGfiletype}{DW\-\_TAG\-\_file\-\_type}.
2224 If the file type has a name,
2225 the file type entry has a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
2226 \addtoindexx{name attribute}
2228 is a null\dash terminated string containing the type name as it
2229 appears in the source program.
2231 The file type entry has
2232 \addtoindexx{type attribute}
2233 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute describing
2234 the type of the objects contained in the file.
2236 The file type entry also
2237 \addtoindexx{byte size}
2239 \addtoindexx{bit size}
2241 \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} or
2242 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attribute, whose value
2243 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
2244 is the amount of storage need to hold a value of the file type.
2246 \section{Dynamic Type Properties}
2247 \label{chap:dynamictypeproperties}
2248 \subsection{Data Location}
2249 \label{chap:datalocation}
2251 \textit{Some languages may represent objects using descriptors to hold
2252 information, including a location and/or run\dash time parameters,
2253 about the data that represents the value for that object.}
2255 \hypertarget{chap:DWATdatalocationindirectiontoactualdata}
2256 The \livelink{chap:DWATdatalocation}{DW\-\_AT\-\_data\-\_location}
2257 attribute may be used with any
2258 \addtoindexx{data location attribute}
2259 type that provides one or more levels of
2260 \addtoindexx{hidden indirection|see{data location attribute}}
2262 and/or run\dash time parameters in its representation. Its value
2263 is a \addtoindex{location description}.
2264 The result of evaluating this
2265 description yields the location of the data for an object.
2266 When this attribute is omitted, the address of the data is
2267 the same as the address of the object.
2269 \textit{This location description will typically begin with
2270 \livelink{chap:DWOPpushobjectaddress}{DW\-\_OP\-\_push\-\_object\-\_address}
2271 which loads the address of the
2272 object which can then serve as a descriptor in subsequent
2273 calculation. For an example using
2274 \livelink{chap:DWATdatalocation}{DW\-\_AT\-\_data\-\_location}
2275 for a \addtoindex{Fortran 90 array}, see
2276 Appendix \refersec{app:fortran90example}.}
2278 \subsection{Allocation and Association Status}
2279 \label{chap:allocationandassociationstatus}
2281 \textit{Some languages, such as \addtoindex{Fortran 90},
2282 provide types whose values
2283 may be dynamically allocated or associated with a variable
2284 under explicit program control.}
2286 \hypertarget{chap:DWATallocatedallocationstatusoftypes}
2288 \livelink{chap:DWATallocated}{DW\-\_AT\-\_allocated}
2290 \addtoindexx{allocated attribute}
2291 may optionally be used with any
2292 type for which objects of the type can be explicitly allocated
2293 and deallocated. The presence of the attribute indicates that
2294 objects of the type are allocatable and deallocatable. The
2295 integer value of the attribute (see below) specifies whether
2296 an object of the type is
2297 currently allocated or not.
2299 \hypertarget{chap:DWATassociatedassociationstatusoftypes}
2301 \livelink{chap:DWATassociated}{DW\-\_AT\-\_associated} attribute
2303 \addtoindexx{associated attribute}
2304 optionally be used with
2305 any type for which objects of the type can be dynamically
2306 associated with other objects. The presence of the attribute
2307 indicates that objects of the type can be associated. The
2308 integer value of the attribute (see below) indicates whether
2309 an object of the type is currently associated or not.
2311 \textit{While these attributes are defined specifically with
2312 \addtoindex{Fortran 90} ALLOCATABLE and POINTER types
2313 in mind, usage is not limited
2314 to just that language.}
2316 The value of these attributes is determined as described in
2317 Section \refersec{chap:staticanddynamicvaluesofattributes}.
2319 A non\dash zero value is interpreted as allocated or associated,
2320 and zero is interpreted as not allocated or not associated.
2322 \textit{For \addtoindex{Fortran 90},
2323 if the \livelink{chap:DWATassociated}{DW\-\_AT\-\_associated}
2324 attribute is present,
2325 the type has the POINTER property where either the parent
2326 variable is never associated with a dynamic object or the
2327 implementation does not track whether the associated object
2328 is static or dynamic. If the \livelink{chap:DWATallocated}{DW\-\_AT\-\_allocated} attribute is
2329 present and the \livelink{chap:DWATassociated}{DW\-\_AT\-\_associated} attribute is not, the type
2330 has the ALLOCATABLE property. If both attributes are present,
2331 then the type should be assumed to have the POINTER property
2332 (and not ALLOCATABLE); the \livelink{chap:DWATallocated}{DW\-\_AT\-\_allocated} attribute may then
2333 be used to indicate that the association status of the object
2334 resulted from execution of an ALLOCATE statement rather than
2335 pointer assignment.}
2337 \textit{For examples using
2338 \livelink{chap:DWATallocated}{DW\-\_AT\-\_allocated} for \addtoindex{Ada} and
2339 \addtoindex{Fortran 90}
2341 see Appendix \refersec{app:aggregateexamples}.}
2345 \section{Template Alias Entries}
2346 \label{chap:templatealiasentries}
2348 A type named using a template alias is represented
2349 by a debugging information entry
2350 \addtoindexx{template alias entry}
2352 \livetarg{chap:DWTAGtemplatealias}{DW\-\_TAG\-\_template\-\_alias}.
2353 The template alias entry has a
2354 \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
2355 \addtoindexx{name attribute}
2356 whose value is a null\dash terminated string
2357 containing the name of the template alias as it appears in
2358 the source program. The template alias entry also contains
2359 \addtoindexx{type attribute}
2361 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute
2362 whose value is a reference to the type
2363 named by the template alias. The template alias entry has
2364 the following child entries:
2366 \begin{enumerate}[1.]
2367 \item Each formal parameterized type declaration appearing
2368 in the template alias declaration is represented
2369 by a debugging information entry with the tag
2370 \livelink{chap:DWTAGtemplatetypeparameter}{DW\-\_TAG\-\_template\-\_type\-\_parameter}.
2371 Each such entry may have
2372 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
2373 \addtoindexx{name attribute}
2374 whose value is a null\dash terminated
2375 string containing the name of the formal type parameter as it
2376 appears in the source program. The template type parameter
2378 \addtoindexx{type attribute}
2379 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute
2380 describing the actual
2381 type by which the formal is replaced for this instantiation.
2383 \item Each formal parameterized value declaration
2384 appearing in the template alias declaration is
2385 represented by a debugging information entry with the tag
2386 \livelink{chap:DWTAGtemplatevalueparameter}{DW\-\_TAG\-\_template\-\_value\-\_parameter}.
2387 Each such entry may have
2388 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
2389 \addtoindexx{name attribute}
2390 whose value is a null\dash terminated
2391 string containing the name of the formal value parameter
2392 as it appears in the source program. The template value
2393 parameter entry also has
2394 \addtoindexx{type attribute}
2395 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute describing
2396 the type of the parameterized value. Finally, the template
2397 value parameter entry has a \livelink{chap:DWATconstvalue}{DW\-\_AT\-\_const\-\_value}
2398 attribute, whose value is the actual constant value of the value parameter for
2399 this instantiation as represented on the target architecture.