If the scope of the declaration of a named type begins after
\hypertarget{chap:DWATstartscopetypedeclaration}{}
-the low pc value for the scope most closely enclosing the
+the low PC value for the scope most closely enclosing the
declaration, the declaration may have a
-\DWATstartscope{}
+\DWATstartscopeDEFN{}
attribute as described for objects in
Section \refersec{chap:dataobjectentries}.
types that are considered to be built into that language.}
A base type is represented by a debugging information entry
-with the tag
-\DWTAGbasetypeTARG.
+with the tag \DWTAGbasetypeTARG.
A \addtoindex{base type entry}
-has a \DWATname{} attribute
-whose
-\addtoindexx{name attribute}
-value is
-a null\dash terminated string containing the name of the base type
+may have a \DWATname{} attribute\addtoindexx{name attribute}
+whose value is
+a null-terminated string containing the name of the base type
as recognized by the programming language of the compilation
unit containing the base type entry.
A base type entry has
\addtoindexx{encoding attribute}
a \DWATencoding{} attribute describing
-how the base type is encoded and is to be interpreted. The
-value of this attribute is an
-\livelink{chap:classconstant}{integer constant}. The set of
-values and their meanings for the
-\DWATencoding{} attribute
-is given in
-Table \refersec{tab:encodingattributevalues}
-and following text.
+how the base type is encoded and is to be interpreted.
+The \DWATencoding{} attribute is described in
+Section \referfol{chap:basetypeencodings}.
A base type entry
may have a \DWATendianity{} attribute
If omitted, the encoding assumes the representation that
is the default for the target architecture.
+\needlines{4}
A base type entry has
\hypertarget{chap:DWATbytesizedataobjectordatatypesize}{}
either a \DWATbytesize{} attribute
\needlines{5}
\textit{For example, the
-\addtoindex{C} type \texttt{int} on a machine that uses 32\dash bit
+\addtoindex{C} type \texttt{int} on a machine that uses 32-bit
integers is represented by a base type entry with a name
attribute whose value is \doublequote{int}, an encoding attribute
whose value is \DWATEsigned{}
If the value of an object of the given type does not fully
occupy the storage described by a byte size attribute,
\hypertarget{chap:DWATdatabitoffsetbasetypebitlocation}{}
-the base type entry may also have
+the base type entry may also have a
+\DWATbitsizeDEFN{} and a \DWATdatabitoffsetDEFN{} attribute,
\addtoindexx{bit size attribute}
-a
-\DWATbitsize{} and a
-\DWATdatabitoffset{} attribute,
-both
\addtoindexx{data bit offset attribute}
-of whose values are
+both of whose values are
\livelink{chap:classconstant}{integer constant} values
(see Section \refersec{chap:staticanddynamicvaluesofattributes}).
The bit size
value. If this attribute is omitted a default data bit offset
of zero is assumed.
-\textit{Attribute
-\DWATdatabitoffset{}
-is
-\addtoindexx{bit offset attribute (Version 3)}
-\addtoindexx{bit offset attribute (Version 3)|see{\textit{also} data bit offset attribute}}
-new
-\addtoindexx{data bit offset attribute}
-in
-\addtoindex{DWARF Version 4}, unchanged in \addtoindex{DWARF Version 5}, and
-is also used for bit field members
-(see Section \refersec{chap:datamemberentries}).
-It
-\hypertarget{chap:DWATbitoffsetbasetypebitlocation}{}
-replaces the attribute
-\DWATbitoffset{}
-when used for base
-\addtoindexx{bit offset attribute (Version 3)}
-types as defined in \DWARFVersionIII{} and earlier.
-\DWATbitoffset{}
-is deprecated for use in base types in DWARF Version 4 and later.
-See Section 5.1 in the \DWARFVersionIV{}
-specification for a discussion of compatibility considerations.}
+A \DWTAGbasetype{} entry may have additional attributes that
+augment certain of the base type encodings; these are described
+in the following section.
+\subsection{Base Type Encodings}
+\label{chap:basetypeencodings}
+A base type entry has
+\addtoindexx{encoding attribute}
+a \DWATencoding{} attribute describing
+how the base type is encoded and is to be interpreted. The
+value of this attribute is an integer of class \CLASSconstant.
+The set of values and their meanings for the
+\DWATencoding{} attribute is given in
+Table \refersec{tab:encodingattributevalues}.
+
+\textit{In Table \ref{tab:encodingattributevalues}, encodings
+are shown in groups that have similar characteristics purely
+for presentation purposes. These groups are not part of this
+DWARF specification.}
+
+\newcommand{\EncodingGroup}[1]{\multicolumn{2}{l}{\hspace{2cm}\bfseries\textit{#1}}}
\begin{table}[!here]
\caption{Encoding attribute values}
\label{tab:encodingattributevalues}
\centering
-\begin{tabular}{l|p{8cm}}
+\begin{tabular}{l|P{8cm}}
\hline
-Name&Meaning\\ \hline
-\DWATEaddressTARG{} & linear machine address (for segmented\break
- addresses see
- Section \refersec{chap:segmentedaddresses}) \\
-\DWATEbooleanTARG& true or false \\
-
-\DWATEcomplexfloatTARG& complex binary
-floating\dash point number \\
-\DWATEfloatTARG{} & binary floating\dash point number \\
-\DWATEimaginaryfloatTARG& imaginary binary
-floating\dash point number \\
-\DWATEsignedTARG& signed binary integer \\
-\DWATEsignedcharTARG& signed character \\
-\DWATEunsignedTARG{} & unsigned binary integer \\
-\DWATEunsignedcharTARG{} & unsigned character \\
-\DWATEpackeddecimalTARG{} & packed decimal \\
-\DWATEnumericstringTARG& numeric string \\
-\DWATEeditedTARG{} & edited string \\
-\DWATEsignedfixedTARG{} & signed fixed\dash point scaled integer \\
-\DWATEunsignedfixedTARG& unsigned fixed\dash point scaled integer \\
-\DWATEdecimalfloatTARG{} & decimal floating\dash point number \\
-\DWATEUTFTARG{} & \addtoindexi{Unicode character}{Unicode character base type} \\
-\DWATEASCIITARG{} & \addtoindexi{ASCII character}{ASCII character base type}\\
-\DWATEUCSTARG{} & \addtoindexi{ISO 10646 character}{ISO 10646 character base type}
- \addtoindexx{ISO 10646 character set standard} \\
+\bfseries Name & \bfseries Meaning\\ \hline
+
+\EncodingGroup{Simple encodings} \\
+\DWATEbooleanTARG & true or false \\
+\DWATEaddressTARG{} & linear machine address$^a$ \\
+\DWATEsignedTARG & signed binary integer \\
+\DWATEsignedcharTARG & signed character \\
+\DWATEunsignedTARG & unsigned binary integer \\
+\DWATEunsignedcharTARG & unsigned character \\
+
+\EncodingGroup{Character encodings} \\
+\DWATEASCIITARG{} & \addtoindex{ISO/IEC 646:1991 character}
+ \addtoindexx{ASCII character} \\
+\DWATEUCSTARG{} & \addtoindex{ISO/IEC 10646-1:1993 character (UCS-4)}
+ \addtoindexx{UCS character} \\
+\DWATEUTFTARG{} & \addtoindex{ISO/IEC 10646-1:1993 character}
+ \addtoindexx{UTF character} \\
+
+\EncodingGroup{Scaled encodings} \\
+\DWATEsignedfixedTARG{} & signed fixed-point scaled integer \\
+\DWATEunsignedfixedTARG & unsigned fixed-point scaled integer \\
+
+\EncodingGroup{Floating-point encodings} \\
+\DWATEfloatTARG & binary floating-point number \\
+\DWATEcomplexfloatTARG & complex binary floating-point number \\
+\DWATEimaginaryfloatTARG & imaginary binary floating-point number \\
+\DWATEdecimalfloatTARG{} & \addtoindex{IEEE 754R decimal floating-point number} \\
+
+\EncodingGroup{Decimal string encodings} \\
+\DWATEpackeddecimalTARG & packed decimal number\\
+\DWATEnumericstringTARG & numeric string \\
+\DWATEeditedTARG & edited string \\
+
\hline
+\multicolumn{2}{l}{$^a$For segmented addresses, see Section \refersec{chap:segmentedaddresses}} \\
\end{tabular}
\end{table}
-\textit{The \DWATEdecimalfloat{} encoding is intended for
-floating\dash point representations that have a power\dash of\dash ten
-exponent, such as that specified in IEEE 754R.}
+\subsubsection{Simple Encodings}
+\label{simpleencodings}
+Types with simple encodings are widely supported in many
+programming languages and do not require further discussion.
-\textit{The \DWATEUTF{} encoding is intended for \addtoindex{Unicode}
+\needlines{6}
+\subsubsection{Character Encodings}
+\label{characterencodings}
+The \DWATEUTF{} encoding is intended for \addtoindex{Unicode}
string encodings (see the Universal Character Set standard,
ISO/IEC 10646\dash 1:1993).
- \addtoindexx{ISO 10646 character set standard}
+\addtoindexx{ISO 10646 character set standard}
For example, the
\addtoindex{C++} type char16\_t is
represented by a base type entry with a name attribute whose
value is \doublequote{char16\_t}, an encoding attribute whose value
-is \DWATEUTF{} and a byte size attribute whose value is 2.}
+is \DWATEUTF{} and a byte size attribute whose value is 2.
-\textit{The \DWATEASCII{} and \DWATEUCS{} encodings are intended for
+\needlines{4}
+The \DWATEASCII{} and \DWATEUCS{} encodings are intended for
the {Fortran 2003} string kinds
\texttt{ASCII}\index{ASCII@\texttt{ASCII} (Fortran string kind)} (ISO/IEC 646:1991) and
-\texttt{ISO\_10646}\index{ISO\_10646@\texttt{ISO\_10646} (Fortran string kind)} (UCS-4 in ISO/IEC 10646:2000).}
+\texttt{ISO\_10646}\index{ISO\_10646@\texttt{ISO\_10646} (Fortran string kind)} (UCS-4 in ISO/IEC 10646:2000).
\addtoindexx{ISO 10646 character set standard}
-The
-\DWATEpackeddecimal{}
-and
-\DWATEnumericstring{}
-base types
+\subsubsection{Scaled Encodings}
+\label{scaledencodings}
+The \DWATEsignedfixed{} and \DWATEunsignedfixed{} entries
+describe signed and unsigned fixed\dash point binary data types,
+respectively.
+
+The fixed binary type encodings have a
+\DWATdigitcount{} attribute\addtoindexx{digit count attribute}
+with the same interpretation as described for the
+\DWATEpackeddecimal{} and \DWATEnumericstring{} base type encodings
+(see Section \refersec{chap:decimalstringencodings}).
+
+\needlines{4}
+For a data type with a decimal scale factor, the fixed binary
+type entry has a \DWATdecimalscale{} attribute
+\addtoindexx{decimal scale attribute}
+with the same interpretation as described for the
+\DWATEpackeddecimal{} and \DWATEnumericstring{} base types
+(see Section \refersec{chap:decimalstringencodings}).
+
+\hypertarget{chap:DWATbinaryscalebinaryscalefactorforfixedpointtype}{}
+For a data type with a binary scale factor, the fixed
+binary type entry has a \DWATbinaryscaleNAME{} attribute.
+The \DWATbinaryscaleDEFN{} attribute\addtoindexx{binary scale attribute}
+is an \livelink{chap:classconstant}{integer constant} value
+that represents the exponent of the base two scale factor to
+be applied to an instance of the type. Zero scale puts the
+binary point immediately to the right of the least significant
+bit. Positive scale moves the binary point to the right and
+implies that additional zero bits on the right are not stored
+in an instance of the type. Negative scale moves the binary
+point to the left; if the absolute value of the scale is
+larger than the number of bits, this implies additional zero
+bits on the left are not stored in an instance of the type.
+
+For
+\hypertarget{chap:DWATsmallscalefactorforfixedpointtype}{}
+a data type with a non-decimal and non-binary scale factor,
+the fixed binary type entry has a \DWATsmallDEFN{} attribute which
+\addtoindexx{small attribute} references a
+\DWTAGconstant{} entry. The scale factor value
+is interpreted in accordance with the value defined by the
+\DWTAGconstant{} entry. The value represented is the product
+of the integer value in memory and the associated constant
+entry for the type.
+
+\textit{The \DWATsmall{} attribute is defined with the
+\addtoindex{Ada} \texttt{small} attribute in mind.}
+
+\needlines{6}
+\subsubsection{Floating-Point Encodings}
+\label{chap:floatingpointencodings}
+Types with binary floating-point encodings
+(\DWATEfloat{}, \DWATEcomplexfloat{} and \DWATEimaginaryfloat{})
+are supported in many
+programming languages and do not require further discussion.
+
+The \DWATEdecimalfloat{} encoding is intended for
+floating-point representations that have a power-of-ten
+exponent, such as that specified in IEEE 754R.
+
+\subsubsection{Decimal String Encodings}
+\label{chap:decimalstringencodings}
+The \DWATEpackeddecimalDEFN{} and \DWATEnumericstringDEFN{}
+base type encodings
represent packed and unpacked decimal string numeric data
-types, respectively, either of which may be
-either
+types, respectively, either of which may be either
\addtoindexx{decimal scale attribute}
signed
\addtoindexx{decimal sign attribute}
or
\addtoindexx{digit count attribute}
-unsigned.
-\hypertarget{chap:DWATdecimalsigndecimalsignrepresentation}{}
-These
-\hypertarget{chap:DWATdigitcountdigitcountforpackeddecimalornumericstringtype}{}
+unsigned. These
base types are used in combination with
\DWATdecimalsign,
\DWATdigitcount{} and
attributes.
\needlines{5}
-A \DWATdecimalsign{} attribute
+\hypertarget{chap:DWATdecimalsigndecimalsignrepresentation}{}
+A \DWATdecimalsignDEFN{} attribute
\addtoindexx{decimal sign attribute}
is an \livelink{chap:classconstant}{integer constant} that
conveys the representation of the sign of the decimal type
\caption{Decimal sign attribute values}
\label{tab:decimalsignattributevalues}
\centering
-\begin{tabular}{l|p{9cm}}
+\begin{tabular}{l|P{9cm}}
\hline
Name & Meaning \\
\hline
\DWDSunsignedTARG{} & Unsigned \\
\DWDSleadingoverpunchTARG{} & Sign
-is encoded in the most significant digit in a target\dash dependent manner \\
+is encoded in the most significant digit in a target-dependent manner \\
\DWDStrailingoverpunchTARG{} & Sign
-is encoded in the least significant digit in a target\dash dependent manner \\
+is encoded in the least significant digit in a target-dependent manner \\
\DWDSleadingseparateTARG{}
& Decimal type: Sign is a \doublequote{+} or \doublequote{-} character
to the left of the most significant digit. \\
\end{tabular}
\end{table}
+\needlines{4}
\hypertarget{chap:DWATdecimalscaledecimalscalefactor}{}
-The \DWATdecimalscale{}
+The \DWATdecimalscaleDEFN{}
attribute
\addtoindexx{decimal scale attribute}
is an integer constant value
is larger than the digit count, this implies additional zero
digits on the left are not stored in an instance of the type.
-The
-\DWATdigitcount{}
-attribute
+The \DWATdigitcountDEFN{} attribute
\addtoindexx{digit count attribute}
+\hypertarget{chap:DWATdigitcountdigitcountforpackeddecimalornumericstringtype}{}
is an \livelink{chap:classconstant}{integer constant}
value that represents the number of digits in an instance of
the type.
-The \DWATEedited{}
-base
+The \DWATEedited{} base
\hypertarget{chap:DWATpicturestringpicturestringfornumericstringtype}{}
type is used to represent an edited
numeric or alphanumeric data type. It is used in combination
-with a \DWATpicturestring{} attribute whose value is a
+with a \DWATpicturestringDEFN{} attribute whose value is a
null\dash terminated string containing the target\dash dependent picture
string associated with the type.
If the edited base type entry describes an edited numeric
data type, the edited type entry has a \DWATdigitcount{} and a
-\DWATdecimalscale{} attribute.
-\addtoindexx{decimal scale attribute}
+\DWATdecimalscale{} attribute.\addtoindexx{decimal scale attribute}
These attributes have the same
interpretation as described for the
\DWATEpackeddecimal{} and
describes an edited alphanumeric data type, the edited type
entry does not have these attributes.
-
\textit{The presence or absence of the \DWATdigitcount{} and
-\DWATdecimalscale{} attributes
-\addtoindexx{decimal scale attribute}
+\DWATdecimalscale{} attributes\addtoindexx{decimal scale attribute}
allows a debugger to easily
distinguish edited numeric from edited alphanumeric, although
in principle the digit count and scale are derivable by
interpreting the picture string.}
-The \DWATEsignedfixed{} and \DWATEunsignedfixed{} entries
-describe signed and unsigned fixed\dash point binary data types,
-respectively.
-
-The fixed binary type entries have
-\addtoindexx{digit count attribute}
-a
-\DWATdigitcount{}
-attribute with the same interpretation as described for the
-\DWATEpackeddecimal{} and \DWATEnumericstring{} base types.
-
-\needlines{4}
-For a data type with a decimal scale factor, the fixed binary
-type entry has a
-\DWATdecimalscale{} attribute
-\addtoindexx{decimal scale attribute}
-with the same
-interpretation as described for the
-\DWATEpackeddecimal{}
-and \DWATEnumericstring{} base types.
-
-\hypertarget{chap:DWATbinaryscalebinaryscalefactorforfixedpointtype}{}
-For a data type with a binary scale factor, the fixed
-\addtoindexx{binary scale attribute}
-binary type entry has a
-\DWATbinaryscale{} attribute.
-The
-\DWATbinaryscale{} attribute
-is an \livelink{chap:classconstant}{integer constant} value
-that represents the exponent of the base two scale factor to
-be applied to an instance of the type. Zero scale puts the
-binary point immediately to the right of the least significant
-bit. Positive scale moves the binary point to the right and
-implies that additional zero bits on the right are not stored
-in an instance of the type. Negative scale moves the binary
-point to the left; if the absolute value of the scale is
-larger than the number of bits, this implies additional zero
-bits on the left are not stored in an instance of the type.
-
-For
-\hypertarget{chap:DWATsmallscalefactorforfixedpointtype}{}
-a data type with a non\dash decimal and non\dash binary scale factor,
-the fixed binary type entry has a
-\DWATsmall{} attribute which
-\addtoindexx{small attribute}
-references a
-\DWTAGconstant{} entry. The scale factor value
-is interpreted in accordance with the value defined by the
-\DWTAGconstant{} entry. The value represented is the product
-of the integer value in memory and the associated constant
-entry for the type.
-
-\textit{The \DWATsmall{} attribute
-is defined with the \addtoindex{Ada} \texttt{small}
-attribute in mind.}
\section{Unspecified Type Entries}
\label{chap:unspecifiedtypeentries}
a null\dash terminated
string containing the name as it appears in the source program.
-The interpretation of this debugging information entry is
+\textit{The interpretation of this debugging information entry is
intentionally left flexible to allow it to be interpreted
appropriately in different languages. For example, in
\addtoindex{C} and \addtoindex{C++}
to by the type attribute of an access type where the denoted
\addtoindexx{incomplete type (Ada)}
type is incomplete (the name is declared as a type but the
-definition is deferred to a separate compilation unit).
+definition is deferred to a separate compilation unit).}
-\addtoindex{C++} permits using the
+\textit{\addtoindex{C++} permits using the
\autoreturntype{} specifier for the return type of a member function declaration.
The actual return type is deduced based on the definition of the
function, so it may not be known when the function is declared. The language
implementation can provide an unspecified type entry with the name \texttt{auto} which
can be referenced by the return type attribute of a function declaration entry.
When the function is later defined, the \DWTAGsubprogram{} entry for the definition
-includes a reference to the actual return type.
+includes a reference to the actual return type.}
\section{Type Modifier Entries}
have
\hypertarget{chap:DWATadressclasspointerorreferencetypes}{}
a
-\DWATaddressclass{}
+\DWATaddressclassDEFN{}
attribute to describe how objects having the given pointer
or reference type ought to be dereferenced.
\caption{Type modifier tags}
\label{tab:typemodifiertags}
\centering
-\begin{tabular}{l|p{9cm}}
+\begin{tabular}{l|P{9cm}}
\hline
Name&Meaning\\ \hline
\DWTAGatomictypeTARG{} & C \addtoindex{\_Atomic} qualified type \\
\hypertarget{chap:DWATorderingarrayrowcolumnordering}{}
array type entry describing a multidimensional array may
\addtoindexx{array!element ordering}
-have a \DWATordering{} attribute whose
+have a \DWATorderingDEFN{} attribute whose
\livelink{chap:classconstant}{integer constant} value is
interpreted to mean either row-major or column-major ordering
of array elements. The set of values and their meanings
for the ordering attribute are listed in
-Table \refersec{tab:arrayordering}.
+Table \referfol{tab:arrayordering}.
If no
ordering attribute is present, the default ordering for the
source language (which is indicated by the
indicated element type, then the array type
\addtoindexx{bit stride attribute}
entry has either a
-\DWATbytestride{}
+\DWATbytestrideDEFN{}
or
\addtoindexx{byte stride attribute}
-a \DWATbitstride{}
+a \DWATbitstrideDEFN{}
attribute,
\addtoindexx{bit stride attribute}
whose value
\DWATrank{} attribute. See also Section
\refersec{chap:DWATrank}.
-
-\needlines{5}
+%\needlines{5}
Other attributes especially applicable to arrays are
\DWATallocated,
\DWATassociated{} and
\DWATdatalocation,
which are described in
-Section \refersec{chap:dynamictypeproperties}.
+Section \refersec{chap:dynamicpropertiesoftypes}.
For relevant examples, see also Appendix \refersec{app:fortranarrayexample}.
\section{Coarray Type Entries}
only a lower bound and no upper bound.}
\textit{How coarray elements are located and how coindices are
-converted to process specifications is processor-dependent.}
+converted to process specifications is implementation-defined.}
\needlines{8}
\section{Structure, Union, Class and Interface Type Entries}
\textit{The \addtoindex{C++} notion of
structure is more general than in \addtoindex{C}, being
equivalent to a class with minor differences. Accordingly,
-in the following discussion statements about
+in the following discussion, statements about
\addtoindex{C++} classes may
be understood to apply to \addtoindex{C++} structures as well.}
-\textit{\addtoindex{C++} has the notion of a "trivial" class,
-whose objects can be bitwise copied. Trivial classes may have
-different rules for passing objects of that type as parameters
-or return values.}
-
\subsection{Structure, Union and Class Type Entries}
\label{chap:structureunionandclasstypeentries}
Structure, union, and class types are represented by debugging
and appear in the same order as the corresponding declarations
in the source program.
-A structure, union, or class type may have a \DWATexportsymbolsNAME{}
-attribute
+A structure, union, or class type may have a \DWATexportsymbolsDEFN{}
+attribute\addtoindexx{export symbols (of structure, class or union) attribute}
\livetarg{chap:DWATexportsymbolsofstructunionclass}{}
which indicates that all member names defined within
the structure, union, or class may be referenced as if they were
If the complete declaration of a type has been placed in
\hypertarget{chap:DWATsignaturetypesignature}{}
a separate \addtoindex{type unit}
-(see Section \refersec{chap:separatetypeunitentries}),
+(see Section \refersec{chap:typeunitentries}),
an incomplete declaration
\addtoindexx{incomplete type}
of that type in the compilation unit may provide
-the unique 64\dash bit signature of the type using
+the unique 64-bit signature of the type using a
\addtoindexx{type signature}
-a \DWATsignature{}
-attribute.
+\DWATsignatureDEFN{} attribute.
If a structure, union or class entry represents the definition
of a structure, union or class member corresponding to a prior
owned by the body of the structure, union or class entry and
representing a non\dash defining declaration of the data, function
or type member. The referenced entry will not have information
-about the location of that member (low and high pc attributes
+about the location of that member (low and high PC attributes
for function members, location descriptions for data members)
and will have a \DWATdeclaration{} attribute.
\needlines{4}
A structure type, union type or class type entry may have a
-\DWATcallingconvention{} attribute,
-\addtoindexx{calling convention attribute}
+\DWATcallingconventionDEFN{} attribute,
+\addtoindexx{calling convention attribute!for types}
whose value indicates whether a value of the type should be passed by reference
or passed by value. The set of calling convention codes for use with types
\addtoindexx{calling convention codes!for types}
is given in Table \referfol{tab:callingconventioncodesfortypes}.
\begin{simplenametable}[2.2in]{Calling convention codes for types}{tab:callingconventioncodesfortypes}
-\DWCCnormalTARG \\
+\DWCCnormal \\
\DWCCpassbyvalueTARG \\
\DWCCpassbyreferenceTARG \\
\end{simplenametable}
entry and that appear in the same order as the corresponding
declarations in the source program.
-\subsection{Derived or Extended Structs, Classes and Interfaces}
+\subsection{Derived or Extended Structures, Classes and Interfaces}
\label{chap:derivedorextendedstructsclasesandinterfaces}
\textit{In \addtoindex{C++}, a class (or struct)
the
tag \DWTAGinheritanceTARG.
+\needlines{4}
An inheritance entry
\addtoindexx{type attribute}
has
\addtoindexx{inheritance entry}
for a class that derives from or extends
\hypertarget{chap:DWATdatamemberlocationinheritedmemberlocation}{}
-another class or struct also has
+another class or struct also has a
+\DWATdatamemberlocationDEFN{} attribute,
\addtoindexx{data member location attribute}
-a
-\DWATdatamemberlocation{}
-attribute, whose value describes the location of the beginning
+whose value describes the location of the beginning
of the inherited type relative to the beginning address of the
instance of the derived class. If that value is a constant, it is the offset
in bytes from the beginning of the class to the beginning of
may
\addtoindexx{accessibility attribute}
have a
-\DWATaccessibility{}
+\DWATaccessibilityDEFN{}
attribute.
-If no accessibility attribute
-is present, private access is assumed for an entry of a class
-and public access is assumed for an entry of an interface,
-struct or union.
+If no accessibility attribute is present, private access
+is assumed for an entry of a class and public access is
+assumed for an entry of a struct, union or interface.
-If
-\hypertarget{chap:DWATvirtualityvirtualityofbaseclass}{}
+If\hypertarget{chap:DWATvirtualityvirtualityofbaseclass}{}
the class referenced by the
\addtoindexx{inheritance entry}
inheritance entry serves
as a \addtoindex{C++} virtual base class, the inheritance entry has a
-\DWATvirtuality{} attribute.
+\DWATvirtualityDEFN{} attribute.
\textit{For a \addtoindex{C++} virtual base, the
\addtoindex{data member location attribute}
\hypertarget{chap:DWATaccessibilitycppbaseclasses}{}
also
has a
-\DWATaccessibility{}
+\DWATaccessibilityDEFN{}
attribute describing the declared accessibility of the named
entities.
\subsection{Friends}
\label{chap:friends}
-Each \doublequote{friend}
-\addtoindexx{friend entry}
+Each friend\addtoindexx{friend entry}
declared by a structure, union or class
\hypertarget{chap:DWATfriendfriendrelationship}{}
type may be represented by a debugging information entry
that is a child of the structure, union or class type entry;
-the friend entry has the
-tag \DWTAGfriendTARG.
+the friend entry has the tag \DWTAGfriendTARG.
-A friend entry has
-\addtoindexx{friend attribute}
-a \DWATfriend{} attribute, whose value is
+A friend entry has a \DWATfriendDEFN{} attribute,
+\addtoindexx{friend attribute} whose value is
a reference to the debugging information entry describing
the declaration of the friend.
the name attribute is omitted or the value of the attribute
consists of a single zero byte.
-The data member entry has
-\addtoindexx{type attribute}
-a
-\DWATtype{} attribute to denote
-\addtoindexx{member entry (data)}
-the type of that member.
+The data member entry has a
+\DWATtype{} attribute\addtoindexx{type attribute} to denote
+\addtoindexx{member entry (data)} the type of that member.
-A data member entry may
-\addtoindexx{accessibility attribute}
-have a
-\DWATaccessibility{}
-attribute. If no accessibility attribute is present, private
-access is assumed for an entry of a class and public access
-is assumed for an entry of a structure, union, or interface.
+A data member entry may have a \DWATaccessibility{}
+attribute.\addtoindexx{accessibility attribute}
+If no accessibility attribute is present, private
+access is assumed for an member of a class and public access
+is assumed for an member of a structure, union, or interface.
A data member
\hypertarget{chap:DWATmutablemutablepropertyofmemberdata}{}
\addtoindexx{member entry (data)}
may
\addtoindexx{mutable attribute}
-have a \DWATmutable{} attribute,
+have a \DWATmutableDEFN{} attribute,
which is a \livelink{chap:classflag}{flag}.
This attribute indicates whether the data
member was declared with the mutable storage class specifier.
The member entry
\addtoindexx{member entry (data)}
-corresponding to a data member that is
+corresponding to a data member that is defined
\hypertarget{chap:DWATdatabitoffsetdatamemberbitlocation}{}
-defined
\hypertarget{chap:DWATdatamemberlocationdatamemberlocation}{}
-in a structure, union or class may have either
+in a structure, union or class may have either a
+\DWATdatamemberlocationDEFN{} attribute
\addtoindexx{data member location attribute}
-a
-\DWATdatamemberlocation{} attribute or a
-\DWATdatabitoffset{}
-attribute. If the beginning of the data member is the same as
+or a \DWATdatabitoffsetDEFN{} attribute.
+\addtoindexx{data bit offset attribute}
+If the beginning of the data member is the same as
the beginning of the containing entity then neither attribute
is required.
\addtoindexx{data member location attribute}
there are two cases:
\begin{enumerate}[1. ]
-\item If the value is an \livelink{chap:classconstant}{integer constant},
+\item If the value is an
+\livelink{chap:classconstant}{integer constant},
it is the offset
in bytes from the beginning of the containing entity. If
the beginning of the containing entity has a non-zero bit
If the size of a data member is not the same as the size
of the type given for the data member, the data member has
-\addtoindexx{bit size attribute}
-either a \DWATbytesize{}
-or a \DWATbitsize{} attribute whose
+either a \DWATbytesize\addtoindexx{byte size attribute}
+or a \DWATbitsize{} attribute\addtoindexx{bit size attribute} whose
\livelink{chap:classconstant}{integer constant} value
(see Section \refersec{chap:staticanddynamicvaluesofattributes})
is the amount
of storage needed to hold the value of the data member.
-\textit{Bit fields in \addtoindex{C} and \addtoindex{C++}
-typically
-\addtoindexx{bit fields}
-require the use
-\addtoindexx{data bit offset}
-of
-\addtoindexx{data bit size}
-the
-\DWATdatabitoffset{} and
-\DWATbitsize{} attributes.}
-
-\needlines{6}
-\textit{This Standard uses the following bit numbering and direction
-conventions in examples. These conventions are for illustrative
-purposes and other conventions may apply on particular
-architectures.}
-\begin{itemize}
-\item \textit{For big\dash endian architectures, bit offsets are
-counted from high-order to low\dash order bits within a byte (or
-larger storage unit); in this case, the bit offset identifies
-the high\dash order bit of the object.}
-
-\item \textit{For little\dash endian architectures, bit offsets are
-counted from low\dash order to high\dash order bits within a byte (or
-larger storage unit); in this case, the bit offset identifies
-the low\dash order bit of the object.}
-\end{itemize}
-
-
-\textit{In either case, the bit so identified is defined as the
-\addtoindexx{beginning of an object}
-beginning of the object.}
-
-\needlines{5}
-\textit{For example, take one possible representation of the following
-\addtoindex{C} structure definition
-in both big\dash and little\dash endian byte orders:}
-
-\begin{lstlisting}
-struct S {
- int j:5;
- int k:6;
- int m:5;
- int n:8;
-};
-\end{lstlisting}
-
-\textit{Figures \referfol{fig:bigendiandatabitoffsets} and
-\refersec{fig:littleendiandatabitoffsets}
-show the structure layout
-and data bit offsets for example big\dash\ and little\dash endian
-architectures, respectively. Both diagrams show a structure
-that begins at address A and whose size is four bytes. Also,
-high order bits are to the left and low order bits are to
-the right.}
-
-\begin{figure}[h]
-\begin{dwflisting}
-\begin{verbatim}
-
- j:0
- k:5
- m:11
- n:16
-
- Addresses increase ->
- | A | A + 1 | A + 2 | A + 3 |
-
- Data bit offsets increase ->
- +---------------+---------------+---------------+---------------+
- |0 4|5 10|11 15|16 23|24 31|
- | j | k | m | n | <pad> |
- | | | | | |
- +---------------------------------------------------------------+
-
-\end{verbatim}
-\end{dwflisting}
-\caption{Big-endian data bit offsets}
-\label{fig:bigendiandatabitoffsets}
-\end{figure}
-
-\begin{figure}[h]
-\begin{dwflisting}
-\begin{verbatim}
-
- j:0
- k:5
- m:11
- n:16
- <- Addresses increase
- | A + 3 | A + 2 | A + 1 | A |
-
- <- Data bit offsets increase
- +---------------+---------------+---------------+---------------+
- |31 24|23 16|15 11|10 5|4 0|
- | <pad> | n | m | k | j |
- | | | | | |
- +---------------------------------------------------------------+
-
-\end{verbatim}
-\end{dwflisting}
-\caption{Little-endian data bit offsets}
-\label{fig:littleendiandatabitoffsets}
-\end{figure}
-
-\needlines{4}
-\textit{Note that data member bit offsets in this example are the
-same for both big\dash\ and little\dash endian architectures even
-though the fields are allocated in different directions
-(high\dash order to low-order versus low\dash order to high\dash order);
-the bit naming conventions for memory and/or registers of
-the target architecture may or may not make this seem natural.}
-
-\textit{For a more extensive example showing nested and packed records
-and arrays, see
-Appendix \refersec{app:pascalexample}.}
+\textit{For showing nested and packed records and arrays,
+see Appendix \refersec{app:pascalexample} and
+\refersec{app:ccppbitfieldexamples}.}
-\needlines{4}
-\textit{Attribute \DWATdatabitoffset{}
-is new in
-\addtoindex{DWARF Version 4}, unchanged in \addtoindex{DWARF Version 5},
-and is also used for base types
-(see Section
-\refersec{chap:basetypeentries}).
-It replaces the
-\livetarg{chap:DWATbitoffsetdatamemberbitlocation}{}
-attributes \DWATbitoffset{} and
-\DWATbytesize{} when used to
-identify the beginning of bit field data members as defined
-in DWARF V3 and earlier. The \DWATbytesize,
-\DWATbitsize{} and
-\DWATbitoffset{}
-attribute combination is deprecated for data members in DWARF
-Version 4 and later. See Section 5.6.6 in the DWARF Version 4
-specification for a discussion of compatibility considerations.}
\subsection{Member Function Entries}
\label{chap:memberfunctionentries}
\hypertarget{chap:DWATvirtualityvirtualityoffunction}{}
the member function entry describes a virtual function,
then that entry has a
-\DWATvirtuality{} attribute.
+\DWATvirtualityDEFN{} attribute.
If
\hypertarget{chap:DWATexplicitexplicitpropertyofmemberfunction}{}
function, then that entry has
\addtoindexx{explicit attribute}
a
-\DWATexplicit{} attribute.
+\DWATexplicitDEFN{} attribute.
An
\hypertarget{chap:DWATvtableelemlocationvirtualfunctiontablevtableslot}{}
entry for a virtual function also has a
-\DWATvtableelemlocation{}
+\DWATvtableelemlocationDEFN{}
\addtoindexi{attribute}{vtable element location attribute} whose value contains
a \addtoindex{location description}
yielding the address of the slot
\addtoindexx{self pointer attribute|see{object pointer attribute}}
has
\addtoindexx{object pointer attribute}
-a \DWATobjectpointer{}
-attribute
+a \DWATobjectpointerDEFN{} attribute
whose value is a \livelink{chap:classreference}{reference}
to the formal parameter entry
that corresponds to the object for which the function is
object formal parameter has a type that has an equivalent
const\dash volatile qualification.
-\textit{In \addtoindex{C++:2011 (ISO)}, non-static member functions can also have one of the
-ref-qualifiers, \& and \&\&. They do not change the type of the
-\doublequote{\texttt{this}}-pointer, but they affect the types of object values the
-function can be invoked on.}
+\textit{Beginning in \addtoindex{C++:2011 (ISO)}, non-static member
+functions can also have one of the ref-qualifiers, \& and \&\&.
+These do not change the type of the
+\doublequote{\texttt{this}}-pointer, but they do affect the types of
+object values on which the function can be invoked.}
-The member function entry may have an \DWATreferenceNAME{} attribute
+\needlines{6}
+The member function entry may have an \DWATreferenceDEFN{} attribute
\livetarg{chap:DWATreferenceofnonstaticmember}{}
to indicate a non-static member function that can only be called on
-l-value objects, or the \DWATrvaluereferenceNAME{} attribute
+lvalue objects, or the \DWATrvaluereferenceDEFN{} attribute
\livetarg{chap:DWATrvaluereferenceofnonstaticmember}{}
-to indicate that it can only be called on pr-values and x-values.
+to indicate that it can only be called on prvalues and xvalues.
+
+\textit{The lvalue, prvalue and xvalue concepts are defined in the
+\addtoindex{C++:2011} and later standards and not repeated or
+considered further in DWARF.}
If a subroutine entry represents the defining declaration
of a member function and that definition appears outside of
the declaration of this function member. The referenced entry
will be a child of some class (or structure) type entry.
+\needlines{6}
Subroutine entries containing the
\DWATspecification{} attribute
\addtoindexx{specification attribute}
when used on other member functions.}
If the member function entry has been declared as deleted,
-\hypertarget{chap:DWATdeleted}{}
-then that entry has a \DWATdeletedTARG{} attribute.\addtoindexx{deleted attribute}
+then that entry has a \DWATdeletedDEFN{}\livetarg{chap:DWATdeleteddef}{}
+attribute.\addtoindexx{deleted attribute}
\textit{In \addtoindex{C++}, a special member function may be
declared as defaulted, which explicitly declares a default
class.}
If the member function has been declared as defaulted,
-then the entry has a \DWATdefaultedTARG{}
+then the entry has a \DWATdefaultedDEFN{}\livetarg{chap:DWATdefaulteddef}{}
attribute\addtoindexx{defaulted attribute}
whose integer constant value indicates whether, and if so,
how, that member is defaulted. The possible values and
their meanings are shown in
Table \referfol{tab:defaultedattributevaluenames}.
+\needlines{8}
\begin{centering}
\setlength{\extrarowheight}{0.1cm}
\begin{longtable}{l|l}
of a
\addtoindexx{member entry (data)!as discriminant}
structure data member entry. The variant part entry will
-\addtoindexx{discriminant attribute}
have a
-\DWATdiscr{} attribute
+\DWATdiscrDEFN{} attribute \addtoindexx{discriminant attribute}
whose value is a \livelink{chap:classreference}{reference} to
the member entry for the discriminant.
tag \DWTAGvariantTARG{}
and is a child of the variant part entry. The value that
selects a given variant may be represented in one of three
-ways. The variant entry may have a
-\DWATdiscrvalue{} attribute
-whose value represents a single case label. The value of this
+ways. The variant entry may have a \DWATdiscrvalueDEFN{}
+attribute\addtoindexx{discriminant value attribute}
+whose value represents the discriminant value selecting
+this variant. The value of this
attribute is encoded as an LEB128 number. The number is signed
if the tag type for the variant part containing this variant
is a signed type. The number is unsigned if the tag type is
\hypertarget{chap:DWATdiscrlistlistofdiscriminantvalues}{}
the variant entry may contain
\addtoindexx{discriminant list attribute}
-a
-\DWATdiscrlist{}
+a \DWATdiscrlistDEFN{}
attribute, whose value represents a list of discriminant
values. This list is represented by any of the
-\livelink{chap:classblock}{block} forms and
-may contain a mixture of case labels and label ranges. Each
-item on the list is prefixed with a discriminant value
+\livelink{chap:classblock}{block} forms and may contain a
+mixture of discriminant values and discriminant ranges.
+Each item on the list is prefixed with a discriminant value
descriptor that determines whether the list item represents
a single label or a label range. A single case label is
represented as an LEB128 number as defined above for
then the \addtoindex{enumeration type entry} may
\addtoindexx{enum class|see{type-safe enumeration}}
-have a \DWATenumclass{}
+have a \DWATenumclassDEFN{}
attribute, which is a \livelink{chap:classflag}{flag}.
In a language that offers only
one kind of enumeration declaration, this attribute is not
enumerator entries appear in the same order as the declarations
of the enumeration literals in the source program.
-Each \addtoindex{enumerator entry} has a
-\DWATname{} attribute, whose
+\needlines{4}
+Each \addtoindex{enumerator entry} has a \DWATname{} attribute, whose
\addtoindexx{name attribute}
-value is a null\dash terminated string containing the name of the
+value is a null-terminated string containing the name of the
\hypertarget{chap:DWATconstvalueenumerationliteralvalue}{}
enumeration literal as it appears in the source program.
Each enumerator entry also has a
-\DWATconstvalue{} attribute,
+\DWATconstvalueDEFN{} attribute,
+\addtoindexx{constant value attribute}
whose value is the actual numeric value of the enumerator as
represented on the target system.
-
If the enumeration type occurs as the description of a
\addtoindexx{enumeration type entry!as array dimension}
dimension of an array type, and the stride for that dimension
is different than what would otherwise be determined, then
\hypertarget{chap:DWATbitstrideenumerationstridedimensionofarraytype}{}
the enumeration type entry has either a
-\DWATbytestride{}
-or \DWATbitstride{} attribute
+\DWATbytestrideDEFN{}
+or \DWATbitstrideDEFN{} attribute
\addtoindexx{bit stride attribute}
which specifies the separation
between successive elements along the dimension as described
declaration may have
\addtoindexx{prototyped attribute}
a
-\DWATprototyped{} attribute, which is
+\DWATprototypedDEFN{} attribute, which is
a \livelink{chap:classflag}{flag}.
+\needlines{4}
Each debugging information entry owned by a subroutine
type entry corresponds to either a formal parameter or the sequence of
unspecified parameters of the subprogram type:
a null\dash terminated string containing the string type name as
it appears in the source program.
+A string type entry may have a \DWATtypeDEFN{}
+\livetargi{char:DWAATtypeofstringtype}{attribute}{type attribute!of string type entry}
+describing how each character is encoded and is to be interpreted.
+The value of this attribute is a \CLASSreference{} to a
+\DWTAGbasetype{} base type entry. If the attribute is absent,
+then the character is encoded using the system default.
+
\textit{The
\addtoindex{Fortran 2003} language standard allows string
types that are composed of different types of (same sized) characters.
\texttt{DEFAULT}\index{DEFAULT@\texttt{DEFAULT} (Fortran string kind)}
are defined.}
-A string type entry may have a \DWATtype{}
-\livetargi{char:DWAATtypeofstringtype}{attribute}{type attribute!of string type entry}
-describing how each character is encoded and is to be interpreted.
-The value of this attribute is a \CLASSreference to a
-\DWTAGbasetype{} base type entry. If the attribute is absent,
-then the character is encoded using the system default.
-
\needlines{4}
The string type entry may have a
\DWATbytesize{} attribute or
The
\hypertarget{chap:DWATstringlengthstringlengthofstringtype}{}
string type entry may also have a
-\DWATstringlength{} attribute
+\DWATstringlengthDEFN{} attribute
whose
\addtoindexx{string length attribute}
value is a
\addtoindex{location description} yielding the location
where the length of the string is stored in the program.
-If the \DWATstringlength{} attribute is not present, the size
+If the \DWATstringlengthNAME{} attribute is not present, the size
of the string is assumed to be the amount of storage that is
allocated for the string (as specified by the \DWATbytesize{}
or \DWATbitsize{} attribute).
The string type entry may also have a
-\DWATstringlengthbytesizeNAME{}
-attribute or
-\DWATstringlengthbitsizeNAME{} attribute,
+\DWATstringlengthbytesizeDEFN{} or
+\DWATstringlengthbitsizeDEFN{} attribute,
+\addtoindexx{string length size attribute}
\addtoindexx{string length attribute!size of length data}
whose value (see Section \refersec{chap:byteandbitsizes})
is the size of the data to be retrieved from the location
-referenced by the string length attribute. If no (byte or bit)
+referenced by the \DWATstringlength{} attribute. If no byte or bit
size attribute is present, the size of the data to be retrieved
is the same as the
\addtoindex{size of an address} on the target machine.
\needlines{8}
\addtoindexx{DWARF Version 5} % Avoid italics
\textit{Prior to DWARF Version 5, the meaning of a
-\DWATbytesize{} attribute depends on the presence of the
+\DWATbytesize{} attribute depended on the presence of the
\DWATstringlength{} attribute:
\begin{itemize}
-\item If \DWATstringlength{} is present, \DWATbytesize{}
- specifies the size of the length data to be retrieved
+\item If \DWATstringlength{} was present, \DWATbytesize{}
+ specified the size of the length data to be retrieved
from the location specified by the \DWATstringlength{} attribute.
-\item If \DWATstringlength{} is not present, \DWATbytesize{}
- specifies the amount of storage allocated for objects
+\item If \DWATstringlength{} was not present, \DWATbytesize{}
+ specified the amount of storage allocated for objects
of the string type.
\end{itemize}
-In DWARF Version 5, \DWATbytesize{} always specifies the amount of storage
+In \DWARFVersionV{}, \DWATbytesize{} always specifies the amount of storage
allocated for objects of the string type.}
\needlines{6}
\label{chap:subrangetypeentries}
\textit{Several languages support the concept of a \doublequote{subrange}
-type object. These objects can represent a subset of the
-values that an object of the basis type for the subrange can
-represent.
-Subrange type entries may also be used to represent
-the bounds of array dimensions.}
+type. Objects of the subrange type can represent only a contiguous
+subset (range) of values from the type on which the subrange is defined.
+Subrange types may also be used to represent the bounds of array dimensions.}
A subrange type is represented by a debugging information
-entry with the
-\addtoindexx{subrange type entry}
-tag \DWTAGsubrangetypeTARG.
-If a name has been
-given to the subrange type, then the subrange type entry
-has a \DWATname{} attribute
-\addtoindexx{name attribute}
-whose value is a null\dash terminated
+entry with the tag
+\DWTAGsubrangetypeTARG.\addtoindexx{subrange type entry}
+If a name has been given to the subrange type, then the
+subrange type entry has a
+\DWATname{} attribute\addtoindexx{name attribute}
+whose value is a null-terminated
string containing the subrange type name as it appears in
the source program.
-The tag \DWTAGgenericsubrange{} is
-used to describe arrays with a dynamic rank. See Section
+The tag \DWTAGgenericsubrange{}
+is used to describe arrays with a dynamic rank. See Section
\refersec{chap:DWTAGgenericsubrange}.
-The subrange entry may have
-\addtoindexx{type attribute}
-a \DWATtype{} attribute to describe
+The subrange entry may have a
+\DWATtype{} attribute\addtoindexx{type attribute} to describe
the type of object, called the basis type, of whose values
this subrange is a subset.
\DWATbitsize{}
attribute, whose value
(see Section \refersec{chap:staticanddynamicvaluesofattributes})
-is the amount of
-storage needed to hold a value of the subrange type.
+is the amount of storage needed to hold a value of the subrange type.
The
\hypertarget{chap:DWATthreadsscaledupcarrayboundthreadsscalfactor}{}
-subrange entry may have
-\addtoindexx{threads scaled attribute}
-a
-\DWATthreadsscaled{} attribute,
+subrange entry may have a
+\DWATthreadsscaledDEFN{} attribute\addtoindexx{threads scaled attribute},
which is a \livelink{chap:classflag}{flag}.
If present, this attribute indicates whether
this subrange represents a \addtoindex{UPC} array bound which is scaled
-by the runtime THREADS value (the number of \addtoindex{UPC} threads in
+by the runtime \texttt{THREADS} value (the number of \addtoindex{UPC} threads in
this execution of the program).
\textit{This allows the representation of a \addtoindex{UPC} shared array such as}
int shared foo[34*THREADS][10][20];
\end{lstlisting}
+\needlines{4}
The
\hypertarget{chap:DWATlowerboundlowerboundofsubrange}{}
subrange
\hypertarget{chap:DWATupperboundupperboundofsubrange}{}
entry may have the attributes
-\DWATlowerbound{}
+\DWATlowerboundDEFN{}
\addtoindexx{lower bound attribute}
-and \DWATupperbound{}
+and \DWATupperboundDEFN{}
\addtoindexx{upper bound attribute} to specify, respectively, the lower
and upper bound values of the subrange. The
-\DWATupperbound{}
-attribute
+\DWATupperboundNAME{} attribute
\hypertarget{chap:DWATcountelementsofsubrangetype}{}
-may
-% FIXME: The following matches DWARF4: odd as there is no default count.
+may be replaced by a
\addtoindexx{count attribute!default}
-be
\addtoindexx{count attribute}
-replaced by a
-\DWATcount{} attribute,
-whose
-value describes the number of elements in the subrange rather
-than the value of the last element. The value of each of
-these attributes is determined as described in
+\DWATcountDEFN{} attribute,
+whose value describes the number of elements in the subrange
+rather than the value of the last element. The value of each
+of these attributes is determined as described in
Section \refersec{chap:staticanddynamicvaluesofattributes}.
If the lower bound value is missing, the value is assumed to
-be a language\dash dependent default constant as defined in
+be a language-dependent default constant as defined in
Table \refersec{tab:languageencodings}.
\addtoindexx{lower bound attribute!default}
the subrange type entry has either
\addtoindexx{byte stride attribute}
a
-\DWATbytestride{} or
-\DWATbitstride{} attribute
+\DWATbytestrideDEFN{} or
+\DWATbitstrideDEFN{} attribute
\addtoindexx{bit stride attribute}
which specifies the separation
-between successive elements along the dimension as described
-in
+between successive elements along the dimension as described in
Section \refersec{chap:byteandbitsizes}.
\textit{Note that the stride can be negative.}
The \addtoindexx{pointer to member} entry also
\hypertarget{chap:DWATcontainingtypecontainingtypeofpointertomembertype}{}
-has a
-\DWATcontainingtype{}
-attribute, whose value is a \livelink{chap:classreference}{reference} to a debugging
+has a \DWATcontainingtypeDEFN{} attribute,
+\addtoindexx{containing type (of pointer) attribute}
+whose value is a \livelink{chap:classreference}{reference} to a debugging
information entry for the class or structure to whose members
objects of this type may point.
The \addtoindex{pointer to member entry}
\hypertarget{chap:DWATuselocationmemberlocationforpointertomembertype}{}
has a
-\DWATuselocation{} attribute
+\DWATuselocationDEFN{} attribute
\addtoindexx{use location attribute}
whose value is a
\addtoindex{location description} that computes the
(see Section \refersec{chap:staticanddynamicvaluesofattributes})
is the amount of storage need to hold a value of the file type.
-\section{Dynamic Type Entries and Properties}
-
-\subsection{Dynamic Type Entries}
+\section{Dynamic Type Entries}
+\label{chap:dynamictypeentries}
\textit{Some languages such as
\addtoindex{Fortran 90}, provide types whose values
may be dynamically allocated or associated with a variable
-under explicit program control. However, unlike the related
+under explicit program control. However, unlike the
pointer type in \addtoindex{C} or
\addtoindex{C++}, the indirection involved in accessing
the value of the variable is generally implicit, that is, not
-indicated as part of program source.}
+indicated as part of the program source.}
A dynamic type entry is used to declare a dynamic type that is
\doublequote{just like} another non-dynamic type without needing to
A dynamic type entry also has a \DWATdatalocation, and may also
have \DWATallocated{} and/or \DWATassociated{} attributes as
-described in Section \referfol{chap:dynamictypeproperties}.
+described in Section \refersec{chap:dynamicpropertiesoftypes}.
A \DWATdatalocation, \DWATallocated{} or \DWATassociated{} attribute
may not occur on a dynamic type entry if the same kind of attribute
already occurs on the type referenced by the \DWATtype{} attribute.
-\subsection{Dynamic Type Properties}
-\label{chap:dynamictypeproperties}
-\textit{
-The \DWATdatalocation, \DWATallocated{} and \DWATassociated{}
-attributes described in this section can be used for any type, not
-just dynamic types.}
\needlines{6}
-\subsubsection{Data Location}
+\section{Template Alias Entries}
+\label{chap:templatealiasentries}
+
+\textit{In \addtoindex{C++}, a template alias is a form of typedef that has template
+parameters. DWARF does not represent the template alias definition
+but does represent instantiations of the alias.}
+
+A type named using a template alias is represented
+by a debugging information entry
+\addtoindexx{template alias entry}
+with the tag
+\DWTAGtemplatealiasTARG.
+The template alias entry has a
+\DWATname{} attribute
+\addtoindexx{name attribute}
+whose value is a null\dash terminated string
+containing the name of the template alias as it appears in
+the source program.
+The template alias entry has child entries describing the template
+actual parameters (see Section \refersec{chap:templateparameters}).
+
+
+\section{Dynamic Properties of Types}
+\label{chap:dynamicpropertiesoftypes}
+\textit{The \DWATdatalocation, \DWATallocated{} and \DWATassociated{}
+attributes described in this section are motivated for use with
+\DWTAGdynamictype{} entries but can be used for any other type as well.}
+
+\needlines{6}
+\subsection{Data Location}
\label{chap:datalocation}
\textit{Some languages may represent objects using descriptors to hold
about the data that represents the value for that object.}
\hypertarget{chap:DWATdatalocationindirectiontoactualdata}{}
-The \DWATdatalocation{}
-attribute may be used with any
-\addtoindexx{data location attribute}
-type that provides one or more levels of
+The \DWATdatalocationDEFN{} attribute
+\addtoindexx{data (indirect) location attribute}
+may be used with any type that provides one or more levels of
\addtoindexx{hidden indirection|see{data location attribute}}
hidden indirection
-and/or run\dash time parameters in its representation. Its value
+and/or run-time parameters in its representation. Its value
is a \addtoindex{location description}.
The result of evaluating this
description yields the location of the data for an object.
for a \addtoindex{Fortran 90 array}, see
Appendix \refersec{app:fortranarrayexample}.}
-\subsubsection{Allocation and Association Status}
+\subsection{Allocation and Association Status}
\label{chap:allocationandassociationstatus}
\textit{Some languages, such as \addtoindex{Fortran 90},
under explicit program control.}
\hypertarget{chap:DWATallocatedallocationstatusoftypes}{}
-The
-\DWATallocated{}
-attribute
-\addtoindexx{allocated attribute}
-may optionally be used with any
+The \DWATallocatedDEFN{} attribute\addtoindexx{allocated attribute}
+may be used with any
type for which objects of the type can be explicitly allocated
and deallocated. The presence of the attribute indicates that
objects of the type are allocatable and deallocatable. The
\needlines{4}
\hypertarget{chap:DWATassociatedassociationstatusoftypes}{}
The
-\DWATassociated{} attribute
+\DWATassociatedDEFN{} attribute
may
\addtoindexx{associated attribute}
optionally be used with
integer value of the attribute (see below) indicates whether
an object of the type is currently associated or not.
-\textit{While these attributes are defined specifically with
-\addtoindex{Fortran 90} ALLOCATABLE and POINTER types
-in mind, usage is not limited
-to just that language.}
-
The value of these attributes is determined as described in
Section \refersec{chap:staticanddynamicvaluesofattributes}.
arrays,
see Appendix \refersec{app:aggregateexamples}.}
-\subsubsection{Array Rank}
+\subsection{Array Rank}
\label{chap:DWATrank}
\addtoindexx{array!assumed-rank}
\addtoindexx{assumed-rank array|see{array, assumed-rank}}
\textit{The Fortran language supports \doublequote{assumed-rank arrays}. The
rank (the number of dimensions) of an assumed-rank array is unknown
- at compile time. The Fortran runtime stores the rank in the array
- descriptor metadata.}
+ at compile time. The Fortran runtime stores the rank in an array
+ descriptor.}
The presence of the
\hypertarget{chap:DWATrankofdynamicarray}{\DWATrankINDX}
attribute indicates that an array's rank
(number of dimensions) is dynamic, and therefore unknown at compile
-time. The value of the \DWATrankNAME{} attribute is either an integer constant
-or a location expression whose evaluation yields the dynamic rank.
+time. The value of the \DWATrankDEFN{} attribute is either an integer constant
+or a DWARF expression whose evaluation yields the dynamic rank.
The bounds of an array with dynamic rank are described using a
\DWTAGgenericsubrange{} entry, which
expression will use it to find the offset of the respective field in
the array descriptor metadata.
-\textit{The Fortran compiler is free to choose any layout for the
+\textit{A producer is free to choose any layout for the
array descriptor. In particular, the upper and lower bounds and
stride values do not need to be bundled into a structure or record,
but could be laid end to end in the containing descriptor, pointed
to by the descriptor, or even allocated independently of the
descriptor.}
-Dimensions are enumerated $0$ to $\mathit{rank}-1$ in a left-to-right
-fashion.
+Dimensions are enumerated $0$ to $\mathit{rank}-1$ in source program
+order.
\textit{For an example in Fortran 2008, see
Section~\refersec{app:assumedrankexample}.}
-\needlines{6}
-\section{Template Alias Entries}
-\label{chap:templatealiasentries}
-
-\textit{
-In \addtoindex{C++}, a template alias is a form of typedef that has template
-parameters. DWARF does not represent the template alias definition
-but does represent instantiations of the alias.
-}
-
-A type named using a template alias is represented
-by a debugging information entry
-\addtoindexx{template alias entry}
-with the tag
-\DWTAGtemplatealiasTARG.
-The template alias entry has a
-\DWATname{} attribute
-\addtoindexx{name attribute}
-whose value is a null\dash terminated string
-containing the name of the template alias as it appears in
-the source program.
-The template alias entry has child entries describing the template
-actual parameters (see Section \refersec{chap:templateparameters}).
-