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
156 4, note that DWARF V4
157 defines the following combinations of attributes:}
160 \item \textit{DW\-\_AT\-\_byte\-\_size}
161 \item \textit{DW\-\_AT\-\_bit\-\_size}
162 \item \textit{\livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size},
163 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size}
164 and optionally \livelink{chap:DWATdatabitoffset}{DW\-\_AT\-\_data\-\_bit\-\_offset}}
167 \addtoindexx{DWARF Version 3}
168 defines the following combinations:
169 % FIXME: the figure below interferes with the following
170 % bullet list, which looks horrible as a result.
172 \item \textit{DW\-\_AT\-\_byte\-\_size}
173 \item \textit{\livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size},
174 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} and
175 \livelink{chap:DWATbitoffset}{DW\-\_AT\-\_bit\-\_offset}}
178 \begin{figure}[!here]
180 \begin{tabular}{lp{9cm}}
181 Name&Meaning\\ \hline
182 \livetarg{chap:DWATEaddress}{DW\-\_ATE\-\_address} & linear machine address (for
183 segmented addresses see
184 Section \refersec{chap:segmentedaddresses}) \\
185 \livetarg{chap:DWATEboolean}{DW\-\_ATE\-\_boolean}& true or false \\
187 \livetarg{chap:DWATEcomplexfloat}{DW\-\_ATE\-\_complex\-\_float}& complex binary
188 floating\dash point number \\
189 \livetarg{chap:DWATEfloat}{DW\-\_ATE\-\_float} & binary floating\dash point number \\
190 \livetarg{chap:DWATEimaginaryfloat}{DW\-\_ATE\-\_imaginary\-\_float}& imaginary binary
191 floating\dash point number \\
192 \livetarg{chap:DWATEsigned}{DW\-\_ATE\-\_signed}& signed binary integer \\
193 \livetarg{chap:DWATEsignedchar}{DW\-\_ATE\-\_signed\-\_char}& signed character \\
194 \livetarg{chap:DWATEunsigned}{DW\-\_ATE\-\_unsigned} & unsigned binary integer \\
195 \livetarg{chap:DWATEunsignedchar}{DW\-\_ATE\-\_unsigned\-\_char} & unsigned character \\
196 \livetarg{chap:DWATEpackeddecimal}{DW\-\_ATE\-\_packed\-\_decimal} & packed decimal \\
197 \livetarg{chap:DWATEnumericstring}{DW\-\_ATE\-\_numeric\-\_string}& numeric string \\
198 \livetarg{chap:DWATEedited}{DW\-\_ATE\-\_edited} & edited string \\
199 \livetarg{chap:DWATEsignedfixed}{DW\-\_ATE\-\_signed\-\_fixed} & signed fixed\dash point scaled integer \\
200 \livetarg{chap:DWATEunsignedfixed}{DW\-\_ATE\-\_unsigned\-\_fixed}& unsigned fixed\dash point scaled integer \\
201 \livetarg{chap:DWATEdecimalfloat}{DW\-\_ATE\-\_decimal\-\_float} & decimal floating\dash point number \\
202 \livetarg{chap:DWATEUTF}{DW\-\_ATE\-\_UTF} & \addtoindex{Unicode} character \\
204 \caption{Encoding attribute values}
205 \label{fig:encodingattributevalues}
208 \textit{The \livelink{chap:DWATEdecimalfloat}{DW\-\_ATE\-\_decimal\-\_float} encoding is intended for
209 floating\dash point representations that have a power\dash of\dash ten
210 exponent, such as that specified in IEEE 754R.}
212 \textit{The \livelink{chap:DWATEUTF}{DW\-\_ATE\-\_UTF} encoding is intended for \addtoindex{Unicode}
213 string encodings (see the Universal Character Set standard,
214 ISO/IEC 10646\dash 1:1993). For example, the
215 \addtoindex{C++} type char16\_t is
216 represented by a base type entry with a name attribute whose
217 value is “char16\_t”, an encoding attribute whose value
218 is \livelink{chap:DWATEUTF}{DW\-\_ATE\-\_UTF} and a byte size attribute whose value is 2.}
221 \livelink{chap:DWATEpackeddecimal}{DW\-\_ATE\-\_packed\-\_decimal}
223 \livelink{chap:DWATEnumericstring}{DW\-\_ATE\-\_numeric\-\_string}
225 represent packed and unpacked decimal string numeric data
226 types, respectively, either of which may be
228 \addtoindexx{decimal scale attribute}
230 \addtoindexx{decimal sign attribute}
232 \addtoindexx{digit count attribute}
234 \hypertarget{chap:DWATdecimalsigndecimalsignrepresentation}
236 \hypertarget{chap:DWATdigitcountdigitcountforpackeddecimalornumericstringtype}
237 base types are used in combination with
238 \livelink{chap:DWATdecimalsign}{DW\-\_AT\-\_decimal\-\_sign},
239 \livelink{chap:DWATdigitcount}{DW\-\_AT\-\_digit\-\_count} and
240 \livelink{chap:DWATdecimalscale}{DW\-\_AT\-\_decimal\-\_scale}
243 A \livelink{chap:DWATdecimalsign}{DW\-\_AT\-\_decimal\-\_sign} attribute
244 \addtoindexx{decimal sign attribute}
245 is an integer constant that
246 conveys the representation of the sign of the decimal type
247 (see Figure \refersec{fig:decimalsignattributevalues}).
248 Its integer constant value is interpreted to
249 mean that the type has a leading overpunch, trailing overpunch,
250 leading separate or trailing separate sign representation or,
251 alternatively, no sign at all.
254 \livelink{chap:DWATdigitcount}{DW\-\_AT\-\_digit\-\_count}
256 \addtoindexx{digit count attribute}
257 is an integer constant
258 value that represents the number of digits in an instance of
261 \hypertarget{chap:DWATdecimalscaledecimalscalefactor}
262 The \livelink{chap:DWATdecimalscale}{DW\-\_AT\-\_decimal\-\_scale}
264 \addtoindexx{decimal scale attribute}
265 is an integer constant value
266 that represents the exponent of the base ten scale factor to
267 be applied to an instance of the type. A scale of zero puts the
268 decimal point immediately to the right of the least significant
269 digit. Positive scale moves the decimal point to the right
270 and implies that additional zero digits on the right are not
271 stored in an instance of the type. Negative scale moves the
272 decimal point to the left; if the absolute value of the scale
273 is larger than the digit count, this implies additional zero
274 digits on the left are not stored in an instance of the type.
276 The \livelink{chap:DWATEedited}{DW\-\_ATE\-\_edited}
278 \hypertarget{chap:DWATpicturestringpicturestringfornumericstringtype}
279 type is used to represent an edited
280 numeric or alphanumeric data type. It is used in combination
281 with an \livelink{chap:DWATpicturestring}{DW\-\_AT\-\_picture\-\_string} attribute whose value is a
282 null\dash terminated string containing the target\dash dependent picture
283 string associated with the type.
285 If the edited base type entry describes an edited numeric
286 data type, the edited type entry has a \livelink{chap:DWATdigitcount}{DW\-\_AT\-\_digit\-\_count} and a
287 \livelink{chap:DWATdecimalscale}{DW\-\_AT\-\_decimal\-\_scale} attribute.
288 \addtoindexx{decimal scale attribute}
289 These attributes have the same
290 interpretation as described for the
291 \livelink{chap:DWATEpackeddecimal}{DW\-\_ATE\-\_packed\-\_decimal} and
292 \livelink{chap:DWATEnumericstring}{DW\-\_ATE\-\_numeric\-\_string} base
293 types. If the edited type entry
294 describes an edited alphanumeric data type, the edited type
295 entry does not have these attributes.
298 \textit{The presence or absence of the \livelink{chap:DWATdigitcount}{DW\-\_AT\-\_digit\-\_count} and
299 \livelink{chap:DWATdecimalscale}{DW\-\_AT\-\_decimal\-\_scale} attributes
300 \addtoindexx{decimal scale attribute}
301 allows a debugger to easily
302 distinguish edited numeric from edited alphanumeric, although
303 in principle the digit count and scale are derivable by
304 interpreting the picture string.}
306 The \livelink{chap:DWATEsignedfixed}{DW\-\_ATE\-\_signed\-\_fixed} and \livelink{chap:DWATEunsignedfixed}{DW\-\_ATE\-\_unsigned\-\_fixed} entries
307 describe signed and unsigned fixed\dash point binary data types,
310 The fixed binary type entries have
311 \addtoindexx{digit count attribute}
313 \livelink{chap:DWATdigitcount}{DW\-\_AT\-\_digit\-\_count}
314 attribute with the same interpretation as described for the
315 \livelink{chap:DWATEpackeddecimal}{DW\-\_ATE\-\_packed\-\_decimal} and \livelink{chap:DWATEnumericstring}{DW\-\_ATE\-\_numeric\-\_string} base types.
317 For a data type with a decimal scale factor, the fixed binary
319 \livelink{chap:DWATdecimalscale}{DW\-\_AT\-\_decimal\-\_scale} attribute
320 \addtoindexx{decimal scale attribute}
322 interpretation as described for the
323 \livelink{chap:DWATEpackeddecimal}{DW\-\_ATE\-\_packed\-\_decimal}
324 and \livelink{chap:DWATEnumericstring}{DW\-\_ATE\-\_numeric\-\_string} base types.
326 \hypertarget{chap:DWATbinaryscalebinaryscalefactorforfixedpointtype}
327 For a data type with a binary scale factor, the fixed
328 \addtoindexx{binary scale attribute}
329 binary type entry has a
330 \livelink{chap:DWATbinaryscale}{DW\-\_AT\-\_binary\-\_scale} attribute.
332 \livelink{chap:DWATbinaryscale}{DW\-\_AT\-\_binary\-\_scale} attribute
333 is an integer constant value
334 that represents the exponent of the base two scale factor to
335 be applied to an instance of the type. Zero scale puts the
336 binary point immediately to the right of the least significant
337 bit. Positive scale moves the binary point to the right and
338 implies that additional zero bits on the right are not stored
339 in an instance of the type. Negative scale moves the binary
340 point to the left; if the absolute value of the scale is
341 larger than the number of bits, this implies additional zero
342 bits on the left are not stored in an instance of the type.
345 \hypertarget{chap:DWATsmallscalefactorforfixedpointtype}
346 a data type with a non\dash decimal and non\dash binary scale factor,
347 the fixed binary type entry has a
348 \livelink{chap:DWATsmall}{DW\-\_AT\-\_small} attribute which
349 \addtoindexx{small attribute}
351 \livelink{chap:DWTAGconstant}{DW\-\_TAG\-\_constant} entry. The scale factor value
352 is interpreted in accordance with the value defined by the
353 \livelink{chap:DWTAGconstant}{DW\-\_TAG\-\_constant} entry. The value represented is the product
354 of the integer value in memory and the associated constant
357 \textit{The \livelink{chap:DWATsmall}{DW\-\_AT\-\_small} attribute
358 is defined with the \addtoindex{Ada} small
363 \begin{tabular}{lp{9cm}}
364 Name&Meaning\\ \hline
365 \livetarg{chap:DWDSunsigned}{DW\-\_DS\-\_unsigned} & unsigned \\
366 \livetarg{chap:DWDSleadingoverpunch}{DW\-\_DS\-\_leading\-\_overpunch} & Sign
367 is encoded in the most significant digit in a target\dash dependent manner \\
368 \livetarg{chap:DWDStrailingoverpunch}{DW\-\_DS\-\_trailing\-\_overpunch} & Sign
369 is encoded in the least significant digit in a target\dash dependent manner \\
370 \livetarg{chap:DWDSleadingseparate}{DW\-\_DS\-\_leading\-\_separate}
371 & Decimal type: Sign is a ``+'' or ``-'' character
372 to the left of the most significant digit. \\
373 \livetarg{chap:DWDStrailingseparate}{DW\-\_DS\-\_trailing\-\_separate}
374 & Decimal type: Sign is a ``+'' or ``-'' character
375 to the right of the least significant digit. \\
376 &Packed decimal type: Least significant nibble contains
377 a target\dash dependent value
378 indicating positive or negative. \\
380 \caption{Decimal sign attribute values}
381 \label{fig:decimalsignattributevalues}
384 \section{Unspecified Type Entries}
385 \label{chap:unspecifiedtypeentries}
386 \addtoindexx{unspecified type entry}
387 \addtoindexx{void type|see{unspecified type entry}}
388 Some languages have constructs in which a type
389 may be left unspecified or the absence of a type
390 may be explicitly indicated.
392 An unspecified (implicit, unknown, ambiguous or nonexistent)
393 type is represented by a debugging information entry with
394 the tag \livetarg{chap:DWTAGunspecifiedtype}{DW\-\_TAG\-\_unspecified\-\_type}.
395 If a name has been given
396 to the type, then the corresponding unspecified type entry
397 has a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
398 \addtoindexx{name attribute}
400 a null\dash terminated
401 string containing the name as it appears in the source program.
403 The interpretation of this debugging information entry is
404 intentionally left flexible to allow it to be interpreted
405 appropriately in different languages. For example, in
406 \addtoindex{C} and \addtoindex{C++}
407 the language implementation can provide an unspecified type
408 entry with the name “void” which can be referenced by the
409 type attribute of pointer types and typedef declarations for
411 % FIXME: the following reference was wrong in DW4 so DavidA guessed
413 Sections \refersec{chap:unspecifiedtypeentries} and
414 %The following reference was valid, so the following is probably correct.
415 Section \refersec{chap:typedefentries},
416 respectively). As another
417 example, in \addtoindex{Ada} such an unspecified type entry can be referred
418 to by the type attribute of an access type where the denoted
419 \addtoindexx{incomplete type (Ada)}
420 type is incomplete (the name is declared as a type but the
421 definition is deferred to a separate compilation unit).
423 \section{Type Modifier Entries}
424 \label{chap:typemodifierentries}
425 \addtoindexx{type modifier entry}
427 A base or user\dash defined type may be modified in different ways
428 \addtoindexx{type modifier|see{constant type entry}}
429 \addtoindexx{type modifier|see{reference type entry}}
430 \addtoindexx{type modifier|see{restricted type entry}}
431 \addtoindexx{type modifier|see{packed type entry}}
432 \addtoindexx{type modifier|see{pointer type entry}}
433 \addtoindexx{type modifier|see{shared type entry}}
434 \addtoindexx{type modifier|see{volatile type entry}}
435 in different languages.
436 A type modifier is represented in
437 DWARF by a debugging information entry with one of the tags
439 Figure \refersec{fig:typemodifiertags}.
441 If a name has been given to the modified type in the source
442 program, then the corresponding modified type entry has
443 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
444 \addtoindexx{name attribute}
445 whose value is a null\dash terminated
446 string containing the modified type name as it appears in
449 Each of the type modifier entries has
450 \addtoindexx{type attribute}
452 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute,
453 whose value is a reference to a debugging information entry
454 describing a base type, a user-defined type or another type
457 A modified type entry describing a
458 \addtoindexx{pointer type entry}
459 pointer or \addtoindex{reference type}
460 (using \livelink{chap:DWTAGpointertype}{DW\-\_TAG\-\_pointer\-\_type},
461 \livelink{chap:DWTAGreferencetype}{DW\-\_TAG\-\_reference\-\_type} or
462 \livelink{chap:DWTAGrvaluereferencetype}{DW\-\_TAG\-\_rvalue\-\_reference\-\_type})
463 % Another instance of no-good-place-to-put-index entry.
465 \addtoindexx{address class!attribute}
467 \hypertarget{chap:DWATadressclasspointerorreferencetypes}
469 \livelink{chap:DWATaddressclass}{DW\-\_AT\-\_address\-\_class}
470 attribute to describe how objects having the given pointer
471 or reference type ought to be dereferenced.
473 A modified type entry describing a shared qualified type
474 (using \livelink{chap:DWTAGsharedtype}{DW\-\_TAG\-\_shared\-\_type}) may have a
475 \livelink{chap:DWATcount}{DW\-\_AT\-\_count} attribute
476 \addtoindexx{count attribute}
477 whose value is a constant expressing the blocksize of the
478 type. If no count attribute is present, then the “infinite”
479 blocksize is assumed.
481 When multiple type modifiers are chained together to modify
482 a base or user-defined type, the tree ordering reflects the
484 \addtoindexx{reference type entry, lvalue|see{reference type entry}}
486 \addtoindexx{reference type entry, rvalue|see{rvalue reference type entry}}
488 \addtoindexx{parameter|see{macro formal parameter list}}
490 \addtoindexx{parameter|see{\textit{this} parameter}}
492 \addtoindexx{parameter|see{variable parameter attribute}}
494 \addtoindexx{parameter|see{optional parameter attribute}}
496 \addtoindexx{parameter|see{unspecified parameters entry}}
498 \addtoindexx{parameter|see{template value parameter entry}}
500 \addtoindexx{parameter|see{template type parameter entry}}
502 \addtoindexx{parameter|see{formal parameter entry}}
507 \begin{tabular}{lp{9cm}}
508 Name&Meaning\\ \hline
509 \livetarg{chap:DWTAGconsttype}{DW\-\_TAG\-\_const\-\_type} & C or C++ const qualified type
510 \addtoindexx{const qualified type entry} \addtoindexx{C} \addtoindexx{C++} \\
511 \livetarg{chap:DWTAGpackedtype}{DW\-\_TAG\-\_packed\-\_type}& \addtoindex{Pascal} or Ada packed type\addtoindexx{packed type entry}
512 \addtoindexx{packed qualified type entry} \addtoindexx{Ada} \addtoindexx{Pascal} \\
513 \livetarg{chap:DWTAGpointertype}{DW\-\_TAG\-\_pointer\-\_type} & Pointer to an object of
514 the type being modified \addtoindexx{pointer qualified type entry} \\
515 \livetarg{chap:DWTAGreferencetype}{DW\-\_TAG\-\_reference\-\_type}& C++ (lvalue) reference
516 to an object of the type
517 \addtoindexx{reference type entry} \\
519 \addtoindexx{reference qualified type entry} \\
520 \livetarg{chap:DWTAGrestricttype}{DW\-\_TAG\-\_restrict\-\_type}& \addtoindex{C}
522 \addtoindexx{restricted type entry} \\
524 \addtoindexx{restrict qualified type} \\
525 \livetarg{chap:DWTAGrvaluereferencetype}{DW\-\_TAG\-\_rvalue\-\_reference\-\_type} & C++
526 \addtoindexx{rvalue reference type entry}
528 \addtoindexx{restricted type entry}
529 reference to an object of the type being modified
530 \addtoindexx{rvalue reference qualified type entry} \\
531 \livetarg{chap:DWTAGsharedtype}{DW\-\_TAG\-\_shared\-\_type}&\addtoindex{UPC} shared qualified type
532 \addtoindexx{shared qualified type entry} \\
533 \livetarg{chap:DWTAGvolatiletype}{DW\-\_TAG\-\_volatile\-\_type}&C or C++ volatile qualified type
534 \addtoindex{volatile qualified type entry} \\
536 \caption{Type modifier tags}
537 \label{fig:typemodifiertags}
540 %The following clearpage prevents splitting the example across pages.
542 \textit{As examples of how type modifiers are ordered, take the following C
546 const unsigned char * volatile p;
548 \textit{which represents a volatile pointer to a constant
549 character. This is encoded in DWARF as:}
551 \livelink{chap:DWTAGvariable}{DW\-\_TAG\-\_variable}(p) -->
552 \livelink{chap:DWTAGvolatiletype}{DW\-\_TAG\-\_volatile\-\_type} -->
553 \livelink{chap:DWTAGpointertype}{DW\-\_TAG\-\_pointer\-\_type} -->
554 \livelink{chap:DWTAGconsttype}{DW\-\_TAG\-\_const\-\_type} -->
555 \livelink{chap:DWTAGbasetype}{DW\-\_TAG\-\_base\-\_type}(unsigned char)
557 \textit{On the other hand}
559 volatile unsigned char * const restrict p;
561 \textit{represents a restricted constant
562 pointer to a volatile character. This is encoded as:}
564 \livelink{chap:DWTAGvariable}{DW\-\_TAG\-\_variable}(p) -->
565 \livelink{chap:DWTAGrestricttype}{DW\-\_TAG\-\_restrict\-\_type} -->
566 \livelink{chap:DWTAGconsttype}{DW\-\_TAG\-\_const\-\_type} -->
567 \livelink{chap:DWTAGpointertype}{DW\-\_TAG\-\_pointer\-\_type} -->
568 \livelink{chap:DWTAGvolatiletype}{DW\-\_TAG\-\_volatile\-\_type} -->
569 \livelink{chap:DWTAGbasetype}{DW\-\_TAG\-\_base\-\_type}(unsigned char)
572 \section{Typedef Entries}
573 \label{chap:typedefentries}
574 A named type that is defined in terms of another type
575 definition is represented by a debugging information entry with
576 \addtoindexx{typedef entry}
577 the tag \livetarg{chap:DWTAGtypedef}{DW\-\_TAG\-\_typedef}.
578 The typedef entry has a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
579 \addtoindexx{name attribute}
580 whose value is a null\dash terminated string containing
581 the name of the typedef as it appears in the source program.
583 The typedef entry may also contain
584 \addtoindexx{type attribute}
586 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute whose
587 value is a reference to the type named by the typedef. If
588 the debugging information entry for a typedef represents
589 a declaration of the type that is not also a definition,
590 it does not contain a type attribute.
592 \textit{Depending on the language, a named type that is defined in
593 terms of another type may be called a type alias, a subtype,
594 a constrained type and other terms. A type name declared with
595 no defining details may be termed an
596 \addtoindexx{incomplete type}
597 incomplete, forward or hidden type.
598 While the DWARF \livelink{chap:DWTAGtypedef}{DW\-\_TAG\-\_typedef} entry was
599 originally inspired by the like named construct in
600 \addtoindex{C} and \addtoindex{C++},
601 it is broadly suitable for similar constructs (by whatever
602 source syntax) in other languages.}
604 \section{Array Type Entries}
605 \label{chap:arraytypeentries}
607 Many languages share the concept of an ``array,'' which is
608 \addtoindexx{array type entry}
609 a table of components of identical type.
611 An array type is represented by a debugging information entry
612 with the tag \livetarg{chap:DWTAGarraytype}{DW\-\_TAG\-\_array\-\_type}.
615 \addtoindexx{array!declaration of type}
616 the array type in the source program, then the corresponding
617 array type entry has a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
618 \addtoindexx{name attribute}
620 null\dash terminated string containing the array type name as it
621 appears in the source program.
624 \hypertarget{chap:DWATorderingarrayrowcolumnordering}
625 array type entry describing a multidimensional array may
626 \addtoindexx{array!element ordering}
627 have a \livelink{chap:DWATordering}{DW\-\_AT\-\_ordering} attribute whose integer constant value is
628 interpreted to mean either row-major or column-major ordering
629 of array elements. The set of values and their meanings
630 for the ordering attribute are listed in
631 Figure \refersec{fig:arrayordering}.
633 ordering attribute is present, the default ordering for the
634 source language (which is indicated by the
635 \livelink{chap:DWATlanguage}{DW\-\_AT\-\_language}
637 \addtoindexx{language attribute}
638 of the enclosing compilation unit entry) is assumed.
641 \autorows[0pt]{c}{1}{l}{
642 \livetarg{chap:DWORDcolmajor}{DW\-\_ORD\-\_col\-\_major},
643 \livetarg{chap:DWORDrowmajor}{DW\-\_ORD\-\_row\-\_major}
645 \caption{Array ordering}\label{fig:arrayordering}
648 The ordering attribute may optionally appear on one-dimensional
649 arrays; it will be ignored.
651 An array type entry has
652 \addtoindexx{type attribute}
653 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute
655 \addtoindexx{array!element type}
656 the type of each element of the array.
658 If the amount of storage allocated to hold each element of an
659 object of the given array type is different from the amount
660 \addtoindexx{stride attribute|see{bit stride attribute or byte stride attribute}}
661 of storage that is normally allocated to hold an individual
662 \hypertarget{chap:DWATbitstridearrayelementstrideofarraytype}
664 \hypertarget{chap:DWATbytestridearrayelementstrideofarraytype}
665 indicated element type, then the array type
666 \addtoindexx{bit stride attribute}
668 \livelink{chap:DWATbytestride}{DW\-\_AT\-\_byte\-\_stride}
670 \addtoindexx{byte stride attribute}
671 a \livelink{chap:DWATbitstride}{DW\-\_AT\-\_bit\-\_stride}
673 \addtoindexx{bit stride attribute}
675 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
677 element of the array.
679 The array type entry may have either a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} or a
680 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attribute
681 (see Section \refersec{chap:byteandbitsizes}),
683 amount of storage needed to hold an instance of the array type.
685 \textit{If the size of the array can be determined statically at
686 compile time, this value can usually be computed by multiplying
687 the number of array elements by the size of each element.}
690 Each array dimension is described by a debugging information
691 entry with either the
692 \addtoindexx{subrange type entry!as array dimension}
693 tag \livelink{chap:DWTAGsubrangetype}{DW\-\_TAG\-\_subrange\-\_type} or the
694 \addtoindexx{enumeration type entry!as array dimension}
696 \livelink{chap:DWTAGenumerationtype}{DW\-\_TAG\-\_enumeration\-\_type}. These entries are
698 array type entry and are ordered to reflect the appearance of
699 the dimensions in the source program (i.e., leftmost dimension
700 first, next to leftmost second, and so on).
702 In languages, such as C, in which there is no concept of
703 a “multidimensional array”, an array of arrays may
704 be represented by a debugging information entry for a
705 multidimensional array.
707 Other attributes especially applicable to arrays are
708 \livelink{chap:DWATallocated}{DW\-\_AT\-\_allocated},
709 \livelink{chap:DWATassociated}{DW\-\_AT\-\_associated} and
710 \livelink{chap:DWATdatalocation}{DW\-\_AT\-\_data\-\_location},
711 which are described in
712 Section \refersec{chap:dynamictypeproperties}.
713 For relevant examples, see also Appendix \refersec{app:fortran90example}.
715 \section{ Structure, Union, Class and Interface Type Entries}
716 \label{chap:structureunionclassandinterfacetypeentries}
718 \textit{The languages
720 \addtoindex{C++}, and
721 \addtoindex{Pascal}, among others, allow the
722 programmer to define types that are collections of related
723 \addtoindexx{structure type entry}
725 In \addtoindex{C} and \addtoindex{C++}, these collections are called
727 In \addtoindex{Pascal}, they are called “records.”
728 The components may be of different types. The components are
729 called “members” in \addtoindex{C} and
730 \addtoindex{C++}, and “fields” in \addtoindex{Pascal}.}
732 \textit{The components of these collections each exist in their
733 own space in computer memory. The components of a C or C++
734 “union” all coexist in the same memory.}
736 \textit{\addtoindex{Pascal} and
737 other languages have a “discriminated union,”
738 \addtoindex{discriminated union|see {variant entry}}
739 also called a “variant record.” Here, selection of a
740 number of alternative substructures (“variants”) is based
741 on the value of a component that is not part of any of those
742 substructures (the “discriminant”).}
744 \textit{\addtoindex{C++} and
745 \addtoindex{Java} have the notion of ``class'', which is in some
746 ways similar to a structure. A class may have “member
747 functions” which are subroutines that are within the scope
748 of a class or structure.}
750 \textit{The \addtoindex{C++} notion of
751 structure is more general than in \addtoindex{C}, being
752 equivalent to a class with minor differences. Accordingly,
753 in the following discussion statements about
754 \addtoindex{C++} classes may
755 be understood to apply to \addtoindex{C++} structures as well.}
757 \subsection{Structure, Union and Class Type Entries}
758 \label{chap:structureunionandclasstypeentries}
761 Structure, union, and class types are represented by debugging
762 \addtoindexx{structure type entry}
764 \addtoindexx{union type entry}
766 \addtoindexx{class type entry}
768 \livetarg{chap:DWTAGstructuretype}{DW\-\_TAG\-\_structure\-\_type},
769 \livetarg{chap:DWTAGuniontype}{DW\-\_TAG\-\_union\-\_type},
770 and \livetarg{chap:DWTAGclasstype}{DW\-\_TAG\-\_class\-\_type},
771 respectively. If a name has been given to the structure,
772 union, or class in the source program, then the corresponding
773 structure type, union type, or class type entry has a
774 \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
775 \addtoindexx{name attribute}
776 whose value is a null\dash terminated string
777 containing the type name as it appears in the source program.
779 The members of a structure, union, or class are represented
780 by debugging information entries that are owned by the
781 corresponding structure type, union type, or class type entry
782 and appear in the same order as the corresponding declarations
783 in the source program.
785 A structure type, union type or class type entry may have
786 either a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} or a
787 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attribute
788 \hypertarget{chap:DWATbitsizedatamemberbitsize}
789 (see Section \refersec{chap:byteandbitsizes}),
790 whose value is the amount of storage needed
791 to hold an instance of the structure, union or class type,
792 including any padding.
793 An incomplete structure, union or class type
794 \addtoindexx{incomplete structure/union/class}
796 \addtoindexx{incomplete type}
797 represented by a structure, union or class
798 entry that does not have a byte size attribute and that has
799 \addtoindexx{declaration attribute}
800 a \livelink{chap:DWATdeclaration}{DW\-\_AT\-\_declaration} attribute.
802 If the complete declaration of a type has been placed in
803 \hypertarget{chap:DWATsignaturetypesignature}
804 a separate \addtoindex{type unit}
805 (see Section \refersec{chap:separatetypeunitentries}),
806 an incomplete declaration
807 \addtoindexx{incomplete type}
808 of that type in the compilation unit may provide
809 the unique 64\dash bit signature of the type using
810 \addtoindexx{type signature}
811 a \livelink{chap:DWATsignature}{DW\-\_AT\-\_signature}
814 If a structure, union or class entry represents the definition
815 of a structure, class or union member corresponding to a prior
816 incomplete structure, class or union, the entry may have a
817 \livelink{chap:DWATspecification}{DW\-\_AT\-\_specification} attribute
818 \addtoindexx{specification attribute}
819 whose value is a reference to
820 the debugging information entry representing that incomplete
823 Structure, union and class entries containing the
824 \livelink{chap:DWATspecification}{DW\-\_AT\-\_specification} attribute
825 \addtoindexx{specification attribute}
826 do not need to duplicate
827 information provided by the declaration entry referenced by the
828 specification attribute. In particular, such entries do not
829 need to contain an attribute for the name of the structure,
830 class or union they represent if such information is already
831 provided in the declaration.
833 \textit{For \addtoindex{C} and \addtoindex{C++},
835 \addtoindexx{data member|see {member entry (data)}}
836 member declarations occurring within
837 the declaration of a structure, union or class type are
838 considered to be “definitions” of those members, with
839 the exception of “static” data members, whose definitions
840 appear outside of the declaration of the enclosing structure,
841 union or class type. Function member declarations appearing
842 within a structure, union or class type declaration are
843 definitions only if the body of the function also appears
844 within the type declaration.}
846 If the definition for a given member of the structure, union
847 or class does not appear within the body of the declaration,
848 that member also has a debugging information entry describing
849 its definition. That latter entry has a
850 \livelink{chap:DWATspecification}{DW\-\_AT\-\_specification} attribute
851 \addtoindexx{specification attribute}
852 referencing the debugging information entry
853 owned by the body of the structure, union or class entry and
854 representing a non\dash defining declaration of the data, function
855 or type member. The referenced entry will not have information
856 about the location of that member (low and high pc attributes
857 for function members, location descriptions for data members)
858 and will have a \livelink{chap:DWATdeclaration}{DW\-\_AT\-\_declaration} attribute.
860 \textit{Consider a nested class whose
861 definition occurs outside of the containing class definition, as in:}
870 \textit{The two different structs can be described in
871 different compilation units to
872 facilitate DWARF space compression
873 (see Appendix \refersec{app:usingcompilationunits}).}
875 \subsection{Interface Type Entries}
876 \label{chap:interfacetypeentries}
878 \textit{The \addtoindex{Java} language defines ``interface'' types.
880 \addtoindex{interface type entry}
881 in \addtoindex{Java} is similar to a \addtoindex{C++} or
882 \addtoindex{Java} class with only abstract
883 methods and constant data members.}
886 \addtoindexx{interface type entry}
887 are represented by debugging information
889 tag \livetarg{chap:DWTAGinterfacetype}{DW\-\_TAG\-\_interface\-\_type}.
891 An interface type entry has
892 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
893 \addtoindexx{name attribute}
895 value is a null\dash terminated string containing the type name
896 as it appears in the source program.
898 The members of an interface are represented by debugging
899 information entries that are owned by the interface type
900 entry and that appear in the same order as the corresponding
901 declarations in the source program.
903 \subsection{Derived or Extended Structs, Classes and Interfaces}
904 \label{chap:derivedorextendedstructsclasesandinterfaces}
906 \textit{In \addtoindex{C++}, a class (or struct)
908 \addtoindexx{derived type (C++)|see{inheritance entry}}
909 be ``derived from'' or be a
910 ``subclass of'' another class.
911 In \addtoindex{Java}, an interface may ``extend''
912 \addtoindexx{extended type (Java)|see{inheritance entry}}
914 \addtoindexx{implementing type (Java)|see{inheritance entry}}
915 or more other interfaces, and a class may ``extend'' another
916 class and/or ``implement'' one or more interfaces. All of these
917 relationships may be described using the following. Note that
918 in \addtoindex{Java},
919 the distinction between extends and implements is
920 implied by the entities at the two ends of the relationship.}
922 A class type or interface type entry that describes a
923 derived, extended or implementing class or interface owns
924 \addtoindexx{implementing type (Java)|see{inheritance entry}}
925 debugging information entries describing each of the classes
926 or interfaces it is derived from, extending or implementing,
927 respectively, ordered as they were in the source program. Each
929 \addtoindexx{inheritance entry}
931 tag \livetarg{chap:DWTAGinheritance}{DW\-\_TAG\-\_inheritance}.
934 \addtoindexx{type attribute}
936 \addtoindexx{inheritance entry}
938 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute whose value is
939 a reference to the debugging information entry describing the
940 class or interface from which the parent class or structure
941 of the inheritance entry is derived, extended or implementing.
944 \addtoindexx{inheritance entry}
945 for a class that derives from or extends
946 \hypertarget{chap:DWATdatamemberlocationinheritedmemberlocation}
947 another class or struct also has
948 \addtoindexx{data member location attribute}
950 \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location}
951 attribute, whose value describes the location of the beginning
952 of the inherited type relative to the beginning address of the
953 derived class. If that value is a constant, it is the offset
954 in bytes from the beginning of the class to the beginning of
955 the inherited type. Otherwise, the value must be a location
956 description. In this latter case, the beginning address of
957 the derived class is pushed on the expression stack before
958 the \addtoindex{location description}
959 is evaluated and the result of the
960 evaluation is the location of the inherited type.
962 \textit{The interpretation of the value of this attribute for
963 inherited types is the same as the interpretation for data
965 (see Section \refersec{chap:datamemberentries}). }
968 \addtoindexx{inheritance entry}
970 \hypertarget{chap:DWATaccessibilitycppinheritedmembers}
972 \addtoindexx{accessibility attribute}
974 \livelink{chap:DWATaccessibility}{DW\-\_AT\-\_accessibility}
976 If no accessibility attribute
977 is present, private access is assumed for an entry of a class
978 and public access is assumed for an entry of an interface,
982 \hypertarget{chap:DWATvirtualityvirtualityofbaseclass}
983 the class referenced by the
984 \addtoindexx{inheritance entry}
985 inheritance entry serves
986 as a \addtoindex{C++} virtual base class, the inheritance entry has a
987 \livelink{chap:DWATvirtuality}{DW\-\_AT\-\_virtuality} attribute.
989 \textit{For a \addtoindex{C++} virtual base, the
990 \addtoindex{data member location attribute}
991 will usually consist of a non-trivial
992 \addtoindex{location description}.}
994 \subsection{Access Declarations}
995 \label{chap:accessdeclarations}
997 \textit{In \addtoindex{C++}, a derived class may contain access declarations that
998 \addtoindex{access declaration entry}
999 change the accessibility of individual class members from the
1000 overall accessibility specified by the inheritance declaration.
1001 A single access declaration may refer to a set of overloaded
1004 If a derived class or structure contains access declarations,
1005 each such declaration may be represented by a debugging
1006 information entry with the tag
1007 \livetarg{chap:DWTAGaccessdeclaration}{DW\-\_TAG\-\_access\-\_declaration}.
1009 such entry is a child of the class or structure type entry.
1011 An access declaration entry has
1012 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
1013 \addtoindexx{name attribute}
1015 value is a null\dash terminated string representing the name used
1016 in the declaration in the source program, including any class
1017 or structure qualifiers.
1019 An access declaration entry
1020 \hypertarget{chap:DWATaccessibilitycppbaseclasses}
1023 \livelink{chap:DWATaccessibility}{DW\-\_AT\-\_accessibility}
1024 attribute describing the declared accessibility of the named
1028 \subsection{Friends}
1029 \label{chap:friends}
1032 \addtoindexx{friend entry}
1033 declared by a structure, union or class
1034 \hypertarget{chap:DWATfriendfriendrelationship}
1035 type may be represented by a debugging information entry
1036 that is a child of the structure, union or class type entry;
1037 the friend entry has the
1038 tag \livetarg{chap:DWTAGfriend}{DW\-\_TAG\-\_friend}.
1041 \addtoindexx{friend attribute}
1042 a \livelink{chap:DWATfriend}{DW\-\_AT\-\_friend} attribute, whose value is
1043 a reference to the debugging information entry describing
1044 the declaration of the friend.
1047 \subsection{Data Member Entries}
1048 \label{chap:datamemberentries}
1050 A data member (as opposed to a member function) is
1051 represented by a debugging information entry with the
1052 tag \livetarg{chap:DWTAGmember}{DW\-\_TAG\-\_member}.
1054 \addtoindexx{member entry (data)}
1055 member entry for a named member has
1056 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
1057 \addtoindexx{name attribute}
1058 whose value is a null\dash terminated
1059 string containing the member name as it appears in the source
1060 program. If the member entry describes an
1061 \addtoindex{anonymous union},
1063 name attribute is omitted or consists of a single zero byte.
1065 The data member entry has
1066 \addtoindexx{type attribute}
1068 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute to denote
1069 \addtoindexx{member entry (data)}
1070 the type of that member.
1072 A data member entry may
1073 \addtoindexx{accessibility attribute}
1075 \livelink{chap:DWATaccessibility}{DW\-\_AT\-\_accessibility}
1076 attribute. If no accessibility attribute is present, private
1077 access is assumed for an entry of a class and public access
1078 is assumed for an entry of a structure, union, or interface.
1081 \hypertarget{chap:DWATmutablemutablepropertyofmemberdata}
1083 \addtoindexx{member entry (data)}
1085 \addtoindexx{mutable attribute}
1086 have a \livelink{chap:DWATmutable}{DW\-\_AT\-\_mutable} attribute,
1087 which is a \livelink{chap:flag}{flag}.
1088 This attribute indicates whether the data
1089 member was declared with the mutable storage class specifier.
1091 The beginning of a data member
1092 \addtoindex{beginning of a data member}
1093 is described relative to
1094 \addtoindexx{beginning of an object}
1095 the beginning of the object in which it is immediately
1096 contained. In general, the beginning is characterized by
1097 both an address and a bit offset within the byte at that
1098 address. When the storage for an entity includes all of
1099 the bits in the beginning byte, the beginning bit offset is
1102 Bit offsets in DWARF use the bit numbering and direction
1103 conventions that are appropriate to the current language on
1107 \addtoindexx{member entry (data)}
1108 corresponding to a data member that is
1109 \hypertarget{chap:DWATdatabitoffsetdatamemberbitlocation}
1111 \hypertarget{chap:DWATdatamemberlocationdatamemberlocation}
1112 in a structure, union or class may have either
1113 \addtoindexx{data member location attribute}
1115 \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location} attribute or a
1116 \livelink{chap:DWATdatabitoffset}{DW\-\_AT\-\_data\-\_bit\-\_offset}
1117 attribute. If the beginning of the data member is the same as
1118 the beginning of the containing entity then neither attribute
1121 For a \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location} attribute
1122 \addtoindexx{data member location attribute}
1123 there are two cases:
1125 \begin{enumerate}[1.]
1127 \item If the value is an integer constant, it is the offset
1128 in bytes from the beginning of the containing entity. If
1129 the beginning of the containing entity has a non-zero bit
1130 offset then the beginning of the member entry has that same
1133 \item Otherwise, the value must be a \addtoindex{location description}.
1135 this case, the beginning of the containing entity must be byte
1136 aligned. The beginning address is pushed on the DWARF stack
1137 before the \addtoindex{location} description is evaluated; the result of
1138 the evaluation is the base address of the member entry.
1140 \textit{The push on the DWARF expression stack of the base address of
1141 the containing construct is equivalent to execution of the
1142 \livelink{chap:DWOPpushobjectaddress}{DW\-\_OP\-\_push\-\_object\-\_address} operation
1143 (see Section \refersec{chap:stackoperations});
1144 \livelink{chap:DWOPpushobjectaddress}{DW\-\_OP\-\_push\-\_object\-\_address} therefore
1145 is not needed at the
1146 beginning of a \addtoindex{location description} for a data member.
1148 result of the evaluation is a location--either an address or
1149 the name of a register, not an offset to the member.}
1151 \textit{A \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location}
1153 \addtoindexx{data member location attribute}
1154 that has the form of a
1155 \addtoindex{location description} is not valid for a data member contained
1156 in an entity that is not byte aligned because DWARF operations
1157 do not allow for manipulating or computing bit offsets.}
1161 For a \livelink{chap:DWATdatabitoffset}{DW\-\_AT\-\_data\-\_bit\-\_offset} attribute,
1162 the value is an integer constant
1163 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
1164 that specifies the number of bits
1165 from the beginning of the containing entity to the beginning
1166 of the data member. This value must be greater than or equal
1167 to zero, but is not limited to less than the number of bits
1170 If the size of a data member is not the same as the size
1171 of the type given for the data member, the data member has
1172 \addtoindexx{bit size attribute}
1173 either a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size}
1174 or a \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attribute whose
1175 integer constant value
1176 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
1178 of storage needed to hold the value of the data member.
1180 \textit{\addtoindex{C} and \addtoindex{C++}
1182 \addtoindex{bit fields}
1184 \addtoindexx{data bit offset}
1186 \addtoindexx{data bit size}
1188 \livelink{chap:DWATdatabitoffset}{DW\-\_AT\-\_data\-\_bit\-\_offset} and
1189 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attributes.}
1191 \textit{This Standard uses the following bit numbering and direction
1192 conventions in examples. These conventions are for illustrative
1193 purposes and other conventions may apply on particular
1198 \item \textit{For big\dash endian architectures, bit offsets are
1199 counted from high-order to low\dash order bits within a byte (or
1200 larger storage unit); in this case, the bit offset identifies
1201 the high\dash order bit of the object.}
1203 \item \textit{For little\dash endian architectures, bit offsets are
1204 counted from low\dash order to high\dash order bits within a byte (or
1205 larger storage unit); in this case, the bit offset identifies
1206 the low\dash order bit of the object.}
1210 \textit{In either case, the bit so identified is defined as the
1211 \addtoindexx{beginning of an object}
1212 beginning of the object.}
1214 \textit{For example, take one possible representation of the following
1215 \addtoindex{C} structure definition
1216 in both big\dash and little\dash endian byte orders:}
1227 \textit{The following diagrams show the structure layout
1228 and data bit offsets for example big\dash\ and little\dash endian
1229 architectures, respectively. Both diagrams show a structure
1230 that begins at address A and whose size is four bytes. Also,
1231 high order bits are to the left and low order bits are to
1234 \textit{Big\dash Endian Data Bit Offsets:}
1242 Addresses increase ->
1243 | A | A + 1 | A + 2 | A + 3 |
1245 Data bit offsets increase ->
1246 +---------------+---------------+---------------+---------------+
1247 |0 4|5 10|11 15|16 23|24 31|
1248 | j | k | m | n | <pad> |
1250 +---------------------------------------------------------------+
1253 \textit{Little\dash Endian Data Bit Offsets:}
1259 <- Addresses increase
1260 | A | A + 1 | A + 2 | A + 3 |
1262 <- Data bit offsets increase
1264 +---------------+---------------+---------------+---------------+
1265 |31 24|23 16|15 11|10 5|4 0|
1266 | <pad> | n | m | k | j |
1268 +---------------------------------------------------------------+
1272 \textit{Note that data member bit offsets in this example are the
1273 same for both big\dash\ and little\dash endian architectures even
1274 though the fields are allocated in different directions
1275 (high\dash order to low-order versus low\dash order to high\dash order);
1276 the bit naming conventions for memory and/or registers of
1277 the target architecture may or may not make this seem natural.}
1279 \textit{For a more extensive example showing nested and packed records
1281 Appendix \refersec{app:pascalexample}.}
1283 \textit{Attribute \livelink{chap:DWATdatabitoffset}{DW\-\_AT\-\_data\-\_bit\-\_offset}
1285 \addtoindex{DWARF Version 4}
1286 and is also used for base types
1288 \refersec{chap:basetypeentries}).
1290 \livetarg{chap:DWATbitoffsetdatamemberbitlocation}
1291 attributes \livelink{chap:DWATbitoffset}{DW\-\_AT\-\_bit\-\_offset} and
1292 \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} when used to
1293 identify the beginning of bit field data members as defined
1294 in DWARF V3 and earlier. The earlier attributes are defined
1295 in a manner suitable for bit field members on big-endian
1296 architectures but which is either awkward or incomplete for
1297 use on little-endian architectures.
1298 (\livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} also
1299 has other uses that are not affected by this change.)}
1301 \textit{The \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size},
1302 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} and
1303 \livelink{chap:DWATbitoffset}{DW\-\_AT\-\_bit\-\_offset}
1304 attribute combination is deprecated for data members in DWARF
1305 Version 4, but implementations may continue to support this
1306 use for compatibility.}
1309 \addtoindex{DWARF Version 3}
1310 definitions of these attributes are
1313 \begin{myindentpara}{1cm}
1314 \textit{If the data member entry describes a bit field, then that
1315 entry has the following attributes:}
1318 \item \textit{A \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size}
1319 attribute whose value
1320 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
1321 is the number of bytes that contain an instance of the
1322 bit field and any padding bits.}
1324 \textit{The byte size attribute may be omitted if the size of the
1325 object containing the bit field can be inferred from the type
1326 attribute of the data member containing the bit field.}
1328 \item \textit{A \livelink{chap:DWATbitoffset}{DW\-\_AT\-\_bit\-\_offset}
1330 \addtoindexx{bit offset attribute (V3)}
1332 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
1333 is the number of bits to the left of the leftmost
1334 (most significant) bit of the bit field value.}
1336 \item \textit{A \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size}
1338 \addtoindexx{bit size attribute (V3)}
1340 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
1341 is the number of bits occupied by the bit field value.}
1346 \addtoindex{location description} for a bit field calculates the address
1347 of an anonymous object containing the bit field. The address
1348 is relative to the structure, union, or class that most closely
1349 encloses the bit field declaration. The number of bytes in this
1350 anonymous object is the value of the byte size attribute of
1351 the bit field. The offset (in bits) from the most significant
1352 bit of the anonymous object to the most significant bit of
1353 the bit field is the value of the bit offset attribute.}
1357 \textit{Diagrams similar to the above that show the use of the
1358 \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size},
1359 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} and
1360 \livelink{chap:DWATbitoffset}{DW\-\_AT\-\_bit\-\_offset} attribute
1361 combination may be found in the
1362 \addtoindex{DWARF Version 3} Standard.}
1364 \textit{In comparing
1366 \addtoindexx{DWARF Version 3}
1368 \addtoindexx{DWARF Version 4}
1369 4, note that DWARF V4
1370 defines the following combinations of attributes:}
1373 \item \textit{either \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location}
1375 \livelink{chap:DWATdatabitoffset}{DW\-\_AT\-\_data\-\_bit\-\_offset}
1376 (to specify the beginning of the data member)}
1378 % FIXME: the indentation of the following line is suspect.
1379 \textit{optionally together with}
1381 \item \textit{either \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} or
1382 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} (to
1383 specify the size of the data member)}
1387 \textit{DWARF V3 defines the following combinations}
1390 \item \textit{\livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location}
1391 (to specify the beginning
1392 of the data member, except this specification is only partial
1393 in the case of a bit field) }
1395 % FIXME: the indentation of the following line is suspect.
1396 \textit{optionally together with}
1398 \item \textit{\livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size},
1399 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} and
1400 \livelink{chap:DWATbitoffset}{DW\-\_AT\-\_bit\-\_offset}
1401 (to further specify the beginning of a bit field data member
1402 as well as specify the size of the data member) }
1405 \subsection{Member Function Entries}
1406 \label{chap:memberfunctionentries}
1408 A member function is represented by a
1409 \addtoindexx{member function entry}
1410 debugging information entry
1412 \addtoindexx{subprogram entry!as member function}
1413 tag \livelink{chap:DWTAGsubprogram}{DW\-\_TAG\-\_subprogram}.
1414 The member function entry
1415 may contain the same attributes and follows the same rules
1416 as non\dash member global subroutine entries
1417 (see Section \refersec{chap:subroutineandentrypointentries}).
1420 \addtoindexx{accessibility attribute}
1421 member function entry may have a
1422 \livelink{chap:DWATaccessibility}{DW\-\_AT\-\_accessibility}
1423 attribute. If no accessibility attribute is present, private
1424 access is assumed for an entry of a class and public access
1425 is assumed for an entry of a structure, union or interface.
1428 \hypertarget{chap:DWATvirtualityvirtualityoffunction}
1429 the member function entry describes a virtual function,
1430 then that entry has a
1431 \livelink{chap:DWATvirtuality}{DW\-\_AT\-\_virtuality} attribute.
1434 \hypertarget{chap:DWATexplicitexplicitpropertyofmemberfunction}
1435 the member function entry describes an explicit member
1436 function, then that entry has
1437 \addtoindexx{explicit attribute}
1439 \livelink{chap:DWATexplicit}{DW\-\_AT\-\_explicit} attribute.
1442 \hypertarget{chap:DWATvtableelemlocationvirtualfunctiontablevtableslot}
1443 entry for a virtual function also has a
1444 \livelink{chap:DWATvtableelemlocation}{DW\-\_AT\-\_vtable\-\_elem\-\_location}
1445 \addtoindexi{attribute}{vtable element location attribute} whose value contains
1446 a \addtoindex{location description}
1447 yielding the address of the slot
1448 for the function within the virtual function table for the
1449 enclosing class. The address of an object of the enclosing
1450 type is pushed onto the expression stack before the location
1451 description is evaluated.
1454 \hypertarget{chap:DWATobjectpointerobjectthisselfpointerofmemberfunction}
1455 the member function entry describes a non\dash static member
1456 \addtoindexx{this pointer attribute|see{object pointer attribute}}
1457 function, then that entry
1458 \addtoindexx{self pointer attribute|see{object pointer attribute}}
1460 \addtoindexx{object pointer attribute}
1461 a \livelink{chap:DWATobjectpointer}{DW\-\_AT\-\_object\-\_pointer}
1463 whose value is a reference to the formal parameter entry
1464 that corresponds to the object for which the function is
1465 called. The name attribute of that formal parameter is defined
1466 by the current language (for example,
1467 this for \addtoindex{C++} or self
1468 for \addtoindex{Objective C}
1469 and some other languages). That parameter
1470 also has a \livelink{chap:DWATartificial}{DW\-\_AT\-\_artificial} attribute whose value is true.
1472 Conversely, if the member function entry describes a static
1473 member function, the entry does not have
1474 \addtoindexx{object pointer attribute}
1476 \livelink{chap:DWATobjectpointer}{DW\-\_AT\-\_object\-\_pointer}
1479 If the member function entry describes a non\dash static member
1480 function that has a const\dash volatile qualification, then
1481 the entry describes a non\dash static member function whose
1482 object formal parameter has a type that has an equivalent
1483 const\dash volatile qualification.
1485 If a subroutine entry represents the defining declaration
1486 of a member function and that definition appears outside of
1487 the body of the enclosing class declaration, the subroutine
1489 \livelink{chap:DWATspecification}{DW\-\_AT\-\_specification} attribute,
1490 \addtoindexx{specification attribute}
1492 a reference to the debugging information entry representing
1493 the declaration of this function member. The referenced entry
1494 will be a child of some class (or structure) type entry.
1496 Subroutine entries containing the
1497 \livelink{chap:DWATspecification}{DW\-\_AT\-\_specification} attribute
1498 \addtoindexx{specification attribute}
1499 do not need to duplicate information provided
1500 by the declaration entry referenced by the specification
1501 attribute. In particular, such entries do not need to contain
1502 attributes for the name or return type of the function member
1503 whose definition they represent.
1505 \subsection{Class Template Instantiations}
1506 \label{chap:classtemplateinstantiations}
1508 \textit{In \addtoindex{C++} a class template is a generic definition of a class
1509 type that may be instantiated when an instance of the class
1510 is declared or defined. The generic description of the
1511 class may include both parameterized types and parameterized
1512 constant values. DWARF does not represent the generic template
1513 definition, but does represent each instantiation.}
1515 A class template instantiation is represented by a
1516 debugging information entry with the tag \livelink{chap:DWTAGclasstype}{DW\-\_TAG\-\_class\-\_type},
1517 \livelink{chap:DWTAGstructuretype}{DW\-\_TAG\-\_structure\-\_type} or
1518 \livelink{chap:DWTAGuniontype}{DW\-\_TAG\-\_union\-\_type}. With five
1519 exceptions, such an entry will contain the same attributes
1520 and have the same types of child entries as would an entry
1521 for a class type defined explicitly using the instantiation
1522 types and values. The exceptions are:
1524 \begin{enumerate}[1.]
1525 \item Each formal parameterized type declaration appearing in the
1526 template definition is represented by a debugging information
1528 \livelink{chap:DWTAGtemplatetypeparameter}{DW\-\_TAG\-\_template\-\_type\-\_parameter}. Each
1529 such entry may have a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
1530 \addtoindexx{name attribute}
1532 a null\dash terminated string containing the name of the formal
1533 type parameter as it appears in the source program. The
1534 template type parameter entry also has
1535 \addtoindexx{type attribute}
1537 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute
1538 describing the actual type by which the formal is replaced
1539 for this instantiation.
1541 \item Each formal parameterized value declaration appearing in the
1542 template definition is represented by a
1543 debugging information entry with the
1544 \addtoindexx{template value parameter entry}
1545 tag \livetarg{chap:DWTAGtemplatevalueparameter}{DW\-\_TAG\-\_template\-\_value\-\_parameter}.
1547 such entry may have a
1548 \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
1549 \addtoindexx{name attribute}
1551 a null\dash terminated string containing the name of the formal
1552 value parameter as it appears in the source program.
1554 \hypertarget{chap:DWATconstvaluetemplatevalueparameter}
1555 template value parameter entry
1556 \addtoindexx{template value parameter entry}
1558 \addtoindexx{type attribute}
1560 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute
1561 describing the type of the parameterized value. Finally,
1562 the template value parameter entry has a
1563 \livelink{chap:DWATconstvalue}{DW\-\_AT\-\_const\-\_value}
1564 attribute, whose value is the actual constant value of the
1565 value parameter for this instantiation as represented on the
1566 target architecture.
1568 \item The class type entry and each of its child entries references
1569 a \addtoindex{template type parameter entry} in any circumstance where the
1570 source template definition references a formal parameterized
1572 Similarly, the class type entry and each of its child
1573 entries references a template value parameter entry in any
1574 circumstance where the source template definition references
1575 a formal parameterized value.
1577 \item If the compiler has generated a special compilation unit to
1579 \addtoindexx{template instantiation!and special compilation unit}
1580 template instantiation and that special compilation
1581 unit has a different name from the compilation unit containing
1582 the template definition, the name attribute for the debugging
1583 information entry representing the special compilation unit
1584 should be empty or omitted.
1586 \item If the class type entry representing the template
1587 instantiation or any of its child entries contains declaration
1588 coordinate attributes, those attributes should refer to
1589 the source for the template definition, not to any source
1590 generated artificially by the compiler.
1594 \subsection{Variant Entries}
1595 \label{chap:variantentries}
1597 A variant part of a structure is represented by a debugging
1598 information entry\addtoindexx{variant part entry} with the
1599 tag \livetarg{chap:DWTAGvariantpart}{DW\-\_TAG\-\_variant\-\_part} and is
1600 owned by the corresponding structure type entry.
1602 If the variant part has a discriminant, the discriminant is
1603 \hypertarget{chap:DWATdiscrdiscriminantofvariantpart}
1605 \addtoindexx{discriminant (entry)}
1606 separate debugging information entry which
1607 is a child of the variant part entry. This entry has the form
1609 \addtoindexx{member entry (data)!as discriminant}
1610 structure data member entry. The variant part entry will
1611 \addtoindexx{discriminant attribute}
1613 \livelink{chap:DWATdiscr}{DW\-\_AT\-\_discr} attribute
1614 whose value is a reference to
1615 the member entry for the discriminant.
1617 If the variant part does not have a discriminant (tag field),
1618 the variant part entry has
1619 \addtoindexx{type attribute}
1621 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute to represent
1624 Each variant of a particular variant part is represented by
1625 \hypertarget{chap:DWATdiscrvaluediscriminantvalue}
1626 a debugging information entry\addtoindexx{variant entry} with the
1627 tag \livetarg{chap:DWTAGvariant}{DW\-\_TAG\-\_variant}
1628 and is a child of the variant part entry. The value that
1629 selects a given variant may be represented in one of three
1630 ways. The variant entry may have a
1631 \livelink{chap:DWATdiscrvalue}{DW\-\_AT\-\_discr\-\_value} attribute
1632 whose value represents a single case label. The value of this
1633 attribute is encoded as an LEB128 number. The number is signed
1634 if the tag type for the variant part containing this variant
1635 is a signed type. The number is unsigned if the tag type is
1639 \hypertarget{chap:DWATdiscrlistlistofdiscriminantvalues}
1640 the variant entry may contain
1641 \addtoindexx{discriminant list attribute}
1643 \livelink{chap:DWATdiscrlist}{DW\-\_AT\-\_discr\-\_list}
1644 attribute, whose value represents a list of discriminant
1645 values. This list is represented by any of the
1646 \livelink{chap:block}{block} forms and
1647 may contain a mixture of case labels and label ranges. Each
1648 item on the list is prefixed with a discriminant value
1649 descriptor that determines whether the list item represents
1650 a single label or a label range. A single case label is
1651 represented as an LEB128 number as defined above for
1652 \addtoindexx{discriminant value attribute}
1654 \livelink{chap:DWATdiscrvalue}{DW\-\_AT\-\_discr\-\_value}
1655 attribute. A label range is represented by
1656 two LEB128 numbers, the low value of the range followed by the
1657 high value. Both values follow the rules for signedness just
1658 described. The discriminant value descriptor is an integer
1659 constant that may have one of the values given in
1660 Figure \refersec{fig:discriminantdescriptorvalues}.
1662 \begin{figure}[here]
1663 \autorows[0pt]{c}{1}{l}{
1664 \addtoindex{DW\-\_DSC\-\_label},
1665 \addtoindex{DW\-\_DSC\-\_range}
1667 \caption{Discriminant descriptor values}\label{fig:discriminantdescriptorvalues}
1670 If a variant entry has neither a \livelink{chap:DWATdiscrvalue}{DW\-\_AT\-\_discr\-\_value}
1671 attribute nor a \livelink{chap:DWATdiscrlist}{DW\-\_AT\-\_discr\-\_list} attribute, or if it has
1672 a \livelink{chap:DWATdiscrlist}{DW\-\_AT\-\_discr\-\_list} attribute with 0 size, the variant is a
1675 The components selected by a particular variant are represented
1676 by debugging information entries owned by the corresponding
1677 variant entry and appear in the same order as the corresponding
1678 declarations in the source program.
1680 \section{Condition Entries}
1681 \label{chap:conditionentries}
1683 \textit{COBOL has the notion of
1684 \addtoindexx{level-88 condition, COBOL}
1685 a ``level\dash 88 condition'' that
1686 associates a data item, called the conditional variable, with
1687 a set of one or more constant values and/or value ranges.
1688 Semantically, the condition is ‛true’ if the conditional
1689 variable's value matches any of the described constants,
1690 and the condition is ‛false’ otherwise.}
1692 The \livetarg{chap:DWTAGcondition}{DW\-\_TAG\-\_condition}
1693 debugging information entry\addtoindexx{condition entry}
1695 logical condition that tests whether a given data item’s
1696 value matches one of a set of constant values. If a name
1697 has been given to the condition, the condition entry has a
1698 \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
1699 \addtoindexx{name attribute}
1700 whose value is a null\dash terminated string
1701 giving the condition name as it appears in the source program.
1703 The condition entry's parent entry describes the conditional
1704 variable; normally this will be a \livelink{chap:DWTAGvariable}{DW\-\_TAG\-\_variable},
1705 \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member} or
1706 \livelink{chap:DWTAGformalparameter}{DW\-\_TAG\-\_formal\-\_parameter} entry.
1708 \addtoindexx{formal parameter entry}
1710 entry has an array type, the condition can test any individual
1711 element, but not the array as a whole. The condition entry
1712 implicitly specifies a “comparison type” that is the
1713 type of an array element if the parent has an array type;
1714 otherwise it is the type of the parent entry.
1716 The condition entry owns \livelink{chap:DWTAGconstant}{DW\-\_TAG\-\_constant} and/or
1717 \livelink{chap:DWTAGsubrangetype}{DW\-\_TAG\-\_subrange\-\_type} entries that describe the constant
1718 values associated with the condition. If any child entry
1719 \addtoindexx{type attribute}
1721 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute,
1722 that attribute should describe a type
1723 compatible with the comparison type (according to the source
1724 language); otherwise the child’s type is the same as the
1727 \textit{For conditional variables with alphanumeric types, COBOL
1728 permits a source program to provide ranges of alphanumeric
1729 constants in the condition. Normally a subrange type entry
1730 does not describe ranges of strings; however, this can be
1731 represented using bounds attributes that are references to
1732 constant entries describing strings. A subrange type entry may
1733 refer to constant entries that are siblings of the subrange
1737 \section{Enumeration Type Entries}
1738 \label{chap:enumerationtypeentries}
1740 \textit{An “enumeration type” is a scalar that can assume one of
1741 a fixed number of symbolic values.}
1743 An enumeration type is represented by a debugging information
1745 \livetarg{chap:DWTAGenumerationtype}{DW\-\_TAG\-\_enumeration\-\_type}.
1747 If a name has been given to the enumeration type in the source
1748 program, then the corresponding enumeration type entry has
1749 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
1750 \addtoindexx{name attribute}
1751 whose value is a null\dash terminated
1752 string containing the enumeration type name as it appears
1753 in the source program. This entry also has a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size}
1754 attribute whose integer constant value is the number of bytes
1755 required to hold an instance of the enumeration.
1757 The \addtoindex{enumeration type entry}
1759 \addtoindexx{type attribute}
1760 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute
1761 which refers to the underlying data type used to implement
1764 If an enumeration type has type safe
1765 \addtoindexx{type safe enumeration types}
1768 \begin{enumerate}[1.]
1769 \item Enumerators are contained in the scope of the enumeration type, and/or
1771 \item Enumerators are not implicitly converted to another type
1774 then the \addtoindex{enumeration type entry} may
1775 \addtoindexx{enum class|see{type-safe enumeration}}
1776 have a \livelink{chap:DWATenumclass}{DW\-\_AT\-\_enum\-\_class}
1777 attribute, which is a \livelink{chap:flag}{flag}.
1778 In a language that offers only
1779 one kind of enumeration declaration, this attribute is not
1782 \textit{In \addtoindex{C} or \addtoindex{C++},
1783 the underlying type will be the appropriate
1784 integral type determined by the compiler from the properties of
1785 \hypertarget{chap:DWATenumclasstypesafeenumerationdefinition}
1786 the enumeration literal values.
1787 A \addtoindex{C++} type declaration written
1788 using enum class declares a strongly typed enumeration and
1789 is represented using \livelink{chap:DWTAGenumerationtype}{DW\-\_TAG\-\_enumeration\-\_type}
1790 in combination with \livelink{chap:DWATenumclass}{DW\-\_AT\-\_enum\-\_class}.}
1792 Each enumeration literal is represented by a debugging
1793 \addtoindexx{enumeration literal|see{enumeration entry}}
1794 information entry with the
1795 tag \livetarg{chap:DWTAGenumerator}{DW\-\_TAG\-\_enumerator}.
1797 such entry is a child of the
1798 \addtoindex{enumeration type entry}, and the
1799 enumerator entries appear in the same order as the declarations
1800 of the enumeration literals in the source program.
1802 Each \addtoindex{enumerator entry} has a
1803 \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute, whose
1804 \addtoindexx{name attribute}
1805 value is a null\dash terminated string containing the name of the
1806 \hypertarget{chap:DWATconstvalueenumerationliteralvalue}
1807 enumeration literal as it appears in the source program.
1808 Each enumerator entry also has a
1809 \livelink{chap:DWATconstvalue}{DW\-\_AT\-\_const\-\_value} attribute,
1810 whose value is the actual numeric value of the enumerator as
1811 represented on the target system.
1814 If the enumeration type occurs as the description of a
1815 \addtoindexx{enumeration type endry!as array dimension}
1816 dimension of an array type, and the stride for that dimension
1817 \hypertarget{chap:DWATbytestrideenumerationstridedimensionofarraytype}
1818 is different than what would otherwise be determined, then
1819 \hypertarget{chap:DWATbitstrideenumerationstridedimensionofarraytype}
1820 the enumeration type entry has either a
1821 \livelink{chap:DWATbytestride}{DW\-\_AT\-\_byte\-\_stride}
1822 or \livelink{chap:DWATbitstride}{DW\-\_AT\-\_bit\-\_stride} attribute
1823 \addtoindexx{bit stride attribute}
1824 which specifies the separation
1825 between successive elements along the dimension as described
1827 Section \refersec{chap:visibilityofdeclarations}.
1829 \livelink{chap:DWATbitstride}{DW\-\_AT\-\_bit\-\_stride} attribute
1830 \addtoindexx{bit stride attribute}
1831 is interpreted as bits and the value of
1832 \addtoindexx{byte stride attribute}
1834 \livelink{chap:DWATbytestride}{DW\-\_AT\-\_byte\-\_stride}
1835 attribute is interpreted as bytes.
1838 \section{Subroutine Type Entries}
1839 \label{chap:subroutinetypeentries}
1841 It is possible in \addtoindex{C}
1842 to declare pointers to subroutines
1843 that return a value of a specific type. In both
1844 \addtoindex{C} and \addtoindex{C++},
1845 it is possible to declare pointers to subroutines that not
1846 only return a value of a specific type, but accept only
1847 arguments of specific types. The type of such pointers would
1848 be described with a ``pointer to'' modifier applied to a
1849 user\dash defined type.
1851 A subroutine type is represented by a debugging information
1853 \addtoindexx{subroutine type entry}
1854 tag \livetarg{chap:DWTAGsubroutinetype}{DW\-\_TAG\-\_subroutine\-\_type}.
1856 been given to the subroutine type in the source program,
1857 then the corresponding subroutine type entry has
1858 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
1859 \addtoindexx{name attribute}
1860 whose value is a null\dash terminated string containing
1861 the subroutine type name as it appears in the source program.
1863 If the subroutine type describes a function that returns
1864 a value, then the subroutine type entry has
1865 \addtoindexx{type attribute}
1866 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type}
1867 attribute to denote the type returned by the subroutine. If
1868 the types of the arguments are necessary to describe the
1869 subroutine type, then the corresponding subroutine type
1870 entry owns debugging information entries that describe the
1871 arguments. These debugging information entries appear in the
1872 order that the corresponding argument types appear in the
1875 In \addtoindex{C} there
1876 is a difference between the types of functions
1877 declared using function prototype style declarations and
1878 those declared using non\dash prototype declarations.
1881 \hypertarget{chap:DWATprototypedsubroutineprototype}
1882 subroutine entry declared with a function prototype style
1883 declaration may have
1884 \addtoindexx{prototyped attribute}
1886 \livelink{chap:DWATprototyped}{DW\-\_AT\-\_prototyped} attribute, which is
1887 a \livelink{chap:flag}{flag}.
1889 Each debugging information entry owned by a subroutine
1890 type entry has a tag whose value has one of two possible
1893 \begin{enumerate}[1.]
1894 \item The formal parameters of a parameter list (that have a
1895 specific type) are represented by a debugging information entry
1896 with the tag \livelink{chap:DWTAGformalparameter}{DW\-\_TAG\-\_formal\-\_parameter}.
1897 Each formal parameter
1899 \addtoindexx{type attribute}
1900 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute that refers to the type of
1901 the formal parameter.
1903 \item The unspecified parameters of a variable parameter list
1904 \addtoindexx{unspecified parameters entry}
1906 \addtoindexx{... parameters|see{unspecified parameters entry}}
1907 represented by a debugging information entry with the
1908 tag \livelink{chap:DWTAGunspecifiedparameters}{DW\-\_TAG\-\_unspecified\-\_parameters}.
1913 \section{String Type Entries}
1914 \label{chap:stringtypeentries}
1917 A ``string'' is a sequence of characters that have specific
1918 \addtoindexx{string type entry}
1919 semantics and operations that separate them from arrays of
1921 \addtoindex{Fortran} is one of the languages that has a string
1922 type. Note that ``string'' in this context refers to a target
1923 machine concept, not the class string as used in this document
1924 (except for the name attribute).
1926 A string type is represented by a debugging information entry
1927 with the tag \livetarg{chap:DWTAGstringtype}{DW\-\_TAG\-\_string\-\_type}.
1928 If a name has been given to
1929 the string type in the source program, then the corresponding
1930 string type entry has a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
1931 \addtoindexx{name attribute}
1933 a null\dash terminated string containing the string type name as
1934 it appears in the source program.
1937 \hypertarget{chap:DWATstringlengthstringlengthofstringtype}
1938 string type entry may have a
1939 \livelink{chap:DWATstringlength}{DW\-\_AT\-\_string\-\_length} attribute
1941 \addtoindexx{string length attribute}
1943 \addtoindex{location description} yielding the location
1944 where the length of the string is stored in the program. The
1945 string type entry may also have a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} attribute
1946 or \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attribute, whose value
1947 (see Section \refersec{chap:byteandbitsizes})
1948 is the size of the data to be retrieved from the location
1949 referenced by the string length attribute. If no (byte or bit)
1950 size attribute is present, the size of the data to be retrieved
1952 \addtoindex{size of an address} on the target machine.
1954 If no string length attribute is present, the string type
1955 entry may have a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} attribute or
1956 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size}
1957 attribute, whose value
1958 (see Section \refersec{chap:byteandbitsizes})
1960 storage needed to hold a value of the string type.
1963 \section{Set Type Entries}
1964 \label{chap:settypeentries}
1966 \textit{\addtoindex{Pascal} provides the concept of a “set,” which represents
1967 a group of values of ordinal type.}
1969 A set is represented by a debugging information entry with
1970 the tag \livetarg{chap:DWTAGsettype}{DW\-\_TAG\-\_set\-\_type}.
1971 \addtoindexx{set type entry}
1972 If a name has been given to the
1973 set type, then the set type entry has
1974 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
1975 \addtoindexx{name attribute}
1976 whose value is a null\dash terminated string containing the
1977 set type name as it appears in the source program.
1979 The set type entry has
1980 \addtoindexx{type attribute}
1981 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute to denote the
1982 type of an element of the set.
1984 If the amount of storage allocated to hold each element of an
1985 object of the given set type is different from the amount of
1986 storage that is normally allocated to hold an individual object
1987 of the indicated element type, then the set type entry has
1988 either a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} attribute, or
1989 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attribute
1990 whose value (see Section \refersec{chap:byteandbitsizes}) is
1991 the amount of storage needed to hold a value of the set type.
1994 \section{Subrange Type Entries}
1995 \label{chap:subrangetypeentries}
1997 \textit{Several languages support the concept of a ``subrange''
1998 type object. These objects can represent a subset of the
1999 values that an object of the basis type for the subrange can
2001 Subrange type entries may also be used to represent
2002 the bounds of array dimensions.}
2004 A subrange type is represented by a debugging information
2006 \addtoindexx{subrange type entry}
2007 tag \livetarg{chap:DWTAGsubrangetype}{DW\-\_TAG\-\_subrange\-\_type}.
2009 given to the subrange type, then the subrange type entry
2010 has a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
2011 \addtoindexx{name attribute}
2012 whose value is a null\dash terminated
2013 string containing the subrange type name as it appears in
2016 The subrange entry may have
2017 \addtoindexx{type attribute}
2018 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute to describe
2019 the type of object, called the basis type, of whose values
2020 this subrange is a subset.
2022 If the amount of storage allocated to hold each element of an
2023 object of the given subrange type is different from the amount
2024 of storage that is normally allocated to hold an individual
2025 object of the indicated element type, then the subrange
2027 \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} attribute or
2028 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size}
2029 attribute, whose value
2030 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
2032 storage needed to hold a value of the subrange type.
2035 \hypertarget{chap:DWATthreadsscaledupcarrayboundthreadsscalfactor}
2036 subrange entry may have
2037 \addtoindexx{threads scaled attribute}
2039 \livelink{chap:DWATthreadsscaled}{DW\-\_AT\-\_threads\-\_scaled} attribute,
2040 which is a \livelink{chap:flag}{flag}.
2041 If present, this attribute indicates whether
2042 this subrange represents a \addtoindex{UPC} array bound which is scaled
2043 by the runtime THREADS value (the number of UPC threads in
2044 this execution of the program).
2046 \textit{This allows the representation of a \addtoindex{UPC} shared array such as}
2049 int shared foo[34*THREADS][10][20];
2053 \hypertarget{chap:DWATlowerboundlowerboundofsubrange}
2055 \hypertarget{chap:DWATupperboundupperboundofsubrange}
2056 entry may have the attributes
2057 \livelink{chap:DWATlowerbound}{DW\-\_AT\-\_lower\-\_bound}
2058 \addtoindexx{lower bound attribute}
2059 and \livelink{chap:DWATupperbound}{DW\-\_AT\-\_upper\-\_bound}
2060 \addtoindexx{upper bound attribute} to specify, respectively, the lower
2061 and upper bound values of the subrange. The
2062 \livelink{chap:DWATupperbound}{DW\-\_AT\-\_upper\-\_bound}
2064 \hypertarget{chap:DWATcountelementsofsubrangetype}
2066 % FIXME: The following matches DWARF4: odd as there is no default count.
2067 \addtoindexx{count attribute!default}
2069 \addtoindexx{count attribute}
2071 \livelink{chap:DWATcount}{DW\-\_AT\-\_count} attribute,
2073 value describes the number of elements in the subrange rather
2074 than the value of the last element. The value of each of
2075 these attributes is determined as described in
2076 Section \refersec{chap:staticanddynamicvaluesofattributes}.
2078 If the lower bound value is missing, the value is assumed to
2079 be a language\dash dependent default constant.
2080 \addtoindexx{lower bound attribute!default}
2081 The default lower bound is 0 for
2082 \addtoindex{C}, \addtoindex{C++},
2085 \addtoindex{Objective C},
2086 \addtoindex{Objective C++},
2087 \addtoindex{Python}, and
2089 The default lower bound is 1 for
2090 \addtoindex{Ada}, \addtoindex{COBOL},
2091 \addtoindex{Fortran},
2092 \addtoindex{Modula-2},
2093 \addtoindex{Pascal} and
2096 \textit{No other default lower bound values are currently defined.}
2098 If the upper bound and count are missing, then the upper bound value is
2099 \textit{unknown}.\addtoindexx{upper bound attribute!default unknown}
2101 If the subrange entry has no type attribute describing the
2102 basis type, the basis type is assumed to be the same as
2103 the object described by the lower bound attribute (if it
2104 references an object). If there is no lower bound attribute,
2105 or that attribute does not reference an object, the basis type
2106 is the type of the upper bound or \addtoindex{count attribute}
2108 of them references an object). If there is no upper bound or
2109 count attribute, or neither references an object, the type is
2110 assumed to be the same type, in the source language of the
2111 compilation unit containing the subrange entry, as a signed
2112 integer with the same size as an address on the target machine.
2114 If the subrange type occurs as the description of a dimension
2115 of an array type, and the stride for that dimension is
2116 \hypertarget{chap:DWATbytestridesubrangestridedimensionofarraytype}
2117 different than what would otherwise be determined, then
2118 \hypertarget{chap:DWATbitstridesubrangestridedimensionofarraytype}
2119 the subrange type entry has either
2120 \addtoindexx{byte stride attribute}
2122 \livelink{chap:DWATbytestride}{DW\-\_AT\-\_byte\-\_stride} or
2123 \livelink{chap:DWATbitstride}{DW\-\_AT\-\_bit\-\_stride} attribute
2124 \addtoindexx{bit stride attribute}
2125 which specifies the separation
2126 between successive elements along the dimension as described
2128 Section \refersec{chap:byteandbitsizes}.
2130 \textit{Note that the stride can be negative.}
2132 \section{Pointer to Member Type Entries}
2133 \label{chap:pointertomembertypeentries}
2135 \textit{In \addtoindex{C++}, a
2136 pointer to a data or function member of a class or
2137 structure is a unique type.}
2139 A debugging information entry representing the type of an
2140 object that is a pointer to a structure or class member has
2141 the tag \livetarg{chap:DWTAGptrtomembertype}{DW\-\_TAG\-\_ptr\-\_to\-\_member\-\_type}.
2143 If the \addtoindex{pointer to member type} has a name, the
2144 \addtoindexx{pointer to member type entry}
2145 pointer to member entry has a
2146 \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
2147 \addtoindexx{name attribute}
2149 null\dash terminated string containing the type name as it appears
2150 in the source program.
2152 The \addtoindex{pointer to member} entry
2154 \addtoindexx{type attribute}
2155 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute to
2156 describe the type of the class or structure member to which
2157 objects of this type may point.
2159 The \addtoindex{pointer to member} entry also
2160 \hypertarget{chap:DWATcontainingtypecontainingtypeofpointertomembertype}
2162 \livelink{chap:DWATcontainingtype}{DW\-\_AT\-\_containing\-\_type}
2163 attribute, whose value is a reference to a debugging
2164 information entry for the class or structure to whose members
2165 objects of this type may point.
2168 \hypertarget{chap:DWATuselocationmemberlocationforpointertomembertype}
2170 \addtoindex{pointer to member entry}
2172 \livelink{chap:DWATuselocation}{DW\-\_AT\-\_use\-\_location} attribute
2173 \addtoindexx{use location attribute}
2175 \addtoindex{location description} that computes the
2176 address of the member of the class to which the pointer to
2177 member entry points.
2179 \textit{The method used to find the address of a given member of a
2180 class or structure is common to any instance of that class
2181 or structure and to any instance of the pointer or member
2182 type. The method is thus associated with the type entry,
2183 rather than with each instance of the type.}
2185 The \livelink{chap:DWATuselocation}{DW\-\_AT\-\_use\-\_location} description is used in conjunction
2186 with the location descriptions for a particular object of the
2187 given \addtoindex{pointer to member type} and for a particular structure or
2188 class instance. The \livelink{chap:DWATuselocation}{DW\-\_AT\-\_use\-\_location}
2189 attribute expects two values to be
2190 \addtoindexi{pushed}{address!implicit push for member operator}
2191 onto the DWARF expression stack before
2192 the \livelink{chap:DWATuselocation}{DW\-\_AT\-\_use\-\_location} description is evaluated.
2194 \addtoindexi{pushed}{address!implicit push for member operator}
2195 is the value of the \addtoindex{pointer to member} object
2196 itself. The second value
2197 \addtoindexi{pushed}{address!implicit push for member operator}
2198 is the base address of the
2199 entire structure or union instance containing the member
2200 whose address is being calculated.
2202 \textit{For an expression such as}
2207 % FIXME: object and mbr\_ptr should be distinguished from italic. See DW4.
2208 \textit{where mbr\_ptr has some \addtoindex{pointer to member type}, a debugger should:}
2210 \textit{1. Push the value of mbr\_ptr onto the DWARF expression stack.}
2212 \textit{2. Push the base address of object onto the DWARF expression stack.}
2214 \textit{3. Evaluate the \livelink{chap:DWATuselocation}{DW\-\_AT\-\_use\-\_location} description
2215 given in the type of mbr\_ptr.}
2217 \section{File Type Entries}
2218 \label{chap:filetypeentries}
2220 \textit{Some languages, such as \addtoindex{Pascal},
2221 provide a data type to represent
2224 A file type is represented by a debugging information entry
2226 \addtoindexx{file type entry}
2228 \livetarg{chap:DWTAGfiletype}{DW\-\_TAG\-\_file\-\_type}.
2229 If the file type has a name,
2230 the file type entry has a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
2231 \addtoindexx{name attribute}
2233 is a null\dash terminated string containing the type name as it
2234 appears in the source program.
2236 The file type entry has
2237 \addtoindexx{type attribute}
2238 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute describing
2239 the type of the objects contained in the file.
2241 The file type entry also
2242 \addtoindexx{byte size}
2244 \addtoindexx{bit size}
2246 \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} or
2247 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attribute, whose value
2248 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
2249 is the amount of storage need to hold a value of the file type.
2251 \section{Dynamic Type Properties}
2252 \label{chap:dynamictypeproperties}
2253 \subsection{Data Location}
2254 \label{chap:datalocation}
2256 \textit{Some languages may represent objects using descriptors to hold
2257 information, including a location and/or run\dash time parameters,
2258 about the data that represents the value for that object.}
2260 \hypertarget{chap:DWATdatalocationindirectiontoactualdata}
2261 The \livelink{chap:DWATdatalocation}{DW\-\_AT\-\_data\-\_location}
2262 attribute may be used with any
2263 \addtoindexx{data location attribute}
2264 type that provides one or more levels of
2265 \addtoindexx{hidden indirection|see{data location attribute}}
2267 and/or run\dash time parameters in its representation. Its value
2268 is a \addtoindex{location description}.
2269 The result of evaluating this
2270 description yields the location of the data for an object.
2271 When this attribute is omitted, the address of the data is
2272 the same as the address of the object.
2274 \textit{This location description will typically begin with
2275 \livelink{chap:DWOPpushobjectaddress}{DW\-\_OP\-\_push\-\_object\-\_address}
2276 which loads the address of the
2277 object which can then serve as a descriptor in subsequent
2278 calculation. For an example using
2279 \livelink{chap:DWATdatalocation}{DW\-\_AT\-\_data\-\_location}
2280 for a \addtoindex{Fortran 90 array}, see
2281 Appendix \refersec{app:fortran90example}.}
2283 \subsection{Allocation and Association Status}
2284 \label{chap:allocationandassociationstatus}
2286 \textit{Some languages, such as \addtoindex{Fortran 90},
2287 provide types whose values
2288 may be dynamically allocated or associated with a variable
2289 under explicit program control.}
2291 \hypertarget{chap:DWATallocatedallocationstatusoftypes}
2293 \livelink{chap:DWATallocated}{DW\-\_AT\-\_allocated}
2295 \addtoindexx{allocated attribute}
2296 may optionally be used with any
2297 type for which objects of the type can be explicitly allocated
2298 and deallocated. The presence of the attribute indicates that
2299 objects of the type are allocatable and deallocatable. The
2300 integer value of the attribute (see below) specifies whether
2301 an object of the type is
2302 currently allocated or not.
2304 \hypertarget{chap:DWATassociatedassociationstatusoftypes}
2306 \livelink{chap:DWATassociated}{DW\-\_AT\-\_associated} attribute
2308 \addtoindexx{associated attribute}
2309 optionally be used with
2310 any type for which objects of the type can be dynamically
2311 associated with other objects. The presence of the attribute
2312 indicates that objects of the type can be associated. The
2313 integer value of the attribute (see below) indicates whether
2314 an object of the type is currently associated or not.
2316 While these attributes are defined specifically with
2317 \addtoindex{Fortran 90} ALLOCATABLE and POINTER types
2318 in mind, usage is not limited
2319 to just that language.
2321 The value of these attributes is determined as described in
2322 Section \refersec{chap:staticanddynamicvaluesofattributes}.
2324 A non\dash zero value is interpreted as allocated or associated,
2325 and zero is interpreted as not allocated or not associated.
2327 \textit{For \addtoindex{Fortran 90},
2328 if the \livelink{chap:DWATassociated}{DW\-\_AT\-\_associated}
2329 attribute is present,
2330 the type has the POINTER property where either the parent
2331 variable is never associated with a dynamic object or the
2332 implementation does not track whether the associated object
2333 is static or dynamic. If the \livelink{chap:DWATallocated}{DW\-\_AT\-\_allocated} attribute is
2334 present and the \livelink{chap:DWATassociated}{DW\-\_AT\-\_associated} attribute is not, the type
2335 has the ALLOCATABLE property. If both attributes are present,
2336 then the type should be assumed to have the POINTER property
2337 (and not ALLOCATABLE); the \livelink{chap:DWATallocated}{DW\-\_AT\-\_allocated} attribute may then
2338 be used to indicate that the association status of the object
2339 resulted from execution of an ALLOCATE statement rather than
2340 pointer assignment.}
2342 \textit{For examples using
2343 \livelink{chap:DWATallocated}{DW\-\_AT\-\_allocated} for \addtoindex{Ada} and
2344 \addtoindex{Fortran 90}
2346 see Appendix \refersec{app:aggregateexamples}.}
2350 \section{Template Alias Entries}
2351 \label{chap:templatealiasentries}
2353 A type named using a template alias is represented
2354 by a debugging information entry
2355 \addtoindexx{template alias entry}
2357 \livetarg{chap:DWTAGtemplatealias}{DW\-\_TAG\-\_template\-\_alias}.
2358 The template alias entry has a
2359 \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
2360 \addtoindexx{name attribute}
2361 whose value is a null\dash terminated string
2362 containing the name of the template alias as it appears in
2363 the source program. The template alias entry also contains
2364 \addtoindexx{type attribute}
2366 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute
2367 whose value is a reference to the type
2368 named by the template alias. The template alias entry has
2369 the following child entries:
2371 \begin{enumerate}[1.]
2372 \item Each formal parameterized type declaration appearing
2373 in the template alias declaration is represented
2374 by a debugging information entry with the tag
2375 \livelink{chap:DWTAGtemplatetypeparameter}{DW\-\_TAG\-\_template\-\_type\-\_parameter}.
2376 Each such entry may have
2377 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
2378 \addtoindexx{name attribute}
2379 whose value is a null\dash terminated
2380 string containing the name of the formal type parameter as it
2381 appears in the source program. The template type parameter
2383 \addtoindexx{type attribute}
2384 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute
2385 describing the actual
2386 type by which the formal is replaced for this instantiation.
2388 \item Each formal parameterized value declaration
2389 appearing in the template alias declaration is
2390 represented by a debugging information entry with the tag
2391 \livelink{chap:DWTAGtemplatevalueparameter}{DW\-\_TAG\-\_template\-\_value\-\_parameter}.
2392 Each such entry may have
2393 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
2394 \addtoindexx{name attribute}
2395 whose value is a null\dash terminated
2396 string containing the name of the formal value parameter
2397 as it appears in the source program. The template value
2398 parameter entry also has
2399 \addtoindexx{type attribute}
2400 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute describing
2401 the type of the parameterized value. Finally, the template
2402 value parameter entry has a \livelink{chap:DWATconstvalue}{DW\-\_AT\-\_const\-\_value}
2403 attribute, whose value is the actual constant value of the value parameter for
2404 this instantiation as represented on the target architecture.