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} & 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 Unicode string
213 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}&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;
547 which represents a volatile pointer to a constant
548 character. This is encoded in DWARF as:
549 \livelink{chap:DWTAGvariable}{DW\-\_TAG\-\_variable}(p) -->
550 \livelink{chap:DWTAGvolatiletype}{DW\-\_TAG\-\_volatile\-\_type} -->
551 \livelink{chap:DWTAGpointertype}{DW\-\_TAG\-\_pointer\-\_type} -->
552 \livelink{chap:DWTAGconsttype}{DW\-\_TAG\-\_const\-\_type} -->
553 \livelink{chap:DWTAGbasetype}{DW\-\_TAG\-\_base\-\_type}(unsigned char)
555 volatile unsigned char * const restrict p;
556 on the other hand, represents a restricted constant
557 pointer to a volatile character. This is encoded as:
558 \livelink{chap:DWTAGvariable}{DW\-\_TAG\-\_variable}(p) -->
559 \livelink{chap:DWTAGrestricttype}{DW\-\_TAG\-\_restrict\-\_type} -->
560 \livelink{chap:DWTAGconsttype}{DW\-\_TAG\-\_const\-\_type} -->
561 \livelink{chap:DWTAGpointertype}{DW\-\_TAG\-\_pointer\-\_type} -->
562 \livelink{chap:DWTAGvolatiletype}{DW\-\_TAG\-\_volatile\-\_type} -->
563 \livelink{chap:DWTAGbasetype}{DW\-\_TAG\-\_base\-\_type}(unsigned char)
567 \section{Typedef Entries}
568 \label{chap:typedefentries}
569 A named type that is defined in terms of another type
570 definition is represented by a debugging information entry with
571 \addtoindexx{typedef entry}
572 the tag \livetarg{chap:DWTAGtypedef}{DW\-\_TAG\-\_typedef}.
573 The typedef entry has a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
574 \addtoindexx{name attribute}
575 whose value is a null\dash terminated string containing
576 the name of the typedef as it appears in the source program.
578 The typedef entry may also contain
579 \addtoindexx{type attribute}
581 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute whose
582 value is a reference to the type named by the typedef. If
583 the debugging information entry for a typedef represents
584 a declaration of the type that is not also a definition,
585 it does not contain a type attribute.
587 \textit{Depending on the language, a named type that is defined in
588 terms of another type may be called a type alias, a subtype,
589 a constrained type and other terms. A type name declared with
590 no defining details may be termed an
591 \addtoindexx{incomplete type}
592 incomplete, forward or hidden type.
593 While the DWARF \livelink{chap:DWTAGtypedef}{DW\-\_TAG\-\_typedef} entry was
594 originally inspired by the like named construct in
595 \addtoindex{C} and \addtoindex{C++},
596 it is broadly suitable for similar constructs (by whatever
597 source syntax) in other languages.}
599 \section{Array Type Entries}
600 \label{chap:arraytypeentries}
602 Many languages share the concept of an ``array,'' which is
603 \addtoindexx{array type entry}
604 a table of components of identical type.
606 An array type is represented by a debugging information entry
607 with the tag \livetarg{chap:DWTAGarraytype}{DW\-\_TAG\-\_array\-\_type}.
610 \addtoindexx{array!declaration of type}
611 the array type in the source program, then the corresponding
612 array type entry has a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
613 \addtoindexx{name attribute}
615 null\dash terminated string containing the array type name as it
616 appears in the source program.
619 \hypertarget{chap:DWATorderingarrayrowcolumnordering}
620 array type entry describing a multidimensional array may
621 \addtoindexx{array!element ordering}
622 have a \livelink{chap:DWATordering}{DW\-\_AT\-\_ordering} attribute whose integer constant value is
623 interpreted to mean either row-major or column-major ordering
624 of array elements. The set of values and their meanings
625 for the ordering attribute are listed in
626 Figure \refersec{fig:arrayordering}.
628 ordering attribute is present, the default ordering for the
629 source language (which is indicated by the
630 \livelink{chap:DWATlanguage}{DW\-\_AT\-\_language}
632 \addtoindexx{language attribute}
633 of the enclosing compilation unit entry) is assumed.
636 \autorows[0pt]{c}{1}{l}{
637 \livetarg{chap:DWORDcolmajor}{DW\-\_ORD\-\_col\-\_major},
638 \livetarg{chap:DWORDrowmajor}{DW\-\_ORD\-\_row\-\_major}
640 \caption{Array ordering}\label{fig:arrayordering}
643 The ordering attribute may optionally appear on one-dimensional
644 arrays; it will be ignored.
646 An array type entry has
647 \addtoindexx{type attribute}
648 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute
650 \addtoindexx{array!element type}
651 the type of each element of the array.
653 If the amount of storage allocated to hold each element of an
654 object of the given array type is different from the amount
655 \addtoindexx{stride attribute|see{bit stride attribute or byte stride attribute}}
656 of storage that is normally allocated to hold an individual
657 \hypertarget{chap:DWATbitstridearrayelementstrideofarraytype}
659 \hypertarget{chap:DWATbytestridearrayelementstrideofarraytype}
660 indicated element type, then the array type
661 \addtoindexx{bit stride attribute}
663 \livelink{chap:DWATbytestride}{DW\-\_AT\-\_byte\-\_stride}
665 \addtoindexx{byte stride attribute}
666 a \livelink{chap:DWATbitstride}{DW\-\_AT\-\_bit\-\_stride}
668 \addtoindexx{bit stride attribute}
670 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
672 element of the array.
674 The array type entry may have either a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} or a
675 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attribute
676 (see Section \refersec{chap:byteandbitsizes}),
678 amount of storage needed to hold an instance of the array type.
680 \textit{If the size of the array can be determined statically at
681 compile time, this value can usually be computed by multiplying
682 the number of array elements by the size of each element.}
685 Each array dimension is described by a debugging information
686 entry with either the
687 \addtoindexx{subrange type entry!as array dimension}
688 tag \livelink{chap:DWTAGsubrangetype}{DW\-\_TAG\-\_subrange\-\_type} or the
689 \addtoindexx{enumeration type entry!as array dimension}
691 \livelink{chap:DWTAGenumerationtype}{DW\-\_TAG\-\_enumeration\-\_type}. These entries are
693 array type entry and are ordered to reflect the appearance of
694 the dimensions in the source program (i.e., leftmost dimension
695 first, next to leftmost second, and so on).
697 In languages, such as C, in which there is no concept of
698 a “multidimensional array”, an array of arrays may
699 be represented by a debugging information entry for a
700 multidimensional array.
702 Other attributes especially applicable to arrays are
703 \livelink{chap:DWATallocated}{DW\-\_AT\-\_allocated},
704 \livelink{chap:DWATassociated}{DW\-\_AT\-\_associated} and
705 \livelink{chap:DWATdatalocation}{DW\-\_AT\-\_data\-\_location},
706 which are described in
707 Section \refersec{chap:dynamictypeproperties}.
708 For relevant examples,
710 Appendix \refersec{app:fortran90example}.
712 \section{ Structure, Union, Class and Interface Type Entries}
713 \label{chap:structureunionclassandinterfacetypeentries}
715 \textit{The languages
717 \addtoindex{C++}, and
718 \addtoindex{Pascal}, among others, allow the
719 programmer to define types that are collections of related
720 \addtoindexx{structure type entry}
722 In \addtoindex{C} and \addtoindex{C++}, these collections are called
724 In \addtoindex{Pascal}, they are called “records.”
725 The components may be of different types. The components are
726 called “members” in \addtoindex{C} and
727 \addtoindex{C++}, and “fields” in \addtoindex{Pascal}.}
729 \textit{The components of these collections each exist in their
730 own space in computer memory. The components of a C or C++
731 “union” all coexist in the same memory.}
733 \textit{\addtoindex{Pascal} and
734 other languages have a “discriminated union,”
735 \addtoindex{discriminated union|see {variant entry}}
736 also called a “variant record.” Here, selection of a
737 number of alternative substructures (“variants”) is based
738 on the value of a component that is not part of any of those
739 substructures (the “discriminant”).}
741 \textit{\addtoindex{C++} and
742 \addtoindex{Java} have the notion of ``class'', which is in some
743 ways similar to a structure. A class may have “member
744 functions” which are subroutines that are within the scope
745 of a class or structure.}
747 \textit{The \addtoindex{C++} notion of
748 structure is more general than in \addtoindex{C}, being
749 equivalent to a class with minor differences. Accordingly,
750 in the following discussion statements about
751 \addtoindex{C++} classes may
752 be understood to apply to \addtoindex{C++} structures as well.}
754 \subsection{Structure, Union and Class Type Entries}
755 \label{chap:structureunionandclasstypeentries}
758 Structure, union, and class types are represented by debugging
759 \addtoindexx{structure type entry}
761 \addtoindexx{union type entry}
763 \addtoindexx{class type entry}
765 \livetarg{chap:DWTAGstructuretype}{DW\-\_TAG\-\_structure\-\_type},
766 \livetarg{chap:DWTAGuniontype}{DW\-\_TAG\-\_union\-\_type},
767 and \livetarg{chap:DWTAGclasstype}{DW\-\_TAG\-\_class\-\_type},
768 respectively. If a name has been given to the structure,
769 union, or class in the source program, then the corresponding
770 structure type, union type, or class type entry has a
771 \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
772 \addtoindexx{name attribute}
773 whose value is a null\dash terminated string
774 containing the type name as it appears in the source program.
776 The members of a structure, union, or class are represented
777 by debugging information entries that are owned by the
778 corresponding structure type, union type, or class type entry
779 and appear in the same order as the corresponding declarations
780 in the source program.
782 A structure type, union type or class type entry may have
783 either a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} or a
784 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attribute
785 \hypertarget{chap:DWATbitsizedatamemberbitsize}
786 (see Section \refersec{chap:byteandbitsizes}),
787 whose value is the amount of storage needed
788 to hold an instance of the structure, union or class type,
789 including any padding.
790 An incomplete structure, union or class type
791 \addtoindexx{incomplete structure/union/class}
793 \addtoindexx{incomplete type}
794 represented by a structure, union or class
795 entry that does not have a byte size attribute and that has
796 \addtoindexx{declaration attribute}
797 a \livelink{chap:DWATdeclaration}{DW\-\_AT\-\_declaration} attribute.
799 If the complete declaration of a type has been placed in
800 \hypertarget{chap:DWATsignaturetypesignature}
801 a separate \addtoindex{type unit}
802 (see Section \refersec{chap:separatetypeunitentries}),
803 an incomplete declaration
804 \addtoindexx{incomplete type}
805 of that type in the compilation unit may provide
806 the unique 64\dash bit signature of the type using
807 \addtoindexx{type signature}
808 a \livelink{chap:DWATsignature}{DW\-\_AT\-\_signature}
811 If a structure, union or class entry represents the definition
812 of a structure, class or union member corresponding to a prior
813 incomplete structure, class or union, the entry may have a
814 \livelink{chap:DWATspecification}{DW\-\_AT\-\_specification} attribute
815 \addtoindexx{specification attribute}
816 whose value is a reference to
817 the debugging information entry representing that incomplete
820 Structure, union and class entries containing the
821 \livelink{chap:DWATspecification}{DW\-\_AT\-\_specification} attribute
822 \addtoindexx{specification attribute}
823 do not need to duplicate
824 information provided by the declaration entry referenced by the
825 specification attribute. In particular, such entries do not
826 need to contain an attribute for the name of the structure,
827 class or union they represent if such information is already
828 provided in the declaration.
830 \textit{For \addtoindex{C} and \addtoindex{C++},
832 \addtoindexx{data member|see {member entry (data)}}
833 member declarations occurring within
834 the declaration of a structure, union or class type are
835 considered to be “definitions” of those members, with
836 the exception of “static” data members, whose definitions
837 appear outside of the declaration of the enclosing structure,
838 union or class type. Function member declarations appearing
839 within a structure, union or class type declaration are
840 definitions only if the body of the function also appears
841 within the type declaration.}
843 If the definition for a given member of the structure, union
844 or class does not appear within the body of the declaration,
845 that member also has a debugging information entry describing
846 its definition. That latter entry has a
847 \livelink{chap:DWATspecification}{DW\-\_AT\-\_specification} attribute
848 \addtoindexx{specification attribute}
849 referencing the debugging information entry
850 owned by the body of the structure, union or class entry and
851 representing a non\dash defining declaration of the data, function
852 or type member. The referenced entry will not have information
853 about the location of that member (low and high pc attributes
854 for function members, location descriptions for data members)
855 and will have a \livelink{chap:DWATdeclaration}{DW\-\_AT\-\_declaration} attribute.
857 \textit{Consider a nested class whose
858 definition occurs outside of the containing class definition, as in:}
867 \textit{The two different structs can be described in
868 different compilation units to
869 facilitate DWARF space compression
870 (see Appendix \refersec{app:usingcompilationunits}).}
872 \subsection{Interface Type Entries}
873 \label{chap:interfacetypeentries}
875 \textit{The \addtoindex{Java} language defines ``interface'' types.
877 \addtoindex{interface type entry}
878 in \addtoindex{Java} is similar to a \addtoindex{C++} or
879 \addtoindex{Java} class with only abstract
880 methods and constant data members.}
883 \addtoindexx{interface type entry}
884 are represented by debugging information
886 tag \livetarg{chap:DWTAGinterfacetype}{DW\-\_TAG\-\_interface\-\_type}.
888 An interface type entry has
889 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
890 \addtoindexx{name attribute}
892 value is a null\dash terminated string containing the type name
893 as it appears in the source program.
895 The members of an interface are represented by debugging
896 information entries that are owned by the interface type
897 entry and that appear in the same order as the corresponding
898 declarations in the source program.
900 \subsection{Derived or Extended Structs, Classes and Interfaces}
901 \label{chap:derivedorextendedstructsclasesandinterfaces}
903 \textit{In \addtoindex{C++}, a class (or struct)
905 \addtoindexx{derived type (C++)|see{inheritance entry}}
906 be ``derived from'' or be a
907 ``subclass of'' another class.
908 In \addtoindex{Java}, an interface may ``extend''
909 \addtoindexx{extended type (Java)|see{inheritance entry}}
911 \addtoindexx{implementing type (Java)|see{inheritance entry}}
912 or more other interfaces, and a class may ``extend'' another
913 class and/or ``implement'' one or more interfaces. All of these
914 relationships may be described using the following. Note that
915 in \addtoindex{Java},
916 the distinction between extends and implements is
917 implied by the entities at the two ends of the relationship.}
919 A class type or interface type entry that describes a
920 derived, extended or implementing class or interface owns
921 addtoindexx{implementing type (Java)|see{inheritance entry}}
922 debugging information entries describing each of the classes
923 or interfaces it is derived from, extending or implementing,
924 respectively, ordered as they were in the source program. Each
926 \addtoindexx{inheritance entry}
928 tag \livetarg{chap:DWTAGinheritance}{DW\-\_TAG\-\_inheritance}.
931 \addtoindexx{type attribute}
933 \addtoindexx{inheritance entry}
935 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute whose value is
936 a reference to the debugging information entry describing the
937 class or interface from which the parent class or structure
938 of the inheritance entry is derived, extended or implementing.
941 \addtoindexx{inheritance entry}
942 for a class that derives from or extends
943 \hypertarget{chap:DWATdatamemberlocationinheritedmemberlocation}
944 another class or struct also has
945 \addtoindexx{data member location attribute}
947 \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location}
948 attribute, whose value describes the location of the beginning
949 of the inherited type relative to the beginning address of the
950 derived class. If that value is a constant, it is the offset
951 in bytes from the beginning of the class to the beginning of
952 the inherited type. Otherwise, the value must be a location
953 description. In this latter case, the beginning address of
954 the derived class is pushed on the expression stack before
955 the \addtoindex{location description}
956 is evaluated and the result of the
957 evaluation is the location of the inherited type.
959 \textit{The interpretation of the value of this attribute for
960 inherited types is the same as the interpretation for data
962 (see Section \refersec{chap:datamemberentries}). }
965 \addtoindexx{inheritance entry}
967 \hypertarget{chap:DWATaccessibilitycppinheritedmembers}
969 \addtoindexx{accessibility attribute}
971 \livelink{chap:DWATaccessibility}{DW\-\_AT\-\_accessibility}
973 If no accessibility attribute
974 is present, private access is assumed for an entry of a class
975 and public access is assumed for an entry of an interface,
979 \hypertarget{chap:DWATvirtualityvirtualityofbaseclass}
980 the class referenced by the
981 \addtoindexx{inheritance entry}
982 inheritance entry serves
983 as a \addtoindex{C++} virtual base class, the inheritance entry has a
984 \livelink{chap:DWATvirtuality}{DW\-\_AT\-\_virtuality} attribute.
986 \textit{For a \addtoindex{C++} virtual base, the
987 \addtoindex{data member location attribute}
988 will usually consist of a non-trivial
989 \addtoindex{location description}.}
991 \subsection{Access Declarations}
992 \label{chap:accessdeclarations}
994 \textit{In \addtoindex{C++}, a derived class may contain access declarations that
995 \addtoindex{access declaration entry}
996 change the accessibility of individual class members from the
997 overall accessibility specified by the inheritance declaration.
998 A single access declaration may refer to a set of overloaded
1001 If a derived class or structure contains access declarations,
1002 each such declaration may be represented by a debugging
1003 information entry with the tag
1004 \livetarg{chap:DWTAGaccessdeclaration}{DW\-\_TAG\-\_access\-\_declaration}.
1006 such entry is a child of the class or structure type entry.
1008 An access declaration entry has
1009 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
1010 \addtoindexx{name attribute}
1012 value is a null\dash terminated string representing the name used
1013 in the declaration in the source program, including any class
1014 or structure qualifiers.
1016 An access declaration entry
1017 \hypertarget{chap:DWATaccessibilitycppbaseclasses}
1020 \livelink{chap:DWATaccessibility}{DW\-\_AT\-\_accessibility}
1021 attribute describing the declared accessibility of the named
1025 \subsection{Friends}
1026 \label{chap:friends}
1029 \addtoindexx{friend entry}
1030 declared by a structure, union or class
1031 \hypertarget{chap:DWATfriendfriendrelationship}
1032 type may be represented by a debugging information entry
1033 that is a child of the structure, union or class type entry;
1034 the friend entry has the
1035 tag \livetarg{chap:DWTAGfriend}{DW\-\_TAG\-\_friend}.
1038 \addtoindexx{friend attribute}
1039 a \livelink{chap:DWATfriend}{DW\-\_AT\-\_friend} attribute, whose value is
1040 a reference to the debugging information entry describing
1041 the declaration of the friend.
1044 \subsection{Data Member Entries}
1045 \label{chap:datamemberentries}
1047 A data member (as opposed to a member function) is
1048 represented by a debugging information entry with the
1049 tag \livetarg{chap:DWTAGmember}{DW\-\_TAG\-\_member}.
1051 \addtoindexx{member entry (data)}
1052 member entry for a named member has
1053 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
1054 \addtoindexx{name attribute}
1055 whose value is a null\dash terminated
1056 string containing the member name as it appears in the source
1057 program. If the member entry describes an
1058 \addtoindex{anonymous union},
1060 name attribute is omitted or consists of a single zero byte.
1062 The data member entry has
1063 \addtoindexx{type attribute}
1065 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute to denote
1066 \addtoindexx{member entry (data)}
1067 the type of that member.
1069 A data member entry may
1070 \addtoindexx{accessibility attribute}
1072 \livelink{chap:DWATaccessibility}{DW\-\_AT\-\_accessibility}
1073 attribute. If no accessibility attribute is present, private
1074 access is assumed for an entry of a class and public access
1075 is assumed for an entry of a structure, union, or interface.
1078 \hypertarget{chap:DWATmutablemutablepropertyofmemberdata}
1080 \addtoindexx{member entry (data)}
1082 \addtoindexx{mutable attribute}
1083 have a \livelink{chap:DWATmutable}{DW\-\_AT\-\_mutable} attribute,
1084 which is a \livelink{chap:flag}{flag}.
1085 This attribute indicates whether the data
1086 member was declared with the mutable storage class specifier.
1088 The beginning of a data member
1089 \addtoindex{beginning of a data member}
1090 is described relative to
1091 \addtoindexx{beginning of an object}
1092 the beginning of the object in which it is immediately
1093 contained. In general, the beginning is characterized by
1094 both an address and a bit offset within the byte at that
1095 address. When the storage for an entity includes all of
1096 the bits in the beginning byte, the beginning bit offset is
1099 Bit offsets in DWARF use the bit numbering and direction
1100 conventions that are appropriate to the current language on
1104 \addtoindexx{member entry (data)}
1105 corresponding to a data member that is
1106 \hypertarget{chap:DWATdatabitoffsetdatamemberbitlocation}
1108 \hypertarget{chap:DWATdatamemberlocationdatamemberlocation}
1109 in a structure, union or class may have either
1110 \addtoindexx{data member location attribute}
1112 \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location} attribute or a
1113 \livelink{chap:DWATdatabitoffset}{DW\-\_AT\-\_data\-\_bit\-\_offset}
1114 attribute. If the beginning of the data member is the same as
1115 the beginning of the containing entity then neither attribute
1118 For a \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location} attribute
1119 \addtoindexx{data member location attribute}
1120 there are two cases:
1122 \begin{enumerate}[1.]
1124 \item If the value is an integer constant, it is the offset
1125 in bytes from the beginning of the containing entity. If
1126 the beginning of the containing entity has a non-zero bit
1127 offset then the beginning of the member entry has that same
1130 \item Otherwise, the value must be a \addtoindex{location description}.
1132 this case, the beginning of the containing entity must be byte
1133 aligned. The beginning address is pushed on the DWARF stack
1134 before the \addtoindex{location} description is evaluated; the result of
1135 the evaluation is the base address of the member entry.
1137 \textit{The push on the DWARF expression stack of the base address of
1138 the containing construct is equivalent to execution of the
1139 \livelink{chap:DWOPpushobjectaddress}{DW\-\_OP\-\_push\-\_object\-\_address} operation
1140 (see Section \refersec{chap:stackoperations});
1141 \livelink{chap:DWOPpushobjectaddress}{DW\-\_OP\-\_push\-\_object\-\_address} therefore
1142 is not needed at the
1143 beginning of a \addtoindex{location description} for a data member.
1145 result of the evaluation is a location--either an address or
1146 the name of a register, not an offset to the member.}
1148 \textit{A \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location}
1150 \addtoindexx{data member location attribute}
1151 that has the form of a
1152 \addtoindex{location description} is not valid for a data member contained
1153 in an entity that is not byte aligned because DWARF operations
1154 do not allow for manipulating or computing bit offsets.}
1158 For a \livelink{chap:DWATdatabitoffset}{DW\-\_AT\-\_data\-\_bit\-\_offset} attribute,
1159 the value is an integer constant
1160 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
1161 that specifies the number of bits
1162 from the beginning of the containing entity to the beginning
1163 of the data member. This value must be greater than or equal
1164 to zero, but is not limited to less than the number of bits
1167 If the size of a data member is not the same as the size
1168 of the type given for the data member, the data member has
1169 \addtoindexx{bit size attribute}
1170 either a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size}
1171 or a \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attribute whose
1172 integer constant value
1173 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
1175 of storage needed to hold the value of the data member.
1177 \textit{\addtoindex{C} and \addtoindex{C++}
1179 \addtoindex{bit fields}
1181 \addtoindexx{data bit offset}
1183 \addtoindexx{data bit size}
1185 \livelink{chap:DWATdatabitoffset}{DW\-\_AT\-\_data\-\_bit\-\_offset} and
1186 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attributes.}
1188 \textit{This Standard uses the following bit numbering and direction
1189 conventions in examples. These conventions are for illustrative
1190 purposes and other conventions may apply on particular
1195 \item \textit{For big\dash endian architectures, bit offsets are
1196 counted from high-order to low\dash order bits within a byte (or
1197 larger storage unit); in this case, the bit offset identifies
1198 the high\dash order bit of the object.}
1200 \item \textit{For little\dash endian architectures, bit offsets are
1201 counted from low\dash order to high\dash order bits within a byte (or
1202 larger storage unit); in this case, the bit offset identifies
1203 the low\dash order bit of the object.}
1207 \textit{In either case, the bit so identified is defined as the
1208 \addtoindexx{beginning of an object}
1209 beginning of the object.}
1211 \textit{For example, take one possible representation of the following
1212 \addtoindex{C} structure definition
1213 in both big\dash and little\dash endian byte orders:}
1224 \textit{The following diagrams show the structure layout
1225 and data bit offsets for example big\dash\ and little\dash endian
1226 architectures, respectively. Both diagrams show a structure
1227 that begins at address A and whose size is four bytes. Also,
1228 high order bits are to the left and low order bits are to
1231 \textit{Big\dash Endian Data Bit Offsets:}
1239 Addresses increase ->
1240 | A | A + 1 | A + 2 | A + 3 |
1242 Data bit offsets increase ->
1243 +---------------+---------------+---------------+---------------+
1244 |0 4|5 10|11 15|16 23|24 31|
1245 | j | k | m | n | <pad> |
1247 +---------------------------------------------------------------+
1250 \textit{Little\dash Endian Data Bit Offsets:}
1256 <- Addresses increase
1257 | A | A + 1 | A + 2 | A + 3 |
1259 <- Data bit offsets increase
1261 +---------------+---------------+---------------+---------------+
1262 |31 24|23 16|15 11|10 5|4 0|
1263 | <pad> | n | m | k | j |
1265 +---------------------------------------------------------------+
1269 \textit{Note that data member bit offsets in this example are the
1270 same for both big\dash\ and little\dash endian architectures even
1271 though the fields are allocated in different directions
1272 (high\dash order to low-order versus low\dash order to high\dash order);
1273 the bit naming conventions for memory and/or registers of
1274 the target architecture may or may not make this seem natural.}
1276 \textit{For a more extensive example showing nested and packed records
1278 Appendix \refersec{app:pascalexample}.}
1280 \textit{Attribute \livelink{chap:DWATdatabitoffset}{DW\-\_AT\-\_data\-\_bit\-\_offset}
1282 \addtoindex{DWARF Version 4}
1283 and is also used for base types
1285 \refersec{chap:basetypeentries}).
1287 \livetarg{chap:DWATbitoffsetdatamemberbitlocation}
1288 attributes \livelink{chap:DWATbitoffset}{DW\-\_AT\-\_bit\-\_offset} and
1289 \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} when used to
1290 identify the beginning of bit field data members as defined
1291 in DWARF V3 and earlier. The earlier attributes are defined
1292 in a manner suitable for bit field members on big-endian
1293 architectures but which is either awkward or incomplete for
1294 use on little-endian architectures.
1295 (\livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} also
1296 has other uses that are not affected by this change.)}
1298 \textit{The \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size},
1299 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} and
1300 \livelink{chap:DWATbitoffset}{DW\-\_AT\-\_bit\-\_offset}
1301 attribute combination is deprecated for data members in DWARF
1302 Version 4, but implementations may continue to support this
1303 use for compatibility.}
1306 \addtoindex{DWARF Version 3}
1307 definitions of these attributes are
1310 \begin{myindentpara}{1cm}
1311 \textit{If the data member entry describes a bit field, then that
1312 entry has the following attributes:}
1315 \item \textit{A \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size}
1316 attribute whose value
1317 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
1318 is the number of bytes that contain an instance of the
1319 bit field and any padding bits.}
1321 \textit{The byte size attribute may be omitted if the size of the
1322 object containing the bit field can be inferred from the type
1323 attribute of the data member containing the bit field.}
1325 \item \textit{A \livelink{chap:DWATbitoffset}{DW\-\_AT\-\_bit\-\_offset}
1327 \addtoindexx{bit offset attribute (V3)}
1329 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
1330 is the number of bits to the left of the leftmost
1331 (most significant) bit of the bit field value.}
1333 \item \textit{A \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size}
1335 \addtoindexx{bit size attribute (V3)}
1337 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
1338 is the number of bits occupied by the bit field value.}
1343 \addtoindex{location description} for a bit field calculates the address
1344 of an anonymous object containing the bit field. The address
1345 is relative to the structure, union, or class that most closely
1346 encloses the bit field declaration. The number of bytes in this
1347 anonymous object is the value of the byte size attribute of
1348 the bit field. The offset (in bits) from the most significant
1349 bit of the anonymous object to the most significant bit of
1350 the bit field is the value of the bit offset attribute.}
1354 \textit{Diagrams similar to the above that show the use of the
1355 \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size},
1356 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} and
1357 \livelink{chap:DWATbitoffset}{DW\-\_AT\-\_bit\-\_offset} attribute
1358 combination may be found in the
1359 \addtoindex{DWARF Version 3} Standard.}
1361 \textit{In comparing
1363 \addtoindexx{DWARF Version 3}
1365 \addtoindexx{DWARF Version 4}
1366 4, note that DWARF V4
1367 defines the following combinations of attributes:}
1370 \item \textit{either \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location}
1372 \livelink{chap:DWATdatabitoffset}{DW\-\_AT\-\_data\-\_bit\-\_offset}
1373 (to specify the beginning of the data member)}
1375 % FIXME: the indentation of the following line is suspect.
1376 \textit{optionally together with}
1378 \item \textit{either \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} or
1379 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} (to
1380 specify the size of the data member)}
1384 \textit{DWARF V3 defines the following combinations}
1387 \item \textit{\livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location}
1388 (to specify the beginning
1389 of the data member, except this specification is only partial
1390 in the case of a bit field) }
1392 % FIXME: the indentation of the following line is suspect.
1393 \textit{optionally together with}
1395 \item \textit{\livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size},
1396 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} and
1397 \livelink{chap:DWATbitoffset}{DW\-\_AT\-\_bit\-\_offset}
1398 (to further specify the beginning of a bit field data member
1399 as well as specify the size of the data member) }
1402 \subsection{Member Function Entries}
1403 \label{chap:memberfunctionentries}
1405 A member function is represented by a
1406 \addtoindexx{member function entry}
1407 debugging information entry
1409 \addtoindexx{subprogram entry!as member function}
1410 tag \livelink{chap:DWTAGsubprogram}{DW\-\_TAG\-\_subprogram}.
1411 The member function entry
1412 may contain the same attributes and follows the same rules
1413 as non\dash member global subroutine entries
1414 (see Section \refersec{chap:subroutineandentrypointentries}).
1417 \addtoindexx{accessibility attribute}
1418 member function entry may have a
1419 \livelink{chap:DWATaccessibility}{DW\-\_AT\-\_accessibility}
1420 attribute. If no accessibility attribute is present, private
1421 access is assumed for an entry of a class and public access
1422 is assumed for an entry of a structure, union or interface.
1425 \hypertarget{chap:DWATvirtualityvirtualityoffunction}
1426 the member function entry describes a virtual function,
1427 then that entry has a
1428 \livelink{chap:DWATvirtuality}{DW\-\_AT\-\_virtuality} attribute.
1431 \hypertarget{chap:DWATexplicitexplicitpropertyofmemberfunction}
1432 the member function entry describes an explicit member
1433 function, then that entry has
1434 \addtoindexx{explicit attribute}
1436 \livelink{chap:DWATexplicit}{DW\-\_AT\-\_explicit} attribute.
1439 \hypertarget{chap:DWATvtableelemlocationvirtualfunctiontablevtableslot}
1440 entry for a virtual function also has a
1441 \livelink{chap:DWATvtableelemlocation}{DW\-\_AT\-\_vtable\-\_elem\-\_location}
1442 \addtoindexi{attribute}{vtable element location attribute} whose value contains
1443 a \addtoindex{location description}
1444 yielding the address of the slot
1445 for the function within the virtual function table for the
1446 enclosing class. The address of an object of the enclosing
1447 type is pushed onto the expression stack before the location
1448 description is evaluated.
1451 \hypertarget{chap:DWATobjectpointerobjectthisselfpointerofmemberfunction}
1452 the member function entry describes a non\dash static member
1453 \addtoindexx{this pointer attribute|see{object pointer attribute}}
1454 function, then that entry
1455 \addtoindexx{self pointer attribute|see{object pointer attribute}}
1457 \addtoindexx{object pointer attribute}
1458 a \livelink{chap:DWATobjectpointer}{DW\-\_AT\-\_object\-\_pointer}
1460 whose value is a reference to the formal parameter entry
1461 that corresponds to the object for which the function is
1462 called. The name attribute of that formal parameter is defined
1463 by the current language (for example,
1464 this for \addtoindex{C++} or self
1465 for \addtoindex{Objective C}
1466 and some other languages). That parameter
1467 also has a \livelink{chap:DWATartificial}{DW\-\_AT\-\_artificial} attribute whose value is true.
1469 Conversely, if the member function entry describes a static
1470 member function, the entry does not have
1471 \addtoindexx{object pointer attribute}
1473 \livelink{chap:DWATobjectpointer}{DW\-\_AT\-\_object\-\_pointer}
1476 If the member function entry describes a non\dash static member
1477 function that has a const\dash volatile qualification, then
1478 the entry describes a non\dash static member function whose
1479 object formal parameter has a type that has an equivalent
1480 const\dash volatile qualification.
1482 If a subroutine entry represents the defining declaration
1483 of a member function and that definition appears outside of
1484 the body of the enclosing class declaration, the subroutine
1486 \livelink{chap:DWATspecification}{DW\-\_AT\-\_specification} attribute,
1487 \addtoindexx{specification attribute}
1489 a reference to the debugging information entry representing
1490 the declaration of this function member. The referenced entry
1491 will be a child of some class (or structure) type entry.
1493 Subroutine entries containing the
1494 \livelink{chap:DWATspecification}{DW\-\_AT\-\_specification} attribute
1495 \addtoindexx{specification attribute}
1496 do not need to duplicate information provided
1497 by the declaration entry referenced by the specification
1498 attribute. In particular, such entries do not need to contain
1499 attributes for the name or return type of the function member
1500 whose definition they represent.
1502 \subsection{Class Template Instantiations}
1503 \label{chap:classtemplateinstantiations}
1505 \textit{In \addtoindex{C++} a class template is a generic definition of a class
1506 type that may be instantiated when an instance of the class
1507 is declared or defined. The generic description of the
1508 class may include both parameterized types and parameterized
1509 constant values. DWARF does not represent the generic template
1510 definition, but does represent each instantiation.}
1512 A class template instantiation is represented by a
1513 debugging information entry with the tag \livelink{chap:DWTAGclasstype}{DW\-\_TAG\-\_class\-\_type},
1514 \livelink{chap:DWTAGstructuretype}{DW\-\_TAG\-\_structure\-\_type} or
1515 \livelink{chap:DWTAGuniontype}{DW\-\_TAG\-\_union\-\_type}. With five
1516 exceptions, such an entry will contain the same attributes
1517 and have the same types of child entries as would an entry
1518 for a class type defined explicitly using the instantiation
1519 types and values. The exceptions are:
1521 \begin{enumerate}[1.]
1522 \item Each formal parameterized type declaration appearing in the
1523 template definition is represented by a debugging information
1525 \livelink{chap:DWTAGtemplatetypeparameter}{DW\-\_TAG\-\_template\-\_type\-\_parameter}. Each
1526 such entry may have a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
1527 \addtoindexx{name attribute}
1529 a null\dash terminated string containing the name of the formal
1530 type parameter as it appears in the source program. The
1531 template type parameter entry also has
1532 \addtoindexx{type attribute}
1534 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute
1535 describing the actual type by which the formal is replaced
1536 for this instantiation.
1538 \item Each formal parameterized value declaration appearing in the
1539 template definition is represented by a
1540 debugging information entry with the
1541 \addtoindexx{template value parameter entry}
1542 tag \livetarg{chap:DWTAGtemplatevalueparameter}{DW\-\_TAG\-\_template\-\_value\-\_parameter}.
1544 such entry may have a
1545 \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
1546 \addtoindexx{name attribute}
1548 a null\dash terminated string containing the name of the formal
1549 value parameter as it appears in the source program.
1551 \hypertarget{chap:DWATconstvaluetemplatevalueparameter}
1552 template value parameter entry
1553 \addtoindexx{template value parameter entry}
1555 \addtoindexx{type attribute}
1557 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute
1558 describing the type of the parameterized value. Finally,
1559 the template value parameter entry has a
1560 \livelink{chap:DWATconstvalue}{DW\-\_AT\-\_const\-\_value}
1561 attribute, whose value is the actual constant value of the
1562 value parameter for this instantiation as represented on the
1563 target architecture.
1565 \item The class type entry and each of its child entries references
1566 a \addtoindex{template type parameter entry} in any circumstance where the
1567 source template definition references a formal parameterized
1569 Similarly, the class type entry and each of its child
1570 entries references a template value parameter entry in any
1571 circumstance where the source template definition references
1572 a formal parameterized value.
1574 \item If the compiler has generated a special compilation unit to
1576 \addtoindexx{template instantiation!and special compilaton unit}
1577 template instantiation and that special compilation
1578 unit has a different name from the compilation unit containing
1579 the template definition, the name attribute for the debugging
1580 information entry representing the special compilation unit
1581 should be empty or omitted.
1583 \item If the class type entry representing the template
1584 instantiation or any of its child entries contains declaration
1585 coordinate attributes, those attributes should refer to
1586 the source for the template definition, not to any source
1587 generated artificially by the compiler.
1591 \subsection{Variant Entries}
1592 \label{chap:variantentries}
1594 A variant part of a structure is represented by a debugging
1595 information entry\addtoindexx{variant part entry} with the
1596 tag \livetarg{chap:DWTAGvariantpart}{DW\-\_TAG\-\_variant\-\_part} and is
1597 owned by the corresponding structure type entry.
1599 If the variant part has a discriminant, the discriminant is
1600 \hypertarget{chap:DWATdiscrdiscriminantofvariantpart}
1602 \addtoindexx{discriminant (entry)}
1603 separate debugging information entry which
1604 is a child of the variant part entry. This entry has the form
1606 \addtoindexx{member entry (data)!as discriminant}
1607 structure data member entry. The variant part entry will
1608 \addtoindexx{discriminant attribute}
1610 \livelink{chap:DWATdiscr}{DW\-\_AT\-\_discr} attribute
1611 whose value is a reference to
1612 the member entry for the discriminant.
1614 If the variant part does not have a discriminant (tag field),
1615 the variant part entry has
1616 \addtoindexx{type attribute}
1618 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute to represent
1621 Each variant of a particular variant part is represented by
1622 \hypertarget{chap:DWATdiscrvaluediscriminantvalue}
1623 a debugging information entry\addtoindexx{variant entry} with the
1624 tag \livetarg{chap:DWTAGvariant}{DW\-\_TAG\-\_variant}
1625 and is a child of the variant part entry. The value that
1626 selects a given variant may be represented in one of three
1627 ways. The variant entry may have a
1628 \livelink{chap:DWATdiscrvalue}{DW\-\_AT\-\_discr\-\_value} attribute
1629 whose value represents a single case label. The value of this
1630 attribute is encoded as an LEB128 number. The number is signed
1631 if the tag type for the variant part containing this variant
1632 is a signed type. The number is unsigned if the tag type is
1636 \hypertarget{chap:DWATdiscrlistlistofdiscriminantvalues}
1637 the variant entry may contain
1638 \addtoindexx{discriminant list attribute}
1640 \livelink{chap:DWATdiscrlist}{DW\-\_AT\-\_discr\-\_list}
1641 attribute, whose value represents a list of discriminant
1642 values. This list is represented by any of the
1643 \livelink{chap:block}{block} forms and
1644 may contain a mixture of case labels and label ranges. Each
1645 item on the list is prefixed with a discriminant value
1646 descriptor that determines whether the list item represents
1647 a single label or a label range. A single case label is
1648 represented as an LEB128 number as defined above for
1649 \addtoindexx{discriminant value attribute}
1651 \livelink{chap:DWATdiscrvalue}{DW\-\_AT\-\_discr\-\_value}
1652 attribute. A label range is represented by
1653 two LEB128 numbers, the low value of the range followed by the
1654 high value. Both values follow the rules for signedness just
1655 described. The discriminant value descriptor is an integer
1656 constant that may have one of the values given in
1657 Figure \refersec{fig:discriminantdescriptorvalues}.
1659 \begin{figure}[here]
1660 \autorows[0pt]{c}{1}{l}{
1661 \addtoindex{DW\-\_DSC\-\_label},
1662 \addtoindex{DW\-\_DSC\-\_range}
1664 \caption{Discriminant descriptor values}\label{fig:discriminantdescriptorvalues}
1667 If a variant entry has neither a \livelink{chap:DWATdiscrvalue}{DW\-\_AT\-\_discr\-\_value}
1668 attribute nor a \livelink{chap:DWATdiscrlist}{DW\-\_AT\-\_discr\-\_list} attribute, or if it has
1669 a \livelink{chap:DWATdiscrlist}{DW\-\_AT\-\_discr\-\_list} attribute with 0 size, the variant is a
1672 The components selected by a particular variant are represented
1673 by debugging information entries owned by the corresponding
1674 variant entry and appear in the same order as the corresponding
1675 declarations in the source program.
1677 \section{Condition Entries}
1678 \label{chap:conditionentries}
1680 \textit{COBOL has the notion of
1681 \addtoindexx{level-88 condition, COBOL}
1682 a ``level\dash 88 condition'' that
1683 associates a data item, called the conditional variable, with
1684 a set of one or more constant values and/or value ranges.
1685 Semantically, the condition is ‛true’ if the conditional
1686 variable's value matches any of the described constants,
1687 and the condition is ‛false’ otherwise.}
1689 The \livetarg{chap:DWTAGcondition}{DW\-\_TAG\-\_condition}
1690 debugging information entry\addtoindexx{condition entry}
1692 logical condition that tests whether a given data item’s
1693 value matches one of a set of constant values. If a name
1694 has been given to the condition, the condition entry has a
1695 \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
1696 \addtoindexx{name attribute}
1697 whose value is a null\dash terminated string
1698 giving the condition name as it appears in the source program.
1700 The condition entry's parent entry describes the conditional
1701 variable; normally this will be a \livelink{chap:DWTAGvariable}{DW\-\_TAG\-\_variable},
1702 \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member} or
1703 \livelink{chap:DWTAGformalparameter}{DW\-\_TAG\-\_formal\-\_parameter} entry.
1705 \addtoindexx{formal parameter entry}
1707 entry has an array type, the condition can test any individual
1708 element, but not the array as a whole. The condition entry
1709 implicitly specifies a “comparison type” that is the
1710 type of an array element if the parent has an array type;
1711 otherwise it is the type of the parent entry.
1713 The condition entry owns \livelink{chap:DWTAGconstant}{DW\-\_TAG\-\_constant} and/or
1714 \livelink{chap:DWTAGsubrangetype}{DW\-\_TAG\-\_subrange\-\_type} entries that describe the constant
1715 values associated with the condition. If any child entry
1716 \addtoindexx{type attribute}
1718 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute,
1719 that attribute should describe a type
1720 compatible with the comparison type (according to the source
1721 language); otherwise the child’s type is the same as the
1724 \textit{For conditional variables with alphanumeric types, COBOL
1725 permits a source program to provide ranges of alphanumeric
1726 constants in the condition. Normally a subrange type entry
1727 does not describe ranges of strings; however, this can be
1728 represented using bounds attributes that are references to
1729 constant entries describing strings. A subrange type entry may
1730 refer to constant entries that are siblings of the subrange
1734 \section{Enumeration Type Entries}
1735 \label{chap:enumerationtypeentries}
1737 \textit{An “enumeration type” is a scalar that can assume one of
1738 a fixed number of symbolic values.}
1740 An enumeration type is represented by a debugging information
1742 \livetarg{chap:DWTAGenumerationtype}{DW\-\_TAG\-\_enumeration\-\_type}.
1744 If a name has been given to the enumeration type in the source
1745 program, then the corresponding enumeration type entry has
1746 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
1747 \addtoindexx{name attribute}
1748 whose value is a null\dash terminated
1749 string containing the enumeration type name as it appears
1750 in the source program. This entry also has a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size}
1751 attribute whose integer constant value is the number of bytes
1752 required to hold an instance of the enumeration.
1754 The \addtoindex{enumeration type entry}
1756 \addtoindexx{type attribute}
1757 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute
1758 which refers to the underlying data type used to implement
1761 If an enumeration type has type safe
1762 \addtoindexx{type safe enumeration types}
1765 \begin{enumerate}[1.]
1766 \item Enumerators are contained in the scope of the enumeration type, and/or
1768 \item Enumerators are not implicitly converted to another type
1771 then the \addtoindex{enumeration type entry} may
1772 \addtoindexx{enum class|see{type-safe enumeration}}
1773 have a \livelink{chap:DWATenumclass}{DW\-\_AT\-\_enum\-\_class}
1774 attribute, which is a \livelink{chap:flag}{flag}.
1775 In a language that offers only
1776 one kind of enumeration declaration, this attribute is not
1779 \textit{In \addtoindex{C} or \addtoindex{C++},
1780 the underlying type will be the appropriate
1781 integral type determined by the compiler from the properties of
1782 \hypertarget{chap:DWATenumclasstypesafeenumerationdefinition}
1783 the enumeration literal values.
1784 A \addtoindex{C++} type declaration written
1785 using enum class declares a strongly typed enumeration and
1786 is represented using \livelink{chap:DWTAGenumerationtype}{DW\-\_TAG\-\_enumeration\-\_type}
1787 in combination with \livelink{chap:DWATenumclass}{DW\-\_AT\-\_enum\-\_class}.}
1789 Each enumeration literal is represented by a debugging
1790 \addtoindexx{enumeration literal|see{enumeration entry}}
1791 information entry with the
1792 tag \livetarg{chap:DWTAGenumerator}{DW\-\_TAG\-\_enumerator}.
1794 such entry is a child of the
1795 \addtoindex{enumeration type entry}, and the
1796 enumerator entries appear in the same order as the declarations
1797 of the enumeration literals in the source program.
1799 Each \addtoindex{enumerator entry} has a
1800 \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute, whose
1801 \addtoindexx{name attribute}
1802 value is a null\dash terminated string containing the name of the
1803 \hypertarget{chap:DWATconstvalueenumerationliteralvalue}
1804 enumeration literal as it appears in the source program.
1805 Each enumerator entry also has a
1806 \livelink{chap:DWATconstvalue}{DW\-\_AT\-\_const\-\_value} attribute,
1807 whose value is the actual numeric value of the enumerator as
1808 represented on the target system.
1811 If the enumeration type occurs as the description of a
1812 \addtoindexx{enumeration type endry!as array dimension}
1813 dimension of an array type, and the stride for that dimension
1814 \hypertarget{chap:DWATbytestrideenumerationstridedimensionofarraytype}
1815 is different than what would otherwise be determined, then
1816 \hypertarget{chap:DWATbitstrideenumerationstridedimensionofarraytype}
1817 the enumeration type entry has either a
1818 \livelink{chap:DWATbytestride}{DW\-\_AT\-\_byte\-\_stride}
1819 or \livelink{chap:DWATbitstride}{DW\-\_AT\-\_bit\-\_stride} attribute
1820 \addtoindexx{bit stride attribute}
1821 which specifies the separation
1822 between successive elements along the dimension as described
1824 Section \refersec{chap:visibilityofdeclarations}.
1826 \livelink{chap:DWATbitstride}{DW\-\_AT\-\_bit\-\_stride} attribute
1827 \addtoindexx{bit stride attribute}
1828 is interpreted as bits and the value of
1829 \addtoindexx{byte stride attribute}
1831 \livelink{chap:DWATbytestride}{DW\-\_AT\-\_byte\-\_stride}
1832 attribute is interpreted as bytes.
1835 \section{Subroutine Type Entries}
1836 \label{chap:subroutinetypeentries}
1838 It is possible in \addtoindex{C}
1839 to declare pointers to subroutines
1840 that return a value of a specific type. In both
1841 \addtoindex{C} and \addtoindex{C++},
1842 it is possible to declare pointers to subroutines that not
1843 only return a value of a specific type, but accept only
1844 arguments of specific types. The type of such pointers would
1845 be described with a ``pointer to'' modifier applied to a
1846 user\dash defined type.
1848 A subroutine type is represented by a debugging information
1850 \addtoindexx{subroutine type entry}
1851 tag \livetarg{chap:DWTAGsubroutinetype}{DW\-\_TAG\-\_subroutine\-\_type}.
1853 been given to the subroutine type in the source program,
1854 then the corresponding subroutine type entry has
1855 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
1856 \addtoindexx{name attribute}
1857 whose value is a null\dash terminated string containing
1858 the subroutine type name as it appears in the source program.
1860 If the subroutine type describes a function that returns
1861 a value, then the subroutine type entry has
1862 \addtoindexx{type attribute}
1863 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type}
1864 attribute to denote the type returned by the subroutine. If
1865 the types of the arguments are necessary to describe the
1866 subroutine type, then the corresponding subroutine type
1867 entry owns debugging information entries that describe the
1868 arguments. These debugging information entries appear in the
1869 order that the corresponding argument types appear in the
1872 In \addtoindex{C} there
1873 is a difference between the types of functions
1874 declared using function prototype style declarations and
1875 those declared using non\dash prototype declarations.
1878 \hypertarget{chap:DWATprototypedsubroutineprototype}
1879 subroutine entry declared with a function prototype style
1880 declaration may have
1881 \addtoindexx{prototyped attribute}
1883 \livelink{chap:DWATprototyped}{DW\-\_AT\-\_prototyped} attribute, which is
1884 a \livelink{chap:flag}{flag}.
1886 Each debugging information entry owned by a subroutine
1887 type entry has a tag whose value has one of two possible
1890 \begin{enumerate}[1.]
1891 \item The formal parameters of a parameter list (that have a
1892 specific type) are represented by a debugging information entry
1893 with the tag \livelink{chap:DWTAGformalparameter}{DW\-\_TAG\-\_formal\-\_parameter}.
1894 Each formal parameter
1896 \addtoindexx{type attribute}
1897 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute that refers to the type of
1898 the formal parameter.
1900 \item The unspecified parameters of a variable parameter list
1901 \addtoindexx{unspecified parameters entry}
1903 \addtoindexx{... parameters|see{unspecified parameters entry}}
1904 represented by a debugging information entry with the
1905 tag \livelink{chap:DWTAGunspecifiedparameters}{DW\-\_TAG\-\_unspecified\-\_parameters}.
1910 \section{String Type Entries}
1911 \label{chap:stringtypeentries}
1914 A ``string'' is a sequence of characters that have specific
1915 \addtoindexx{string type entry}
1916 semantics and operations that separate them from arrays of
1918 \addtoindex{Fortran} is one of the languages that has a string
1919 type. Note that ``string'' in this context refers to a target
1920 machine concept, not the class string as used in this document
1921 (except for the name attribute).
1923 A string type is represented by a debugging information entry
1924 with the tag \livetarg{chap:DWTAGstringtype}{DW\-\_TAG\-\_string\-\_type}.
1925 If a name has been given to
1926 the string type in the source program, then the corresponding
1927 string type entry has a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
1928 \addtoindexx{name attribute}
1930 a null\dash terminated string containing the string type name as
1931 it appears in the source program.
1934 \hypertarget{chap:DWATstringlengthstringlengthofstringtype}
1935 string type entry may have a
1936 \livelink{chap:DWATstringlength}{DW\-\_AT\-\_string\-\_length} attribute
1938 \addtoindexx{string length attribute}
1940 \addtoindex{location description} yielding the location
1941 where the length of the string is stored in the program. The
1942 string type entry may also have a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} attribute
1943 or \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attribute, whose value
1944 (see Section \refersec{chap:byteandbitsizes})
1945 is the size of the data to be retrieved from the location
1946 referenced by the string length attribute. If no (byte or bit)
1947 size attribute is present, the size of the data to be retrieved
1949 \addtoindex{size of an address} on the target machine.
1951 If no string length attribute is present, the string type
1952 entry may have a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} attribute or
1953 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size}
1954 attribute, whose value
1955 (see Section \refersec{chap:byteandbitsizes})
1957 storage needed to hold a value of the string type.
1960 \section{Set Type Entries}
1961 \label{chap:settypeentries}
1963 \textit{\addtoindex{Pascal} provides the concept of a “set,” which represents
1964 a group of values of ordinal type.}
1966 A set is represented by a debugging information entry with
1967 the tag \livetarg{chap:DWTAGsettype}{DW\-\_TAG\-\_set\-\_type}.
1968 \addtoindexx{set type entry}
1969 If a name has been given to the
1970 set type, then the set type entry has
1971 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
1972 \addtoindexx{name attribute}
1973 whose value is a null\dash terminated string containing the
1974 set type name as it appears in the source program.
1976 The set type entry has
1977 \addtoindexx{type attribute}
1978 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute to denote the
1979 type of an element of the set.
1981 If the amount of storage allocated to hold each element of an
1982 object of the given set type is different from the amount of
1983 storage that is normally allocated to hold an individual object
1984 of the indicated element type, then the set type entry has
1985 either a \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} attribute, or
1986 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attribute
1987 whose value (see Section \refersec{chap:byteandbitsizes}) is
1988 the amount of storage needed to hold a value of the set type.
1991 \section{Subrange Type Entries}
1992 \label{chap:subrangetypeentries}
1994 \textit{Several languages support the concept of a ``subrange''
1995 type object. These objects can represent a subset of the
1996 values that an object of the basis type for the subrange can
1998 Subrange type entries may also be used to represent
1999 the bounds of array dimensions.}
2001 A subrange type is represented by a debugging information
2003 \addtoindexx{subrange type entry}
2004 tag \livetarg{chap:DWTAGsubrangetype}{DW\-\_TAG\-\_subrange\-\_type}.
2006 given to the subrange type, then the subrange type entry
2007 has a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
2008 \addtoindexx{name attribute}
2009 whose value is a null\dash terminated
2010 string containing the subrange type name as it appears in
2013 The subrange entry may have
2014 \addtoindexx{type attribute}
2015 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute to describe
2016 the type of object, called the basis type, of whose values
2017 this subrange is a subset.
2019 If the amount of storage allocated to hold each element of an
2020 object of the given subrange type is different from the amount
2021 of storage that is normally allocated to hold an individual
2022 object of the indicated element type, then the subrange
2024 \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} attribute or
2025 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size}
2026 attribute, whose value
2027 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
2029 storage needed to hold a value of the subrange type.
2032 \hypertarget{chap:DWATthreadsscaledupcarrayboundthreadsscalfactor}
2033 subrange entry may have
2034 \addtoindexx{threads scaled attribute}
2036 \livelink{chap:DWATthreadsscaled}{DW\-\_AT\-\_threads\-\_scaled} attribute,
2037 which is a \livelink{chap:flag}{flag}.
2038 If present, this attribute indicates whether
2039 this subrange represents a UPC array bound which is scaled
2040 by the runtime THREADS value (the number of UPC threads in
2041 this execution of the program).
2043 \textit{This allows the representation of a UPC shared array such as}
2046 int shared foo[34*THREADS][10][20];
2050 \hypertarget{chap:DWATlowerboundlowerboundofsubrange}
2052 \hypertarget{chap:DWATupperboundupperboundofsubrange}
2053 entry may have the attributes
2054 \livelink{chap:DWATlowerbound}{DW\-\_AT\-\_lower\-\_bound}
2055 and \livelink{chap:DWATupperbound}{DW\-\_AT\-\_upper\-\_bound} to specify, respectively, the lower
2056 and upper bound values of the subrange. The
2057 \livelink{chap:DWATupperbound}{DW\-\_AT\-\_upper\-\_bound}
2059 \hypertarget{chap:DWATcountelementsofsubrangetype}
2061 % FIXME: The following matches DWARF4: odd as there is no default count.
2062 \addtoindexx{count attribute!default}
2064 \addtoindexx{count attribute}
2066 \livelink{chap:DWATcount}{DW\-\_AT\-\_count} attribute,
2068 value describes the number of elements in the subrange rather
2069 than the value of the last element. The value of each of
2070 these attributes is determined as described in
2071 Section \refersec{chap:staticanddynamicvaluesofattributes}.
2073 If the lower bound value is missing, the value is assumed to
2074 be a language\dash dependent default constant.
2075 \addtoindexx{lower bound attribute!default}
2078 \addtoindex{C}, \addtoindex{C++},
2081 \addtoindex{Objective C},
2082 \addtoindex{Objective C++},
2083 \addtoindex{Python}, and
2085 The default lower bound is 1 for
2086 \addtoindex{Ada}, \addtoindex{COBOL},
2087 \addtoindex{Fortran},
2088 \addtoindex{Modula-2},
2089 \addtoindex{Pascal} and
2092 \textit{No other default lower bound values are currently defined.}
2094 If the upper bound and count are missing, then the upper bound value is
2097 If the subrange entry has no type attribute describing the
2098 basis type, the basis type is assumed to be the same as
2099 the object described by the lower bound attribute (if it
2100 references an object). If there is no lower bound attribute,
2101 or that attribute does not reference an object, the basis type
2102 is the type of the upper bound or \addtoindex{count attribute}
2104 of them references an object). If there is no upper bound or
2105 count attribute, or neither references an object, the type is
2106 assumed to be the same type, in the source language of the
2107 compilation unit containing the subrange entry, as a signed
2108 integer with the same size as an address on the target machine.
2110 If the subrange type occurs as the description of a dimension
2111 of an array type, and the stride for that dimension is
2112 \hypertarget{chap:DWATbytestridesubrangestridedimensionofarraytype}
2113 different than what would otherwise be determined, then
2114 \hypertarget{chap:DWATbitstridesubrangestridedimensionofarraytype}
2115 the subrange type entry has either
2116 \addtoindexx{byte stride attribute}
2118 \livelink{chap:DWATbytestride}{DW\-\_AT\-\_byte\-\_stride} or
2119 \livelink{chap:DWATbitstride}{DW\-\_AT\-\_bit\-\_stride} attribute
2120 \addtoindexx{bit stride attribute}
2121 which specifies the separation
2122 between successive elements along the dimension as described
2124 Section \refersec{chap:byteandbitsizes}.
2126 \textit{Note that the stride can be negative.}
2128 \section{Pointer to Member Type Entries}
2129 \label{chap:pointertomembertypeentries}
2131 \textit{In \addtoindex{C++}, a
2132 pointer to a data or function member of a class or
2133 structure is a unique type.}
2135 A debugging information entry representing the type of an
2136 object that is a pointer to a structure or class member has
2137 the tag \livetarg{chap:DWTAGptrtomembertype}{DW\-\_TAG\-\_ptr\-\_to\-\_member\-\_type}.
2139 If the \addtoindex{pointer to member type} has a name, the
2140 \addtoindexx{pointer to member type entry}
2141 pointer to member entry has a
2142 \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
2143 \addtoindexx{name attribute}
2145 null\dash terminated string containing the type name as it appears
2146 in the source program.
2148 The \addtoindex{pointer to member} entry
2150 \addtoindexx{type attribute}
2151 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute to
2152 describe the type of the class or structure member to which
2153 objects of this type may point.
2155 The \addtoindex{pointer to member} entry also
2156 \hypertarget{chap:DWATcontainingtypecontainingtypeofpointertomembertype}
2158 \livelink{chap:DWATcontainingtype}{DW\-\_AT\-\_containing\-\_type}
2159 attribute, whose value is a reference to a debugging
2160 information entry for the class or structure to whose members
2161 objects of this type may point.
2164 \hypertarget{chap:DWATuselocationmemberlocationforpointertomembertype}
2166 \addtoindex{pointer to member entry}
2168 \livelink{chap:DWATuselocation}{DW\-\_AT\-\_use\-\_location} attribute
2170 \addtoindex{location description} that computes the
2171 address of the member of the class to which the pointer to
2172 member entry points.
2174 \textit{The method used to find the address of a given member of a
2175 class or structure is common to any instance of that class
2176 or structure and to any instance of the pointer or member
2177 type. The method is thus associated with the type entry,
2178 rather than with each instance of the type.}
2180 The \livelink{chap:DWATuselocation}{DW\-\_AT\-\_use\-\_location} description is used in conjunction
2181 with the location descriptions for a particular object of the
2182 given \addtoindex{pointer to member type} and for a particular structure or
2183 class instance. The \livelink{chap:DWATuselocation}{DW\-\_AT\-\_use\-\_location}
2184 attribute expects two values to be
2185 \addtoindexi{pushed}{address!implicit push for member operator}
2186 onto the DWARF expression stack before
2187 the \livelink{chap:DWATuselocation}{DW\-\_AT\-\_use\-\_location} description is evaluated.
2189 \addtoindexi{pushed}{address!implicit push for member operator}
2190 is the value of the \addtoindex{pointer to member} object
2191 itself. The second value
2192 \addtoindexi{pushed}{address!implicit push for member operator}
2193 is the base address of the
2194 entire structure or union instance containing the member
2195 whose address is being calculated.
2197 \textit{For an expression such as}
2202 % FIXME: object and mbr\_ptr should be distinguished from italic. See DW4.
2203 \textit{where mbr\_ptr has some \addtoindex{pointer to member type}, a debugger should:}
2205 \textit{1. Push the value of mbr\_ptr onto the DWARF expression stack.}
2207 \textit{2. Push the base address of object onto the DWARF expression stack.}
2209 \textit{3. Evaluate the \livelink{chap:DWATuselocation}{DW\-\_AT\-\_use\-\_location} description
2210 given in the type of mbr\_ptr.}
2212 \section{File Type Entries}
2213 \label{chap:filetypeentries}
2215 \textit{Some languages, such as \addtoindex{Pascal},
2216 provide a data type to represent
2219 A file type is represented by a debugging information entry
2221 \addtoindexx{file type entry}
2223 \livetarg{chap:DWTAGfiletype}{DW\-\_TAG\-\_file\-\_type}.
2224 If the file type has a name,
2225 the file type entry has a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
2226 \addtoindexx{name attribute}
2228 is a null\dash terminated string containing the type name as it
2229 appears in the source program.
2231 The file type entry has
2232 \addtoindexx{type attribute}
2233 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute describing
2234 the type of the objects contained in the file.
2236 The file type entry also
2237 \addtoindexx{byte size}
2239 \addtoindexx{bit size}
2241 \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} or
2242 \livelink{chap:DWATbitsize}{DW\-\_AT\-\_bit\-\_size} attribute, whose value
2243 (see Section \refersec{chap:staticanddynamicvaluesofattributes})
2244 is the amount of storage need to hold a value of the file type.
2246 \section{Dynamic Type Properties}
2247 \label{chap:dynamictypeproperties}
2248 \subsection{Data Location}
2249 \label{chap:datalocation}
2251 \textit{Some languages may represent objects using descriptors to hold
2252 information, including a location and/or run\dash time parameters,
2253 about the data that represents the value for that object.}
2255 \hypertarget{chap:DWATdatalocationindirectiontoactualdata}
2256 The \livelink{chap:DWATdatalocation}{DW\-\_AT\-\_data\-\_location}
2257 attribute may be used with any
2258 \addtoindexx{data location attribute}
2259 type that provides one or more levels of
2260 \addtoindexx{hidden indirection|see{data location attribute}}
2262 and/or run\dash time parameters in its representation. Its value
2263 is a \addtoindex{location description}.
2264 The result of evaluating this
2265 description yields the location of the data for an object.
2266 When this attribute is omitted, the address of the data is
2267 the same as the address of the object.
2269 \textit{This location description will typically begin with
2270 \livelink{chap:DWOPpushobjectaddress}{DW\-\_OP\-\_push\-\_object\-\_address}
2271 which loads the address of the
2272 object which can then serve as a descriptor in subsequent
2273 calculation. For an example using
2274 \livelink{chap:DWATdatalocation}{DW\-\_AT\-\_data\-\_location}
2275 for a \addtoindex{Fortran 90 array}, see
2276 Appendix \refersec{app:fortran90example}.}
2278 \subsection{Allocation and Association Status}
2279 \label{chap:allocationandassociationstatus}
2281 \textit{Some languages, such as \addtoindex{Fortran 90},
2282 provide types whose values
2283 may be dynamically allocated or associated with a variable
2284 under explicit program control.}
2286 \hypertarget{chap:DWATallocatedallocationstatusoftypes}
2288 \livelink{chap:DWATallocated}{DW\-\_AT\-\_allocated}
2290 \addtoindexx{allocated attribute}
2291 may optionally be used with any
2292 type for which objects of the type can be explicitly allocated
2293 and deallocated. The presence of the attribute indicates that
2294 objects of the type are allocatable and deallocatable. The
2295 integer value of the attribute (see below) specifies whether
2296 an object of the type is
2297 currently allocated or not.
2299 \hypertarget{chap:DWATassociatedassociationstatusoftypes}
2301 \livelink{chap:DWATassociated}{DW\-\_AT\-\_associated} attribute
2303 \addtoindexx{associated attribute}
2304 optionally be used with
2305 any type for which objects of the type can be dynamically
2306 associated with other objects. The presence of the attribute
2307 indicates that objects of the type can be associated. The
2308 integer value of the attribute (see below) indicates whether
2309 an object of the type is currently associated or not.
2311 While these attributes are defined specifically with
2312 \addtoindex{Fortran 90} ALLOCATABLE and POINTER types
2313 in mind, usage is not limited
2314 to just that language.
2316 The value of these attributes is determined as described in
2317 Section \refersec{chap:staticanddynamicvaluesofattributes}.
2319 A non\dash zero value is interpreted as allocated or associated,
2320 and zero is interpreted as not allocated or not associated.
2322 \textit{For \addtoindex{Fortran 90},
2323 if the \livelink{chap:DWATassociated}{DW\-\_AT\-\_associated}
2324 attribute is present,
2325 the type has the POINTER property where either the parent
2326 variable is never associated with a dynamic object or the
2327 implementation does not track whether the associated object
2328 is static or dynamic. If the \livelink{chap:DWATallocated}{DW\-\_AT\-\_allocated} attribute is
2329 present and the \livelink{chap:DWATassociated}{DW\-\_AT\-\_associated} attribute is not, the type
2330 has the ALLOCATABLE property. If both attributes are present,
2331 then the type should be assumed to have the POINTER property
2332 (and not ALLOCATABLE); the \livelink{chap:DWATallocated}{DW\-\_AT\-\_allocated} attribute may then
2333 be used to indicate that the association status of the object
2334 resulted from execution of an ALLOCATE statement rather than
2335 pointer assignment.}
2337 \textit{For examples using
2338 \livelink{chap:DWATallocated}{DW\-\_AT\-\_allocated} for \addtoindex{Ada} and
2339 \addtoindex{Fortran 90}
2341 see Appendix \refersec{app:aggregateexamples}.}
2345 \section{Template Alias Entries}
2346 \label{chap:templatealiasentries}
2348 A type named using a template alias is represented
2349 by a debugging information entry
2350 \addtoindexx{template alias entry}
2352 \livetarg{chap:DWTAGtemplatealias}{DW\-\_TAG\-\_template\-\_alias}.
2353 The template alias entry has a
2354 \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute
2355 \addtoindexx{name attribute}
2356 whose value is a null\dash terminated string
2357 containing the name of the template alias as it appears in
2358 the source program. The template alias entry also contains
2359 \addtoindexx{type attribute}
2361 \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute
2362 whose value is a reference to the type
2363 named by the template alias. The template alias entry has
2364 the following child entries:
2366 \begin{enumerate}[1.]
2367 \item Each formal parameterized type declaration appearing
2368 in the template alias declaration is represented
2369 by a debugging information entry with the tag
2370 \livelink{chap:DWTAGtemplatetypeparameter}{DW\-\_TAG\-\_template\-\_type\-\_parameter}.
2371 Each such entry may have
2372 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
2373 \addtoindexx{name attribute}
2374 whose value is a null\dash terminated
2375 string containing the name of the formal type parameter as it
2376 appears in the source program. The template type parameter
2378 \addtoindexx{type attribute}
2379 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute
2380 describing the actual
2381 type by which the formal is replaced for this instantiation.
2383 \item Each formal parameterized value declaration
2384 appearing in the template alias declaration is
2385 represented by a debugging information entry with the tag
2386 \livelink{chap:DWTAGtemplatevalueparameter}{DW\-\_TAG\-\_template\-\_value\-\_parameter}.
2387 Each such entry may have
2388 a \livelink{chap:DWATname}{DW\-\_AT\-\_name} attribute,
2389 \addtoindexx{name attribute}
2390 whose value is a null\dash terminated
2391 string containing the name of the formal value parameter
2392 as it appears in the source program. The template value
2393 parameter entry also has
2394 \addtoindexx{type attribute}
2395 a \livelink{chap:DWATtype}{DW\-\_AT\-\_type} attribute describing
2396 the type of the parameterized value. Finally, the template
2397 value parameter entry has a \livelink{chap:DWATconstvalue}{DW\-\_AT\-\_const\-\_value}
2398 attribute, whose value is the actual constant value of the value parameter for
2399 this instantiation as represented on the target architecture.