user\dash defined types.
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
+\hypertarget{chap:DWATstartscopetypedeclaration}{}
+the low PC value for the scope most closely enclosing the
declaration, the declaration may have a
-\livelink{chap:DWATstartscope}{DW\_AT\_start\_scope}
+\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
-\livetarg{chap:DWTAGbasetype}{DW\_TAG\_base\_type}.
+with the tag \DWTAGbasetypeTARG.
A \addtoindex{base type entry}
-has a \livelink{chap:DWATname}{DW\_AT\_name} 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 \livelink{chap:DWATencoding}{DW\_AT\_encoding} 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
-\livelink{chap:DWATencoding}{DW\_AT\_encoding} attribute
-is given in
-Table \refersec{tab:encodingattributevalues}
-and following text.
+a \DWATencoding{} attribute describing
+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 \livelink{chap:DWATendianity}{DW\_AT\_endianity} attribute
+may have a \DWATendianity{} attribute
\addtoindexx{endianity attribute}
as described in
Section \refersec{chap:dataobjectentries}.
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 \livelink{chap:DWATbytesize}{DW\_AT\_byte\_size} attribute
-\hypertarget{chap:DWATbitsizebasetypebitsize}
-or a \livelink{chap:DWATbitsize}{DW\_AT\_bit\_size} attribute
+\hypertarget{chap:DWATbytesizedataobjectordatatypesize}{}
+either a \DWATbytesize{} attribute
+\hypertarget{chap:DWATbitsizebasetypebitsize}{}
+or a \DWATbitsize{} attribute
\addtoindexx{bit size attribute}
whose \livelink{chap:classconstant}{integer constant} value
(see Section \refersec{chap:byteandbitsizes})
\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 \livelink{chap:DWATEsigned}{DW\_ATE\_signed}
+whose value is \DWATEsigned{}
and a byte size attribute whose value is 4.}
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
+\hypertarget{chap:DWATdatabitoffsetbasetypebitlocation}{}
+the base type entry may also have a
+\DWATbitsizeDEFN{} and a \DWATdatabitoffsetDEFN{} attribute,
\addtoindexx{bit size attribute}
-a
-\livelink{chap:DWATbitsize}{DW\_AT\_bit\_size} and a
-\livelink{chap:DWATdatabitoffset}{DW\_AT\_data\_bit\_offset} 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
-\livelink{chap:DWATdatabitoffset}{DW\_AT\_data\_bit\_offset}
-is
-\addtoindexx{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
-\livelink{chap:DWATbitoffset}{DW\_AT\_bit\_offset}
-when used for base
-\addtoindexx{bit offset attribute (V3)}
-types as defined in DWARF V3 and earlier.
-\livelink{chap:DWATbitoffset}{DW\_AT\_bit\_offset}
-is deprecated for use in base types in DWARF Version 4 and later.
-See Section 5.1 in the DWARF Version 4
-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
-\livetarg{chap:DWATEaddress}{DW\_ATE\_address} & linear machine address (for segmented\break
- addresses see
- Section \refersec{chap:segmentedaddresses}) \\
-\livetarg{chap:DWATEboolean}{DW\_ATE\_boolean}& true or false \\
-
-\livetarg{chap:DWATEcomplexfloat}{DW\_ATE\_complex\_float}& complex binary
-floating\dash point number \\
-\livetarg{chap:DWATEfloat}{DW\_ATE\_float} & binary floating\dash point number \\
-\livetarg{chap:DWATEimaginaryfloat}{DW\_ATE\_imaginary\_float}& imaginary binary
-floating\dash point number \\
-\livetarg{chap:DWATEsigned}{DW\_ATE\_signed}& signed binary integer \\
-\livetarg{chap:DWATEsignedchar}{DW\_ATE\_signed\_char}& signed character \\
-\livetarg{chap:DWATEunsigned}{DW\_ATE\_unsigned} & unsigned binary integer \\
-\livetarg{chap:DWATEunsignedchar}{DW\_ATE\_unsigned\_char} & unsigned character \\
-\livetarg{chap:DWATEpackeddecimal}{DW\_ATE\_packed\_decimal} & packed decimal \\
-\livetarg{chap:DWATEnumericstring}{DW\_ATE\_numeric\_string}& numeric string \\
-\livetarg{chap:DWATEedited}{DW\_ATE\_edited} & edited string \\
-\livetarg{chap:DWATEsignedfixed}{DW\_ATE\_signed\_fixed} & signed fixed\dash point scaled integer \\
-\livetarg{chap:DWATEunsignedfixed}{DW\_ATE\_unsigned\_fixed}& unsigned fixed\dash point scaled integer \\
-\livetarg{chap:DWATEdecimalfloat}{DW\_ATE\_decimal\_float} & decimal floating\dash point number \\
-\livetarg{chap:DWATEUTF}{DW\_ATE\_UTF} & \addtoindex{Unicode} character \\
+\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 \livelink{chap:DWATEdecimalfloat}{DW\_ATE\_decimal\_float} 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 \livelink{chap:DWATEUTF}{DW\_ATE\_UTF} 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). For example, the
+ISO/IEC 10646\dash 1:1993).
+\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 \livelink{chap:DWATEUTF}{DW\_ATE\_UTF} and a byte size attribute whose value is 2.}
+is \DWATEUTF{} and a byte size attribute whose value is 2.
-The
-\livelink{chap:DWATEpackeddecimal}{DW\_ATE\_packed\_decimal}
-and
-\livelink{chap:DWATEnumericstring}{DW\_ATE\_numeric\_string}
-base types
+\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).
+\addtoindexx{ISO 10646 character set standard}
+
+\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
-\livelink{chap:DWATdecimalsign}{DW\_AT\_decimal\_sign},
-\livelink{chap:DWATdigitcount}{DW\_AT\_digit\_count} and
-\livelink{chap:DWATdecimalscale}{DW\_AT\_decimal\_scale}
+\DWATdecimalsign,
+\DWATdigitcount{} and
+\DWATdecimalscale{}
attributes.
\needlines{5}
-A \livelink{chap:DWATdecimalsign}{DW\_AT\_decimal\_sign} 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
-\livetarg{chap:DWDSunsigned}{DW\_DS\_unsigned} & Unsigned \\
-\livetarg{chap:DWDSleadingoverpunch}{DW\_DS\_leading\_overpunch} & Sign
-is encoded in the most significant digit in a target\dash dependent manner \\
-\livetarg{chap:DWDStrailingoverpunch}{DW\_DS\_trailing\_overpunch} & Sign
-is encoded in the least significant digit in a target\dash dependent manner \\
-\livetarg{chap:DWDSleadingseparate}{DW\_DS\_leading\_separate}
+\DWDSunsignedTARG{} & Unsigned \\
+\DWDSleadingoverpunchTARG{} & Sign
+is encoded in the most significant digit in a target-dependent manner \\
+\DWDStrailingoverpunchTARG{} & Sign
+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. \\
-\livetarg{chap:DWDStrailingseparate}{DW\_DS\_trailing\_separate}
+\DWDStrailingseparateTARG{}
& Decimal type: Sign is a \doublequote{+} or \doublequote{-} character
to the right of the least significant digit. \\
&Packed decimal type: Least significant nibble contains
\end{tabular}
\end{table}
-The
-\livelink{chap:DWATdigitcount}{DW\_AT\_digit\_count}
-attribute
-\addtoindexx{digit count attribute}
-is an \livelink{chap:classconstant}{integer constant}
-value that represents the number of digits in an instance of
-the type.
-
-\hypertarget{chap:DWATdecimalscaledecimalscalefactor}
-The \livelink{chap:DWATdecimalscale}{DW\_AT\_decimal\_scale}
+\needlines{4}
+\hypertarget{chap:DWATdecimalscaledecimalscalefactor}{}
+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 \livelink{chap:DWATEedited}{DW\_ATE\_edited}
-base
-\hypertarget{chap:DWATpicturestringpicturestringfornumericstringtype}
+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
+\hypertarget{chap:DWATpicturestringpicturestringfornumericstringtype}{}
type is used to represent an edited
numeric or alphanumeric data type. It is used in combination
-with a \livelink{chap:DWATpicturestring}{DW\_AT\_picture\_string} 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 \livelink{chap:DWATdigitcount}{DW\_AT\_digit\_count} and a
-\livelink{chap:DWATdecimalscale}{DW\_AT\_decimal\_scale} attribute.
-\addtoindexx{decimal scale attribute}
+data type, the edited type entry has a \DWATdigitcount{} and a
+\DWATdecimalscale{} attribute.\addtoindexx{decimal scale attribute}
These attributes have the same
interpretation as described for the
-\livelink{chap:DWATEpackeddecimal}{DW\_ATE\_packed\_decimal} and
-\livelink{chap:DWATEnumericstring}{DW\_ATE\_numeric\_string} base
+\DWATEpackeddecimal{} and
+\DWATEnumericstring{} base
types. If the edited type entry
describes an edited alphanumeric data type, the edited type
entry does not have these attributes.
-
-\textit{The presence or absence of the \livelink{chap:DWATdigitcount}{DW\_AT\_digit\_count} and
-\livelink{chap:DWATdecimalscale}{DW\_AT\_decimal\_scale} attributes
-\addtoindexx{decimal scale attribute}
+\textit{The presence or absence of the \DWATdigitcount{} and
+\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 \livelink{chap:DWATEsignedfixed}{DW\_ATE\_signed\_fixed} and \livelink{chap:DWATEunsignedfixed}{DW\_ATE\_unsigned\_fixed} entries
-describe signed and unsigned fixed\dash point binary data types,
-respectively.
-
-The fixed binary type entries have
-\addtoindexx{digit count attribute}
-a
-\livelink{chap:DWATdigitcount}{DW\_AT\_digit\_count}
-attribute with the same interpretation as described for the
-\livelink{chap:DWATEpackeddecimal}{DW\_ATE\_packed\_decimal} and \livelink{chap:DWATEnumericstring}{DW\_ATE\_numeric\_string} base types.
-
-\needlines{4}
-For a data type with a decimal scale factor, the fixed binary
-type entry has a
-\livelink{chap:DWATdecimalscale}{DW\_AT\_decimal\_scale} attribute
-\addtoindexx{decimal scale attribute}
-with the same
-interpretation as described for the
-\livelink{chap:DWATEpackeddecimal}{DW\_ATE\_packed\_decimal}
-and \livelink{chap:DWATEnumericstring}{DW\_ATE\_numeric\_string} 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
-\livelink{chap:DWATbinaryscale}{DW\_AT\_binary\_scale} attribute.
-The
-\livelink{chap:DWATbinaryscale}{DW\_AT\_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\dash decimal and non\dash binary scale factor,
-the fixed binary type entry has a
-\livelink{chap:DWATsmall}{DW\_AT\_small} attribute which
-\addtoindexx{small attribute}
-references a
-\livelink{chap:DWTAGconstant}{DW\_TAG\_constant} entry. The scale factor value
-is interpreted in accordance with the value defined by the
-\livelink{chap:DWTAGconstant}{DW\_TAG\_constant} entry. The value represented is the product
-of the integer value in memory and the associated constant
-entry for the type.
-
-\textit{The \livelink{chap:DWATsmall}{DW\_AT\_small} attribute
-is defined with the \addtoindex{Ada} \texttt{small}
-attribute in mind.}
\section{Unspecified Type Entries}
\label{chap:unspecifiedtypeentries}
An unspecified (implicit, unknown, ambiguous or nonexistent)
type is represented by a debugging information entry with
-the tag \livetarg{chap:DWTAGunspecifiedtype}{DW\_TAG\_unspecified\_type}.
+the tag \DWTAGunspecifiedtypeTARG.
If a name has been given
to the type, then the corresponding unspecified type entry
-has a \livelink{chap:DWATname}{DW\_AT\_name} attribute
+has a \DWATname{} attribute
\addtoindexx{name attribute}
whose value is
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).}
+
+\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.}
+
\section{Type Modifier Entries}
\label{chap:typemodifierentries}
\addtoindexx{type modifier entry}
-
-A base or user\dash defined type may be modified in different ways
-in different languages. A type modifier is represented in
-DWARF by a debugging information entry with one of the tags
-given in Table \refersec{tab:typemodifiertags}.
+\addtoindexx{type modifier|see{atomic type entry}}
\addtoindexx{type modifier|see{constant type entry}}
\addtoindexx{type modifier|see{reference type entry}}
\addtoindexx{type modifier|see{restricted type entry}}
\addtoindexx{type modifier|see{pointer type entry}}
\addtoindexx{type modifier|see{shared type entry}}
\addtoindexx{type modifier|see{volatile type entry}}
+A base or user\dash defined type may be modified in different ways
+in different languages. A type modifier is represented in
+DWARF by a debugging information entry with one of the tags
+given in Table \refersec{tab:typemodifiertags}.
If a name has been given to the modified type in the source
program, then the corresponding modified type entry has
-a \livelink{chap:DWATname}{DW\_AT\_name} attribute
+a \DWATname{} attribute
\addtoindexx{name attribute}
whose value is a null\dash terminated
string containing the modified type name as it appears in
Each of the type modifier entries has
\addtoindexx{type attribute}
a
-\livelink{chap:DWATtype}{DW\_AT\_type} attribute,
+\DWATtype{} attribute,
whose value is a \livelink{chap:classreference}{reference}
to a debugging information entry
describing a base type, a user-defined type or another type
A modified type entry describing a
\addtoindexx{pointer type entry}
pointer or \addtoindex{reference type}
-(using \livelink{chap:DWTAGpointertype}{DW\_TAG\_pointer\_type},
-\livelink{chap:DWTAGreferencetype}{DW\_TAG\_reference\_type} or
-\livelink{chap:DWTAGrvaluereferencetype}{DW\_TAG\_rvalue\_reference\_type})
+(using \DWTAGpointertype,
+\DWTAGreferencetype{} or
+\DWTAGrvaluereferencetype)
% Another instance of no-good-place-to-put-index entry.
may
-\addtoindexx{address class!attribute}
+\addtoindexx{address class attribute}
have
-\hypertarget{chap:DWATadressclasspointerorreferencetypes}
+\hypertarget{chap:DWATadressclasspointerorreferencetypes}{}
a
-\livelink{chap:DWATaddressclass}{DW\_AT\_address\_class}
+\DWATaddressclassDEFN{}
attribute to describe how objects having the given pointer
or reference type ought to be dereferenced.
A modified type entry describing a \addtoindex{UPC} shared qualified type
-(using \livelink{chap:DWTAGsharedtype}{DW\_TAG\_shared\_type}) may have a
-\livelink{chap:DWATcount}{DW\_AT\_count} attribute
+(using \DWTAGsharedtype) may have a
+\DWATcount{} attribute
\addtoindexx{count attribute}
whose value is a constant expressing the (explicit or implied) blocksize specified for the
type in the source. If no count attribute is present, then the \doublequote{infinite}
\caption{Type modifier tags}
\label{tab:typemodifiertags}
\centering
-\begin{tabular}{l|p{9cm}}
+\begin{tabular}{l|P{9cm}}
\hline
Name&Meaning\\ \hline
-\livetarg{chap:DWTAGconsttype}{DW\_TAG\_const\_type} & C or C++ const qualified type
+\DWTAGatomictypeTARG{} & C \addtoindex{\_Atomic} qualified type \\
+\DWTAGconsttypeTARG{} & C or C++ const qualified type
\addtoindexx{const qualified type entry} \addtoindexx{C} \addtoindexx{C++} \\
-\livetarg{chap:DWTAGpackedtype}{DW\_TAG\_packed\_type}& \addtoindex{Pascal} or Ada packed type\addtoindexx{packed type entry}
+\DWTAGpackedtypeTARG& \addtoindex{Pascal} or Ada packed type\addtoindexx{packed type entry}
\addtoindexx{packed qualified type entry} \addtoindexx{Ada} \addtoindexx{Pascal} \\
-\livetarg{chap:DWTAGpointertype}{DW\_TAG\_pointer\_type} & Pointer to an object of
+\DWTAGpointertypeTARG{} & Pointer to an object of
the type being modified \addtoindexx{pointer qualified type entry} \\
-\livetarg{chap:DWTAGreferencetype}{DW\_TAG\_reference\_type}& C++ (lvalue) reference
+\DWTAGreferencetypeTARG& \addtoindex{C++} (lvalue) reference
to an object of the type
\addtoindexx{reference type entry}
-being modified
+\mbox{being} modified
\addtoindexx{reference qualified type entry} \\
-\livetarg{chap:DWTAGrestricttype}{DW\_TAG\_restrict\_type}& \addtoindex{C}
+\DWTAGrestricttypeTARG& \addtoindex{C}
restrict
\addtoindexx{restricted type entry}
qualified type
\addtoindexx{restrict qualified type} \\
-\livetarg{chap:DWTAGrvaluereferencetype}{DW\_TAG\_rvalue\_reference\_type} & C++
+\DWTAGrvaluereferencetypeTARG{} & \addtoindex{C++}
\addtoindexx{rvalue reference type entry}
rvalue
\addtoindexx{restricted type entry}
-reference to an object of the type being modified
+reference to an object of the type \mbox{being} modified
\addtoindexx{rvalue reference qualified type entry} \\
-\livetarg{chap:DWTAGsharedtype}{DW\_TAG\_shared\_type}&\addtoindex{UPC} shared qualified type
+\DWTAGsharedtypeTARG&\addtoindex{UPC} shared qualified type
\addtoindexx{shared qualified type entry} \\
-\livetarg{chap:DWTAGvolatiletype}{DW\_TAG\_volatile\_type}&C or C++ volatile qualified type
+\DWTAGvolatiletypeTARG&\addtoindex{C} or \addtoindex{C++} volatile qualified type
\addtoindexx{volatile qualified type entry} \\
\hline
\end{tabular}
\end{table}
-%The following clearpage prevents splitting the example across pages.
+\needlines{6}
\textit{As examples of how type modifiers are ordered, consider the following
\addtoindex{C} declarations:}
\begin{lstlisting}[numbers=none]
\begin{dwflisting}
\begin{alltt}
- \livelink{chap:DWTAGvariable}{DW\_TAG\_variable}(p) -->
- \livelink{chap:DWTAGvolatiletype}{DW\_TAG\_volatile\_type} -->
- \livelink{chap:DWTAGpointertype}{DW\_TAG\_pointer\_type} -->
- \livelink{chap:DWTAGconsttype}{DW\_TAG\_const\_type} -->
- \livelink{chap:DWTAGbasetype}{DW\_TAG\_base\_type}(unsigned char)
+ \DWTAGvariable(p) -->
+ \DWTAGvolatiletype -->
+ \DWTAGpointertype -->
+ \DWTAGconsttype -->
+ \DWTAGbasetype(unsigned char)
\end{alltt}
\end{dwflisting}
-\needlines{5}
+%\needlines{5}
\textit{On the other hand}
\begin{lstlisting}[numbers=none]
volatile unsigned char * const restrict p;
\begin{dwflisting}
\begin{alltt}
- \livelink{chap:DWTAGvariable}{DW\_TAG\_variable}(p) -->
- \livelink{chap:DWTAGrestricttype}{DW\_TAG\_restrict\_type} -->
- \livelink{chap:DWTAGconsttype}{DW\_TAG\_const\_type} -->
- \livelink{chap:DWTAGpointertype}{DW\_TAG\_pointer\_type} -->
- \livelink{chap:DWTAGvolatiletype}{DW\_TAG\_volatile\_type} -->
- \livelink{chap:DWTAGbasetype}{DW\_TAG\_base\_type}(unsigned char)
+ \DWTAGvariable(p) -->
+ \DWTAGrestricttype -->
+ \DWTAGconsttype -->
+ \DWTAGpointertype -->
+ \DWTAGvolatiletype -->
+ \DWTAGbasetype(unsigned char)
\end{alltt}
\end{dwflisting}
A named type that is defined in terms of another type
definition is represented by a debugging information entry with
\addtoindexx{typedef entry}
-the tag \livetarg{chap:DWTAGtypedef}{DW\_TAG\_typedef}.
-The typedef entry has a \livelink{chap:DWATname}{DW\_AT\_name} attribute
+the tag \DWTAGtypedefTARG.
+The typedef entry has a \DWATname{} attribute
\addtoindexx{name attribute}
whose value is a null\dash terminated string containing
the name of the typedef as it appears in the source program.
The typedef entry may also contain
\addtoindexx{type attribute}
a
-\livelink{chap:DWATtype}{DW\_AT\_type} attribute whose
+\DWATtype{} attribute whose
value is a \livelink{chap:classreference}{reference}
to the type named by the typedef. If
the debugging information entry for a typedef represents
no defining details may be termed an
\addtoindexx{incomplete type}
incomplete, forward or hidden type.
-While the DWARF \livelink{chap:DWTAGtypedef}{DW\_TAG\_typedef} entry was
+While the DWARF \DWTAGtypedef{} entry was
originally inspired by the like named construct in
\addtoindex{C} and \addtoindex{C++},
it is broadly suitable for similar constructs (by whatever
a table of components of identical type.}
An array type is represented by a debugging information entry
-with the tag \livetarg{chap:DWTAGarraytype}{DW\_TAG\_array\_type}.
+with the tag \DWTAGarraytypeTARG.
If a name has been given to
\addtoindexx{array!declaration of type}
the array type in the source program, then the corresponding
-array type entry has a \livelink{chap:DWATname}{DW\_AT\_name} attribute
+array type entry has a \DWATname{} attribute
\addtoindexx{name attribute}
whose value is a
null\dash terminated string containing the array type name as it
appears in the source program.
The
-\hypertarget{chap:DWATorderingarrayrowcolumnordering}
+\hypertarget{chap:DWATorderingarrayrowcolumnordering}{}
array type entry describing a multidimensional array may
\addtoindexx{array!element ordering}
-have a \livelink{chap:DWATordering}{DW\_AT\_ordering} 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
-\livelink{chap:DWATlanguage}{DW\_AT\_language}
+\DWATlanguage{}
attribute
\addtoindexx{language attribute}
of the enclosing compilation unit entry) is assumed.
-\begin{simplenametable}[1.6in]{Array ordering}{tab:arrayordering}
-\livetarg{chap:DWORDcolmajor}{DW\_ORD\_col\_major} \\
-\livetarg{chap:DWORDrowmajor}{DW\_ORD\_row\_major} \\
+\begin{simplenametable}[1.8in]{Array ordering}{tab:arrayordering}
+\DWORDcolmajorTARG{} \\
+\DWORDrowmajorTARG{} \\
\end{simplenametable}
The ordering attribute may optionally appear on one-dimensional
An array type entry has
\addtoindexx{type attribute}
-a \livelink{chap:DWATtype}{DW\_AT\_type} attribute
+a \DWATtype{} attribute
describing
\addtoindexx{array!element type}
the type of each element of the array.
object of the given array type is different from the amount
\addtoindexx{stride attribute|see{bit stride attribute or byte stride attribute}}
of storage that is normally allocated to hold an individual
-\hypertarget{chap:DWATbitstridearrayelementstrideofarraytype}
+\hypertarget{chap:DWATbitstridearrayelementstrideofarraytype}{}
object of the
-\hypertarget{chap:DWATbytestridearrayelementstrideofarraytype}
+\hypertarget{chap:DWATbytestridearrayelementstrideofarraytype}{}
indicated element type, then the array type
\addtoindexx{bit stride attribute}
entry has either a
-\livelink{chap:DWATbytestride}{DW\_AT\_byte\_stride}
+\DWATbytestrideDEFN{}
or
\addtoindexx{byte stride attribute}
-a \livelink{chap:DWATbitstride}{DW\_AT\_bit\_stride}
+a \DWATbitstrideDEFN{}
attribute,
\addtoindexx{bit stride attribute}
whose value
is the size of each
element of the array.
-The array type entry may have either a \livelink{chap:DWATbytesize}{DW\_AT\_byte\_size} or a
-\livelink{chap:DWATbitsize}{DW\_AT\_bit\_size} attribute
+The array type entry may have either a \DWATbytesize{} or a
+\DWATbitsize{} attribute
(see Section \refersec{chap:byteandbitsizes}),
whose value is the
amount of storage needed to hold an instance of the array type.
Each array dimension is described by a debugging information
entry with either the
\addtoindexx{subrange type entry!as array dimension}
-tag \livelink{chap:DWTAGsubrangetype}{DW\_TAG\_subrange\_type} or the
+tag \DWTAGsubrangetype{} or the
\addtoindexx{enumeration type entry!as array dimension}
tag
-\livelink{chap:DWTAGenumerationtype}{DW\_TAG\_enumeration\_type}. These entries are
+\DWTAGenumerationtype. These entries are
children of the
array type entry and are ordered to reflect the appearance of
-the dimensions in the source program (i.e., leftmost dimension
+the dimensions in the source program (that is, leftmost dimension
first, next to leftmost second, and so on).
\textit{In languages that have no concept of a
be represented by a debugging information entry for a
multidimensional array.}
-\hypertarget{chap:DWTAGgenericsubrange}
-Alternatively, the array dimensions can also be described with the
-\DWTAGgenericsubrange, which contains only a single, generic
-expression describing each of the attributes. If \DWTAGgenericsubrange
-is used, the number dimensions must be stored in the
-\livelink{chap:DWATrank}{DW\_AT\_rank} attribute. See also Section
-\ref{chap:DWATrank}, Dynamic Type Properties: Array Rank.
-
-
-\needlines{5}
+Alternatively, for an array with dynamic rank the array dimensions
+are described by a debugging information entry with the tag
+\DWTAGgenericsubrangeTARG.
+This entry has the same attributes as a
+\DWTAGsubrangetype{} entry; however,
+there is just one \DWTAGgenericsubrangeNAME{} entry and it describes all of the
+dimensions of the array.
+If \DWTAGgenericsubrangeNAME{}
+is used, the number of dimensions must be specified using a
+\DWATrank{} attribute. See also Section
+\refersec{chap:DWATrank}.
+
+%\needlines{5}
Other attributes especially applicable to arrays are
-\livelink{chap:DWATallocated}{DW\_AT\_allocated},
-\livelink{chap:DWATassociated}{DW\_AT\_associated} and
-\livelink{chap:DWATdatalocation}{DW\_AT\_data\_location},
+\DWATallocated,
+\DWATassociated{} and
+\DWATdatalocation,
which are described in
-Section \refersec{chap:dynamictypeproperties}.
-For relevant examples, see also Appendix \refersec{app:fortran90example}.
+Section \refersec{chap:dynamicpropertiesoftypes}.
+For relevant examples, see also Appendix \refersec{app:fortranarrayexample}.
\section{Coarray Type Entries}
\label{chap:coarraytypeentries}
}
A coarray type is represented by a debugging information entry
-with the tag \livetarg{chap:DWTAGcoarraytype}{DW\_TAG\_coarray\_type}.
+with the tag \DWTAGcoarraytypeTARG.
If a name has been given to the
coarray type in the source, then the corresponding coarray type
entry has a \DWATname{} attribute whose value is a null-terminated
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}
\label{chap:structureunionclassandinterfacetypeentries}
\addtoindex{C++}, and \doublequote{fields} in \addtoindex{Pascal}.}
\textit{The components of these collections each exist in their
-own space in computer memory. The components of a C or C++
+own space in computer memory. The components of a \addtoindex{C} or \addtoindex{C++}
\doublequote{union} all coexist in the same memory.}
\textit{\addtoindex{Pascal} and
\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.}
\subsection{Structure, Union and Class Type Entries}
\label{chap:structureunionandclasstypeentries}
-
-
Structure, union, and class types are represented by debugging
\addtoindexx{structure type entry}
information entries
with
\addtoindexx{class type entry}
the tags
-\livetarg{chap:DWTAGstructuretype}{DW\_TAG\_structure\_type},
-\livetarg{chap:DWTAGuniontype}{DW\_TAG\_union\_type},
-and \livetarg{chap:DWTAGclasstype}{DW\_TAG\_class\_type},
+\DWTAGstructuretypeTARG,
+\DWTAGuniontypeTARG,
+and \DWTAGclasstypeTARG,
respectively. If a name has been given to the structure,
union, or class in the source program, then the corresponding
structure type, union type, or class type entry has a
-\livelink{chap:DWATname}{DW\_AT\_name} attribute
+\DWATname{} attribute
\addtoindexx{name attribute}
whose value is a null\dash terminated string
containing the type name as it appears in the source program.
and appear in the same order as the corresponding declarations
in the source program.
+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
+defined within the containing structure, union, or class.
+
+\textit{This may be used to describe anonymous structures, unions
+and classes in \addtoindex{C} or \addtoindex{C++}}.
+
A structure type, union type or class type entry may have
-either a \livelink{chap:DWATbytesize}{DW\_AT\_byte\_size} or a
-\livelink{chap:DWATbitsize}{DW\_AT\_bit\_size} attribute
-\hypertarget{chap:DWATbitsizedatamemberbitsize}
+either a \DWATbytesize{} or a
+\DWATbitsize{} attribute
+\hypertarget{chap:DWATbitsizedatamemberbitsize}{}
(see Section \refersec{chap:byteandbitsizes}),
whose value is the amount of storage needed
to hold an instance of the structure, union or class type,
represented by a structure, union or class
entry that does not have a byte size attribute and that has
\addtoindexx{declaration attribute}
-a \livelink{chap:DWATdeclaration}{DW\_AT\_declaration} attribute.
+a \DWATdeclaration{} attribute.
If the complete declaration of a type has been placed in
-\hypertarget{chap:DWATsignaturetypesignature}
+\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 \livelink{chap:DWATsignature}{DW\_AT\_signature}
-attribute.
+\DWATsignatureDEFN{} attribute.
If a structure, union or class entry represents the definition
of a structure, union or class member corresponding to a prior
incomplete structure, union or class, the entry may have a
-\livelink{chap:DWATspecification}{DW\_AT\_specification} attribute
+\DWATspecification{} attribute
\addtoindexx{specification attribute}
whose value is a \livelink{chap:classreference}{reference} to
the debugging information entry representing that incomplete
declaration.
Structure, union and class entries containing the
-\livelink{chap:DWATspecification}{DW\_AT\_specification} attribute
+\DWATspecification{} attribute
\addtoindexx{specification attribute}
do not need to duplicate
information provided by the declaration entry referenced by the
or class does not appear within the body of the declaration,
that member also has a debugging information entry describing
its definition. That latter entry has a
-\livelink{chap:DWATspecification}{DW\_AT\_specification} attribute
+\DWATspecification{} attribute
\addtoindexx{specification attribute}
referencing the debugging information entry
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 \livelink{chap:DWATdeclaration}{DW\_AT\_declaration} attribute.
+and will have a \DWATdeclaration{} attribute.
\needlines{5}
\textit{Consider a nested class whose
facilitate DWARF space compression
(see Appendix \refersec{app:usingcompilationunits}).}
+\needlines{4}
+A structure type, union type or class type entry may have a
+\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}
+\hypertarget{chap:DWATcallingconventionfortypes}{}
+is given in Table \referfol{tab:callingconventioncodesfortypes}.
+
+\begin{simplenametable}[2.2in]{Calling convention codes for types}{tab:callingconventioncodesfortypes}
+\DWCCnormal \\
+\DWCCpassbyvalueTARG \\
+\DWCCpassbyreferenceTARG \\
+\end{simplenametable}
+
+If this attribute is not present, or its value is
+\DWCCnormalNAME, the convention to be used for an object of the
+given type is assumed to be unspecified.
+
+\textit{Note that \DWCCnormalNAME{} is also used as a calling convention
+code for certain subprograms
+(see Table \refersec{tab:callingconventioncodesforsubroutines}).}
+
+\textit{If unspecified, a consumer may be able to deduce the calling
+convention based on knowledge of the type and the ABI.}
+
+
\subsection{Interface Type Entries}
\label{chap:interfacetypeentries}
\addtoindexx{interface type entry}
are represented by debugging information
entries with the
-tag \livetarg{chap:DWTAGinterfacetype}{DW\_TAG\_interface\_type}.
+tag \DWTAGinterfacetypeTARG.
An interface type entry has
-a \livelink{chap:DWATname}{DW\_AT\_name} attribute,
+a \DWATname{} attribute,
\addtoindexx{name attribute}
whose
value is a null\dash terminated string containing the type name
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)
such entry has
\addtoindexx{inheritance entry}
the
-tag \livetarg{chap:DWTAGinheritance}{DW\_TAG\_inheritance}.
+tag \DWTAGinheritanceTARG.
+\needlines{4}
An inheritance entry
\addtoindexx{type attribute}
has
\addtoindexx{inheritance entry}
a
-\livelink{chap:DWATtype}{DW\_AT\_type} attribute whose value is
+\DWATtype{} attribute whose value is
a reference to the debugging information entry describing the
class or interface from which the parent class or structure
of the inheritance entry is derived, extended or implementing.
An inheritance entry
\addtoindexx{inheritance entry}
for a class that derives from or extends
-\hypertarget{chap:DWATdatamemberlocationinheritedmemberlocation}
-another class or struct also has
+\hypertarget{chap:DWATdatamemberlocationinheritedmemberlocation}{}
+another class or struct also has a
+\DWATdatamemberlocationDEFN{} attribute,
\addtoindexx{data member location attribute}
-a
-\livelink{chap:DWATdatamemberlocation}{DW\_AT\_data\_member\_location}
-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
An
\addtoindexx{inheritance entry}
inheritance entry
-\hypertarget{chap:DWATaccessibilitycppinheritedmembers}
+\hypertarget{chap:DWATaccessibilitycppinheritedmembers}{}
may
\addtoindexx{accessibility attribute}
have a
-\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility}
+\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
-\livelink{chap:DWATvirtuality}{DW\_AT\_virtuality} attribute.
+\DWATvirtualityDEFN{} attribute.
\textit{For a \addtoindex{C++} virtual base, the
\addtoindex{data member location attribute}
If a derived class or structure contains access declarations,
each such declaration may be represented by a debugging
information entry with the tag
-\livetarg{chap:DWTAGaccessdeclaration}{DW\_TAG\_access\_declaration}.
+\DWTAGaccessdeclarationTARG.
Each
such entry is a child of the class or structure type entry.
An access declaration entry has
-a \livelink{chap:DWATname}{DW\_AT\_name} attribute,
+a \DWATname{} attribute,
\addtoindexx{name attribute}
whose
value is a null\dash terminated string representing the name used
or structure qualifiers.
An access declaration entry
-\hypertarget{chap:DWATaccessibilitycppbaseclasses}
+\hypertarget{chap:DWATaccessibilitycppbaseclasses}{}
also
has a
-\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility}
+\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}
+\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 \livetarg{chap:DWTAGfriend}{DW\_TAG\_friend}.
+the friend entry has the tag \DWTAGfriendTARG.
-A friend entry has
-\addtoindexx{friend attribute}
-a \livelink{chap:DWATfriend}{DW\_AT\_friend} 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.
A data member (as opposed to a member function) is
represented by a debugging information entry with the
-tag \livetarg{chap:DWTAGmember}{DW\_TAG\_member}.
+tag \DWTAGmemberTARG.
The
\addtoindexx{member entry (data)}
member entry for a named member has
-a \livelink{chap:DWATname}{DW\_AT\_name} attribute
+a \DWATname{} attribute
\addtoindexx{name attribute}
whose value is a null\dash terminated
string containing the member name as it appears in the source
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
-\livelink{chap:DWATtype}{DW\_AT\_type} 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
-\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility}
-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}
+\hypertarget{chap:DWATmutablemutablepropertyofmemberdata}{}
entry
\addtoindexx{member entry (data)}
may
\addtoindexx{mutable attribute}
-have a \livelink{chap:DWATmutable}{DW\_AT\_mutable} 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
-\hypertarget{chap:DWATdatabitoffsetdatamemberbitlocation}
-defined
-\hypertarget{chap:DWATdatamemberlocationdatamemberlocation}
-in a structure, union or class may have either
+corresponding to a data member that is defined
+\hypertarget{chap:DWATdatabitoffsetdatamemberbitlocation}{}
+\hypertarget{chap:DWATdatamemberlocationdatamemberlocation}{}
+in a structure, union or class may have either a
+\DWATdatamemberlocationDEFN{} attribute
\addtoindexx{data member location attribute}
-a
-\livelink{chap:DWATdatamemberlocation}{DW\_AT\_data\_member\_location} attribute or a
-\livelink{chap:DWATdatabitoffset}{DW\_AT\_data\_bit\_offset}
-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.
\needlines{4}
-For a \livelink{chap:DWATdatamemberlocation}{DW\_AT\_data\_member\_location} attribute
+For a \DWATdatamemberlocation{} attribute
\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
\textit{The push on the DWARF expression stack of the base address of
the containing construct is equivalent to execution of the
-\livelink{chap:DWOPpushobjectaddress}{DW\_OP\_push\_object\_address} operation
+\DWOPpushobjectaddress{} operation
(see Section \refersec{chap:stackoperations});
-\livelink{chap:DWOPpushobjectaddress}{DW\_OP\_push\_object\_address} therefore
+\DWOPpushobjectaddress{} therefore
is not needed at the
beginning of a \addtoindex{location description} for a data member.
The
result of the evaluation is a location---either an address or
the name of a register, not an offset to the member.}
-\textit{A \livelink{chap:DWATdatamemberlocation}{DW\_AT\_data\_member\_location}
+\textit{A \DWATdatamemberlocation{}
attribute
\addtoindexx{data member location attribute}
that has the form of a
\end{enumerate}
-For a \livelink{chap:DWATdatabitoffset}{DW\_AT\_data\_bit\_offset} attribute,
+\needlines{4}
+For a \DWATdatabitoffset{} attribute,
the value is an \livelink{chap:classconstant}{integer constant}
(see Section \refersec{chap:staticanddynamicvaluesofattributes})
that specifies the number of bits
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 \livelink{chap:DWATbytesize}{DW\_AT\_byte\_size}
-or a \livelink{chap:DWATbitsize}{DW\_AT\_bit\_size} 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
-\livelink{chap:DWATdatabitoffset}{DW\_AT\_data\_bit\_offset} and
-\livelink{chap:DWATbitsize}{DW\_AT\_bit\_size} 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.}
-
-\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 |
+\textit{For showing nested and packed records and arrays,
+see Appendix \refersec{app:pascalexample} and
+\refersec{app:ccppbitfieldexamples}.}
- 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}
-
-\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{Attribute \livelink{chap:DWATdatabitoffset}{DW\_AT\_data\_bit\_offset}
-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 \livelink{chap:DWATbitoffset}{DW\_AT\_bit\_offset} and
-\livelink{chap:DWATbytesize}{DW\_AT\_byte\_size} when used to
-identify the beginning of bit field data members as defined
-in DWARF V3 and earlier. The \livelink{chap:DWATbytesize}{DW\_AT\_byte\_size},
-\livelink{chap:DWATbitsize}{DW\_AT\_bit\_size} and
-\livelink{chap:DWATbitoffset}{DW\_AT\_bit\_offset}
-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}
debugging information entry
with the
\addtoindexx{subprogram entry!as member function}
-tag \livelink{chap:DWTAGsubprogram}{DW\_TAG\_subprogram}.
+tag \DWTAGsubprogram.
The member function entry
may contain the same attributes and follows the same rules
as non\dash member global subroutine entries
(see Section \refersec{chap:subroutineandentrypointentries}).
+\needlines{4}
+\textit{In particular, if the member function entry is an
+instantiation of a member function template, it follows the
+same rules as function template instantiations (see Section
+\refersec{chap:functiontemplateinstantiations}).
+}
+
A
\addtoindexx{accessibility attribute}
member function entry may have a
-\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility}
+\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.
If
-\hypertarget{chap:DWATvirtualityvirtualityoffunction}
+\hypertarget{chap:DWATvirtualityvirtualityoffunction}{}
the member function entry describes a virtual function,
then that entry has a
-\livelink{chap:DWATvirtuality}{DW\_AT\_virtuality} attribute.
+\DWATvirtualityDEFN{} attribute.
If
-\hypertarget{chap:DWATexplicitexplicitpropertyofmemberfunction}
+\hypertarget{chap:DWATexplicitexplicitpropertyofmemberfunction}{}
the member function entry describes an explicit member
function, then that entry has
\addtoindexx{explicit attribute}
a
-\livelink{chap:DWATexplicit}{DW\_AT\_explicit} attribute.
+\DWATexplicitDEFN{} attribute.
An
-\hypertarget{chap:DWATvtableelemlocationvirtualfunctiontablevtableslot}
+\hypertarget{chap:DWATvtableelemlocationvirtualfunctiontablevtableslot}{}
entry for a virtual function also has a
-\livelink{chap:DWATvtableelemlocation}{DW\_AT\_vtable\_elem\_location}
+\DWATvtableelemlocationDEFN{}
\addtoindexi{attribute}{vtable element location attribute} whose value contains
a \addtoindex{location description}
yielding the address of the slot
description is evaluated.
If
-\hypertarget{chap:DWATobjectpointerobjectthisselfpointerofmemberfunction}
+\hypertarget{chap:DWATobjectpointerobjectthisselfpointerofmemberfunction}{}
the member function entry describes a non\dash static member
\addtoindexx{this pointer attribute|see{object pointer attribute}}
function, then that entry
\addtoindexx{self pointer attribute|see{object pointer attribute}}
has
\addtoindexx{object pointer attribute}
-a \livelink{chap:DWATobjectpointer}{DW\_AT\_object\_pointer}
-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
\texttt{this} for \addtoindex{C++} or \texttt{self}
for \addtoindex{Objective C}
and some other languages). That parameter
-also has a \livelink{chap:DWATartificial}{DW\_AT\_artificial} attribute whose value is true.
+also has a \DWATartificial{} attribute whose value is true.
Conversely, if the member function entry describes a static
member function, the entry does not have
\addtoindexx{object pointer attribute}
a
-\livelink{chap:DWATobjectpointer}{DW\_AT\_object\_pointer}
+\DWATobjectpointer{}
attribute.
+\textit{In \addtoindex{C++}, non-static member functions can have const-volatile
+qualifiers, which affect the type of the first formal parameter (the
+\doublequote{\texttt{this}}-pointer).}
+
If the member function entry describes a non\dash static member
function that has a const\dash volatile qualification, then
the entry describes a non\dash static member function whose
object formal parameter has a type that has an equivalent
const\dash volatile qualification.
+\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.}
+
+\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
+lvalue objects, or the \DWATrvaluereferenceDEFN{} attribute
+\livetarg{chap:DWATrvaluereferenceofnonstaticmember}{}
+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 body of the enclosing class declaration, the subroutine
entry has a
-\livelink{chap:DWATspecification}{DW\_AT\_specification} attribute,
+\DWATspecification{} attribute,
\addtoindexx{specification attribute}
whose value is
a reference to the debugging information entry representing
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
-\livelink{chap:DWATspecification}{DW\_AT\_specification} attribute
+\DWATspecification{} attribute
\addtoindexx{specification attribute}
do not need to duplicate information provided
by the declaration entry referenced by the specification
attribute. In particular, such entries do not need to contain
-attributes for the name or return type of the function member
-whose definition they represent.
+a name attribute giving the name of the function member whose
+definition they represent.
+Similarly, such entries do not need to contain a return type
+attribute, unless the return type on the declaration was
+unspecified (for example, the declaration used the
+\addtoindex{C++} \autoreturntype{} specifier).
+
+\textit{In \addtoindex{C++}, a member function may be declared
+as deleted. This prevents the compiler from generating a default
+implementation of a special member function such as a
+constructor or destructor, and can affect overload resolution
+when used on other member functions.}
+
+If the member function entry has been declared as deleted,
+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
+compiler-generated implementation of the function. The
+declaration may have different effects on the calling
+convention used for objects of its class, depending on
+whether the default declaration is made inside or outside the
+class.}
+
+If the member function has been declared as defaulted,
+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}
+ \caption{Defaulted attribute names} \label{tab:defaultedattributevaluenames} \\
+ \hline \bfseries Defaulted attribute name & \bfseries Meaning \\ \hline
+\endfirsthead
+ \bfseries Defaulted attribute name & \bfseries Meaning \\ \hline
+\endhead
+ \hline \emph{Continued on next page}
+\endfoot
+\endlastfoot
+\DWDEFAULTEDnoTARG & Not declared default \\
+\DWDEFAULTEDinclassTARG & Defaulted within the class \\
+\DWDEFAULTEDoutofclassTARG& Defaulted outside of the class \\
+\hline
+\end{longtable}
+\end{centering}
+
+\textit{An artificial member function (that is, a compiler-generated
+copy that does not appear in the source) does not have a
+\DWATdefaultedNAME{} attribute.}
\needlines{5}
\subsection{Class Template Instantiations}
\textit{In \addtoindex{C++} a class template is a generic definition of a class
type that may be instantiated when an instance of the class
-is declared or defined. The generic description of the
-class may include both parameterized types and parameterized
-constant values. DWARF does not represent the generic template
+is declared or defined. The generic description of the class may include
+parameterized types, parameterized compile-time constant
+values, and/or parameterized run-time constant addresses.
+DWARF does not represent the generic template
definition, but does represent each instantiation.}
A class template instantiation is represented by a
-debugging information entry with the tag \livelink{chap:DWTAGclasstype}{DW\_TAG\_class\_type},
-\livelink{chap:DWTAGstructuretype}{DW\_TAG\_structure\_type} or
-\livelink{chap:DWTAGuniontype}{DW\_TAG\_union\_type}. With five
+debugging information entry with the tag \DWTAGclasstype,
+\DWTAGstructuretype{} or
+\DWTAGuniontype. With the following
exceptions, such an entry will contain the same attributes
and have the same types of child entries as would an entry
for a class type defined explicitly using the instantiation
types and values. The exceptions are:
\begin{enumerate}[1. ]
-\item Each formal parameterized type declaration appearing in the
-template definition is represented by a debugging information
-entry with the tag
-\livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}. Each
-such entry may have a \livelink{chap:DWATname}{DW\_AT\_name} attribute,
-\addtoindexx{name attribute}
-whose value is
-a null\dash terminated string containing the name of the formal
-type parameter as it appears in the source program. The
-template type parameter entry also has
-\addtoindexx{type attribute}
-a
-\livelink{chap:DWATtype}{DW\_AT\_type} attribute
-describing the actual type by which the formal is replaced
-for this instantiation.
-
-\item Each formal parameterized value declaration appearing in the
-template definition is represented by a
-debugging information entry with the
-\addtoindexx{template value parameter entry}
-tag \livetarg{chap:DWTAGtemplatevalueparameter}{DW\_TAG\_template\_value\_parameter}.
-Each
-such entry may have a
-\livelink{chap:DWATname}{DW\_AT\_name} attribute,
-\addtoindexx{name attribute}
-whose value is
-a null\dash terminated string containing the name of the formal
-value parameter as it appears in the source program.
-The
-\hypertarget{chap:DWATconstvaluetemplatevalueparameter}
-template value parameter entry
-\addtoindexx{template value parameter entry}
-also has
-\addtoindexx{type attribute}
-a
-\livelink{chap:DWATtype}{DW\_AT\_type} attribute
-describing the type of the parameterized value. Finally,
-the template value parameter entry has a
-\livelink{chap:DWATconstvalue}{DW\_AT\_const\_value}
-attribute, whose value is the actual constant value of the
-value parameter for this instantiation as represented on the
-target architecture.
-
-\needlines{5}
-\item The class type entry and each of its child entries reference
-a \addtoindex{template type parameter entry} in any circumstance where the
-source template definition references a formal parameterized
-type.
-Similarly, the class type entry and each of its child
-entries reference a template value parameter entry in any
-circumstance where the source template definition references
-a formal parameterized value.
+\item Template parameters are described and referenced as
+specified in Section \refersec{chap:templateparameters}.
\needlines{4}
\item If the compiler has generated a special compilation unit to
A variant part of a structure is represented by a debugging
information entry\addtoindexx{variant part entry} with the
-tag \livetarg{chap:DWTAGvariantpart}{DW\_TAG\_variant\_part} and is
+tag \DWTAGvariantpartTARG{} and is
owned by the corresponding structure type entry.
If the variant part has a discriminant, the discriminant is
-\hypertarget{chap:DWATdiscrdiscriminantofvariantpart}
+\hypertarget{chap:DWATdiscrdiscriminantofvariantpart}{}
represented by a
\addtoindexx{discriminant (entry)}
separate debugging information entry which
of a
\addtoindexx{member entry (data)!as discriminant}
structure data member entry. The variant part entry will
-\addtoindexx{discriminant attribute}
have a
-\livelink{chap:DWATdiscr}{DW\_AT\_discr} attribute
+\DWATdiscrDEFN{} attribute \addtoindexx{discriminant attribute}
whose value is a \livelink{chap:classreference}{reference} to
the member entry for the discriminant.
the variant part entry has
\addtoindexx{type attribute}
a
-\livelink{chap:DWATtype}{DW\_AT\_type} attribute to represent
+\DWATtype{} attribute to represent
the tag type.
Each variant of a particular variant part is represented by
-\hypertarget{chap:DWATdiscrvaluediscriminantvalue}
+\hypertarget{chap:DWATdiscrvaluediscriminantvalue}{}
a debugging information entry\addtoindexx{variant entry} with the
-tag \livetarg{chap:DWTAGvariant}{DW\_TAG\_variant}
+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
-\livelink{chap:DWATdiscrvalue}{DW\_AT\_discr\_value} 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
\needlines{5}
Alternatively,
-\hypertarget{chap:DWATdiscrlistlistofdiscriminantvalues}
+\hypertarget{chap:DWATdiscrlistlistofdiscriminantvalues}{}
the variant entry may contain
\addtoindexx{discriminant list attribute}
-a
-\livelink{chap:DWATdiscrlist}{DW\_AT\_discr\_list}
+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
\addtoindexx{discriminant value attribute}
the
-\livelink{chap:DWATdiscrvalue}{DW\_AT\_discr\_value}
+\DWATdiscrvalue{}
attribute. A label range is represented by
two LEB128 numbers, the low value of the range followed by the
high value. Both values follow the rules for signedness just
Table \refersec{tab:discriminantdescriptorvalues}.
\begin{simplenametable}[1.4in]{Discriminant descriptor values}{tab:discriminantdescriptorvalues}
-\livetarg{chap:DWDSClabel}{DW\_DSC\_label} \\
-\livetarg{chap:DWDSCrange}{DW\_DSC\_range} \\
+\DWDSClabelTARG{} \\
+\DWDSCrangeTARG{} \\
\end{simplenametable}
-If a variant entry has neither a \livelink{chap:DWATdiscrvalue}{DW\_AT\_discr\_value}
-attribute nor a \livelink{chap:DWATdiscrlist}{DW\_AT\_discr\_list} attribute, or if it has
-a \livelink{chap:DWATdiscrlist}{DW\_AT\_discr\_list} attribute with 0 size, the variant is a
+If a variant entry has neither a \DWATdiscrvalue{}
+attribute nor a \DWATdiscrlist{} attribute, or if it has
+a \DWATdiscrlist{} attribute with 0 size, the variant is a
default variant.
The components selected by a particular variant are represented
variant entry and appear in the same order as the corresponding
declarations in the source program.
+\needlines{6}
\section{Condition Entries}
\label{chap:conditionentries}
variable's value matches any of the described constants,
and the condition is \textquoteleft false\textquoteright{} otherwise.}
-The \livetarg{chap:DWTAGcondition}{DW\_TAG\_condition}
+The \DWTAGconditionTARG{}
debugging information entry\addtoindexx{condition entry}
describes a
logical condition that tests whether a given data item\textquoteright s
value matches one of a set of constant values. If a name
has been given to the condition, the condition entry has a
-\livelink{chap:DWATname}{DW\_AT\_name} attribute
+\DWATname{} attribute
\addtoindexx{name attribute}
whose value is a null\dash terminated string
giving the condition name as it appears in the source program.
+\needlines{4}
The condition entry's parent entry describes the conditional
-variable; normally this will be a \livelink{chap:DWTAGvariable}{DW\_TAG\_variable},
-\livelink{chap:DWTAGmember}{DW\_TAG\_member} or
-\livelink{chap:DWTAGformalparameter}{DW\_TAG\_formal\_parameter} entry.
+variable; normally this will be a \DWTAGvariable,
+\DWTAGmember{} or
+\DWTAGformalparameter{} entry.
If
\addtoindexx{formal parameter entry}
the parent
otherwise it is the type of the parent entry.
\needlines{4}
-The condition entry owns \livelink{chap:DWTAGconstant}{DW\_TAG\_constant} and/or
-\livelink{chap:DWTAGsubrangetype}{DW\_TAG\_subrange\_type} entries that describe the constant
+The condition entry owns \DWTAGconstant{} and/or
+\DWTAGsubrangetype{} entries that describe the constant
values associated with the condition. If any child entry
\addtoindexx{type attribute}
has
-a \livelink{chap:DWATtype}{DW\_AT\_type} attribute,
+a \DWATtype{} attribute,
that attribute should describe a type
compatible with the comparison type (according to the source
language); otherwise the child\textquoteright s type is the same as the
An enumeration type is represented by a debugging information
entry with the tag
-\livetarg{chap:DWTAGenumerationtype}{DW\_TAG\_enumeration\_type}.
+\DWTAGenumerationtypeTARG.
If a name has been given to the enumeration type in the source
program, then the corresponding enumeration type entry has
-a \livelink{chap:DWATname}{DW\_AT\_name} attribute
+a \DWATname{} attribute
\addtoindexx{name attribute}
whose value is a null\dash terminated
string containing the enumeration type name as it appears
-in the source program. This entry also has a
-\livelink{chap:DWATbytesize}{DW\_AT\_byte\_size}
-attribute whose \livelink{chap:classconstant}{integer constant}
-value is the number of bytes
-required to hold an instance of the enumeration.
+in the source program.
The \addtoindex{enumeration type entry}
may have
\addtoindexx{type attribute}
-a \livelink{chap:DWATtype}{DW\_AT\_type} attribute
+a \DWATtype{} attribute
which refers to the underlying data type used to implement
-the enumeration.
+the enumeration. The entry also may have a
+\DWATbytesize{} attribute whose
+\livelink{chap:classconstant}{integer constant} value is the number of bytes
+required to hold an instance of the enumeration. If no \DWATbytesize{} attribute
+is present, the size for holding an instance of the enumeration is given by the size
+of the underlying data type.
+\needlines{4}
If an enumeration type has type safe
\addtoindexx{type safe enumeration types}
semantics such that
then the \addtoindex{enumeration type entry} may
\addtoindexx{enum class|see{type-safe enumeration}}
-have a \livelink{chap:DWATenumclass}{DW\_AT\_enum\_class}
+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
\textit{In \addtoindex{C} or \addtoindex{C++},
the underlying type will be the appropriate
integral type determined by the compiler from the properties of
-\hypertarget{chap:DWATenumclasstypesafeenumerationdefinition}
+\hypertarget{chap:DWATenumclasstypesafeenumerationdefinition}{}
the enumeration literal values.
A \addtoindex{C++} type declaration written
using enum class declares a strongly typed enumeration and
-is represented using \livelink{chap:DWTAGenumerationtype}{DW\_TAG\_enumeration\_type}
-in combination with \livelink{chap:DWATenumclass}{DW\_AT\_enum\_class}.}
+is represented using \DWTAGenumerationtype{}
+in combination with \DWATenumclass.}
Each enumeration literal is represented by a debugging
\addtoindexx{enumeration literal|see{enumeration entry}}
information entry with the
-tag \livetarg{chap:DWTAGenumerator}{DW\_TAG\_enumerator}.
+tag \DWTAGenumeratorTARG.
Each
such entry is a child of the
\addtoindex{enumeration type entry}, and the
enumerator entries appear in the same order as the declarations
of the enumeration literals in the source program.
-Each \addtoindex{enumerator entry} has a
-\livelink{chap:DWATname}{DW\_AT\_name} 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
-\hypertarget{chap:DWATconstvalueenumerationliteralvalue}
+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
-\livelink{chap:DWATconstvalue}{DW\_AT\_const\_value} 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 endry!as array dimension}
+\addtoindexx{enumeration type entry!as array dimension}
dimension of an array type, and the stride for that dimension
-\hypertarget{chap:DWATbytestrideenumerationstridedimensionofarraytype}
+\hypertarget{chap:DWATbytestrideenumerationstridedimensionofarraytype}{}
is different than what would otherwise be determined, then
-\hypertarget{chap:DWATbitstrideenumerationstridedimensionofarraytype}
+\hypertarget{chap:DWATbitstrideenumerationstridedimensionofarraytype}{}
the enumeration type entry has either a
-\livelink{chap:DWATbytestride}{DW\_AT\_byte\_stride}
-or \livelink{chap:DWATbitstride}{DW\_AT\_bit\_stride} attribute
+\DWATbytestrideDEFN{}
+or \DWATbitstrideDEFN{} attribute
\addtoindexx{bit stride attribute}
which specifies the separation
between successive elements along the dimension as described
in
Section \refersec{chap:staticanddynamicvaluesofattributes}.
The value of the
-\livelink{chap:DWATbitstride}{DW\_AT\_bit\_stride} attribute
+\DWATbitstride{} attribute
\addtoindexx{bit stride attribute}
is interpreted as bits and the value of
\addtoindexx{byte stride attribute}
the
-\livelink{chap:DWATbytestride}{DW\_AT\_byte\_stride}
+\DWATbytestride{}
attribute is interpreted as bytes.
be described with a \doublequote{pointer to} modifier applied to a
user\dash defined type.}
+\needlines{4}
A subroutine type is represented by a debugging information
entry with the
\addtoindexx{subroutine type entry}
-tag \livetarg{chap:DWTAGsubroutinetype}{DW\_TAG\_subroutine\_type}.
+tag \DWTAGsubroutinetypeTARG.
If a name has
been given to the subroutine type in the source program,
then the corresponding subroutine type entry has
-a \livelink{chap:DWATname}{DW\_AT\_name} attribute
+a \DWATname{} attribute
\addtoindexx{name attribute}
whose value is a null\dash terminated string containing
the subroutine type name as it appears in the source program.
If the subroutine type describes a function that returns
a value, then the subroutine type entry has
\addtoindexx{type attribute}
-a \livelink{chap:DWATtype}{DW\_AT\_type}
+a \DWATtype{}
attribute to denote the type returned by the subroutine. If
the types of the arguments are necessary to describe the
subroutine type, then the corresponding subroutine type
those declared using non\dash prototype declarations.}
A
-\hypertarget{chap:DWATprototypedsubroutineprototype}
+\hypertarget{chap:DWATprototypedsubroutineprototype}{}
subroutine entry declared with a function prototype style
declaration may have
\addtoindexx{prototyped attribute}
a
-\livelink{chap:DWATprototyped}{DW\_AT\_prototyped} 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:
\begin{enumerate}[1. ]
\item A formal parameter of a parameter list (that has a
specific type) is represented by a debugging information entry
-with the tag \livelink{chap:DWTAGformalparameter}{DW\_TAG\_formal\_parameter}.
+with the tag \DWTAGformalparameter.
Each formal parameter
entry has
\addtoindexx{type attribute}
-a \livelink{chap:DWATtype}{DW\_AT\_type} attribute that refers to the type of
+a \DWATtype{} attribute that refers to the type of
the formal parameter.
\item The unspecified parameters of a variable parameter list
are
\addtoindexx{\texttt{...} parameters|see{unspecified parameters entry}}
represented by a debugging information entry with the
-tag \livelink{chap:DWTAGunspecifiedparameters}{DW\_TAG\_unspecified\_parameters}.
+tag \DWTAGunspecifiedparameters.
\end{enumerate}
+\textit{\addtoindex{C++} const-volatile qualifiers are encoded as
+part of the type of the
+\doublequote{\texttt{this}}-pointer.
+\addtoindex{C++:2011 (ISO)} reference and rvalue-reference qualifiers are encoded using
+the \DWATreference{} and \DWATrvaluereference{} attributes, respectively.
+See also Section \refersec{chap:memberfunctionentries}.}
+\needlines{4}
+A subroutine type entry may have the \DWATreference{} or
+\DWATrvaluereference{} attribute to indicate that it describes the
+type of a member function with reference or rvalue-reference
+semantics, respectively.
+\needlines{6}
\section{String Type Entries}
\label{chap:stringtypeentries}
(except for the name attribute).}
A string type is represented by a debugging information entry
-with the tag \livetarg{chap:DWTAGstringtype}{DW\_TAG\_string\_type}.
+with the tag \DWTAGstringtypeTARG.
If a name has been given to
the string type in the source program, then the corresponding
string type entry has a
-\livelink{chap:DWATname}{DW\_AT\_name} attribute
+\DWATname{} attribute
\addtoindexx{name attribute}
whose value is
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.
+While there is no standard list of character kinds, the kinds
+\texttt{ASCII}\index{ASCII@\texttt{ASCII} (Fortran string kind)} (see \DWATEASCII),
+\texttt{ISO\_10646}\index{ISO\_10646@\texttt{ISO\_10646} (Fortran string kind)}
+\addtoindexx{ISO 10646 character set standard}
+(see \DWATEUCS) and
+\texttt{DEFAULT}\index{DEFAULT@\texttt{DEFAULT} (Fortran string kind)}
+are defined.}
+
\needlines{4}
The string type entry may have a
-\livelink{chap:DWATbytesize}{DW\_AT\_byte\_size} attribute or
-\livelink{chap:DWATbitsize}{DW\_AT\_bit\_size}
+\DWATbytesize{} attribute or
+\DWATbitsize{}
attribute, whose value
(see Section \refersec{chap:byteandbitsizes})
is the amount of
storage needed to hold a value of the string type.
-
The
-\hypertarget{chap:DWATstringlengthstringlengthofstringtype}
+\hypertarget{chap:DWATstringlengthstringlengthofstringtype}{}
string type entry may also have a
-\livelink{chap:DWATstringlength}{DW\_AT\_string\_length} 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
-\livetarg{chap:DWATstringlengthbytesize}{DW\_AT\_string\_length\_byte\_size}
-attribute or
-\livetarg{chap:DWATstringlengthbitsize}{DW\_AT\_string\_length\_bit\_size} 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}
\section{Set Type Entries}
\label{chap:settypeentries}
a group of values of ordinal type.}
A set is represented by a debugging information entry with
-the tag \livetarg{chap:DWTAGsettype}{DW\_TAG\_set\_type}.
+the tag \DWTAGsettypeTARG.
\addtoindexx{set type entry}
If a name has been given to the
set type, then the set type entry has
-a \livelink{chap:DWATname}{DW\_AT\_name} attribute
+a \DWATname{} attribute
\addtoindexx{name attribute}
whose value is a null\dash terminated string containing the
set type name as it appears in the source program.
The set type entry has
\addtoindexx{type attribute}
-a \livelink{chap:DWATtype}{DW\_AT\_type} attribute to denote the
+a \DWATtype{} attribute to denote the
type of an element of the set.
\needlines{4}
object of the given set type is different from the amount of
storage that is normally allocated to hold an individual object
of the indicated element type, then the set type entry has
-either a \livelink{chap:DWATbytesize}{DW\_AT\_byte\_size} attribute, or
-\livelink{chap:DWATbitsize}{DW\_AT\_bit\_size} attribute
+either a \DWATbytesize{} attribute, or
+\DWATbitsize{} attribute
whose value (see Section \refersec{chap:byteandbitsizes}) is
the amount of storage needed to hold a value of the set type.
\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 \livetarg{chap:DWTAGsubrangetype}{DW\_TAG\_subrange\_type}.
-If a name has been
-given to the subrange type, then the subrange type entry
-has a \livelink{chap:DWATname}{DW\_AT\_name} 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
-\livelink{chap:DWTAGgenericsubrange}{DW\_TAG\_generic\_subrange} is
-used to describe arrays with a dynamic rank. See Section
-\ref{chap:DWTAGgenericsubrange}.
+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 \livelink{chap:DWATtype}{DW\_AT\_type} 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.
of storage that is normally allocated to hold an individual
object of the indicated element type, then the subrange
type entry has a
-\livelink{chap:DWATbytesize}{DW\_AT\_byte\_size} attribute or
-\livelink{chap:DWATbitsize}{DW\_AT\_bit\_size}
+\DWATbytesize{} attribute or
+\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
-\livelink{chap:DWATthreadsscaled}{DW\_AT\_threads\_scaled} attribute,
+\hypertarget{chap:DWATthreadsscaledupcarrayboundthreadsscalfactor}{}
+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 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}
+\hypertarget{chap:DWATlowerboundlowerboundofsubrange}{}
subrange
-\hypertarget{chap:DWATupperboundupperboundofsubrange}
+\hypertarget{chap:DWATupperboundupperboundofsubrange}{}
entry may have the attributes
-\livelink{chap:DWATlowerbound}{DW\_AT\_lower\_bound}
+\DWATlowerboundDEFN{}
\addtoindexx{lower bound attribute}
-and \livelink{chap:DWATupperbound}{DW\_AT\_upper\_bound}
+and \DWATupperboundDEFN{}
\addtoindexx{upper bound attribute} to specify, respectively, the lower
and upper bound values of the subrange. The
-\livelink{chap:DWATupperbound}{DW\_AT\_upper\_bound}
-attribute
-\hypertarget{chap:DWATcountelementsofsubrangetype}
-may
-% FIXME: The following matches DWARF4: odd as there is no default count.
+\DWATupperboundNAME{} attribute
+\hypertarget{chap:DWATcountelementsofsubrangetype}{}
+may be replaced by a
\addtoindexx{count attribute!default}
-be
\addtoindexx{count attribute}
-replaced by a
-\livelink{chap:DWATcount}{DW\_AT\_count} 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.
+be a language-dependent default constant as defined in
+Table \refersec{tab:languageencodings}.
\addtoindexx{lower bound attribute!default}
-The default lower bound is 0 for
-\addtoindex{C}, \addtoindex{C++},
-\addtoindex{D},
-\addtoindex{Go},
-\addtoindex{Haskell},
-\addtoindex{Java},
-\addtoindex{Objective C},
-\addtoindex{Objective C++},
-\addtoindex{OpenCL},
-\addtoindex{Python}, and
-\addtoindex{UPC}.
-The default lower bound is 1 for
-\addtoindex{Ada},
-\addtoindex{COBOL},
-\addtoindex{Fortran},
-\addtoindex{Modula-2},
-\addtoindex{Modula-3},
-\addtoindex{Pascal} and
-\addtoindex{PL/I}.
-
-\textit{No other default lower bound values are currently defined.}
If the upper bound and count are missing, then the upper bound value is
\textit{unknown}.\addtoindexx{upper bound attribute!default unknown}
If the subrange type occurs as the description of a dimension
of an array type, and the stride for that dimension is
-\hypertarget{chap:DWATbytestridesubrangestridedimensionofarraytype}
+\hypertarget{chap:DWATbytestridesubrangestridedimensionofarraytype}{}
different than what would otherwise be determined, then
-\hypertarget{chap:DWATbitstridesubrangestridedimensionofarraytype}
+\hypertarget{chap:DWATbitstridesubrangestridedimensionofarraytype}{}
the subrange type entry has either
\addtoindexx{byte stride attribute}
a
-\livelink{chap:DWATbytestride}{DW\_AT\_byte\_stride} or
-\livelink{chap:DWATbitstride}{DW\_AT\_bit\_stride} 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.}
+\needlines{4}
\section{Pointer to Member Type Entries}
\label{chap:pointertomembertypeentries}
A debugging information entry representing the type of an
object that is a pointer to a structure or class member has
-the tag \livetarg{chap:DWTAGptrtomembertype}{DW\_TAG\_ptr\_to\_member\_type}.
+the tag \DWTAGptrtomembertypeTARG.
If the \addtoindex{pointer to member type} has a name, the
\addtoindexx{pointer to member type entry}
pointer to member entry has a
-\livelink{chap:DWATname}{DW\_AT\_name} attribute,
+\DWATname{} attribute,
\addtoindexx{name attribute}
whose value is a
null\dash terminated string containing the type name as it appears
The \addtoindex{pointer to member} entry
has
\addtoindexx{type attribute}
-a \livelink{chap:DWATtype}{DW\_AT\_type} attribute to
+a \DWATtype{} attribute to
describe the type of the class or structure member to which
objects of this type may point.
The \addtoindexx{pointer to member} entry also
-\hypertarget{chap:DWATcontainingtypecontainingtypeofpointertomembertype}
-has a
-\livelink{chap:DWATcontainingtype}{DW\_AT\_containing\_type}
-attribute, whose value is a \livelink{chap:classreference}{reference} to a debugging
+\hypertarget{chap:DWATcontainingtypecontainingtypeofpointertomembertype}{}
+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}
+\hypertarget{chap:DWATuselocationmemberlocationforpointertomembertype}{}
has a
-\livelink{chap:DWATuselocation}{DW\_AT\_use\_location} attribute
+\DWATuselocationDEFN{} attribute
\addtoindexx{use location attribute}
whose value is a
\addtoindex{location description} that computes the
type. The method is thus associated with the type entry,
rather than with each instance of the type.}
-The \livelink{chap:DWATuselocation}{DW\_AT\_use\_location} description is used in conjunction
+The \DWATuselocation{} description is used in conjunction
with the location descriptions for a particular object of the
given \addtoindex{pointer to member type} and for a particular structure or
-class instance. The \livelink{chap:DWATuselocation}{DW\_AT\_use\_location}
+class instance. The \DWATuselocation{}
attribute expects two values to be
\addtoindexi{pushed}{address!implicit push for member operator}
onto the DWARF expression stack before
-the \livelink{chap:DWATuselocation}{DW\_AT\_use\_location} description is evaluated.
+the \DWATuselocation{} description is evaluated.
The first value
\addtoindexi{pushed}{address!implicit push for member operator}
is the value of the \addtoindex{pointer to member} object
object.*mbr_ptr
\end{lstlisting}
\textit{where \texttt{mbr\_ptr} has some \addtoindex{pointer to member type}, a debugger should:}
-\begin{enumerate}
+\begin{enumerate}[1. ]
\item \textit{Push the value of \texttt{mbr\_ptr} onto the DWARF expression stack.}
\item \textit{Push the base address of \texttt{object} onto the DWARF expression stack.}
-\item \textit{Evaluate the \livelink{chap:DWATuselocation}{DW\_AT\_use\_location} description
+\item \textit{Evaluate the \DWATuselocation{} description
given in the type of \texttt{mbr\_ptr}.}
\end{enumerate}
with
\addtoindexx{file type entry}
the tag
-\livetarg{chap:DWTAGfiletype}{DW\_TAG\_file\_type}.
+\DWTAGfiletypeTARG.
If the file type has a name,
-the file type entry has a \livelink{chap:DWATname}{DW\_AT\_name} attribute,
+the file type entry has a \DWATname{} attribute,
\addtoindexx{name attribute}
whose value
is a null\dash terminated string containing the type name as it
The file type entry has
\addtoindexx{type attribute}
-a \livelink{chap:DWATtype}{DW\_AT\_type} attribute describing
+a \DWATtype{} attribute describing
the type of the objects contained in the file.
-The file type entry also
-\addtoindexx{byte size}
-has
-\addtoindexx{bit size}
-a
-\livelink{chap:DWATbytesize}{DW\_AT\_byte\_size} or
-\livelink{chap:DWATbitsize}{DW\_AT\_bit\_size} attribute, whose value
+The file type entry also has a
+\DWATbytesize{}\addtoindexx{byte size attribute} or
+\DWATbitsize{}\addtoindexx{bit size attribute} attribute, whose value
(see Section \refersec{chap:staticanddynamicvaluesofattributes})
is the amount of storage need to hold a value of the file type.
-\subsection{Dynamic Type Properties}
-\label{chap:dynamictypeproperties}
+\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
+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 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
+replicate the full description of that other type.
+
+A dynamic type is represented by a debugging information entry
+with the tag \DWTAGdynamictypeTARG. If a name has been given to the
+dynamic type, then the dynamic type has a \DWATname{} attribute
+whose value is a null-terminated string containing the dynamic
+type name as it appears in the source.
+
+A dynamic type entry has a \DWATtype{} attribute whose value is a
+reference to the type of the entities that are dynamically allocated.
+
+A dynamic type entry also has a \DWATdatalocation, and may also
+have \DWATallocated{} and/or \DWATassociated{} attributes as
+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.
+
+
+\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}).
+
+
+\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}
information, including a location and/or run\dash time parameters,
about the data that represents the value for that object.}
-\hypertarget{chap:DWATdatalocationindirectiontoactualdata}
-The \livelink{chap:DWATdatalocation}{DW\_AT\_data\_location}
-attribute may be used with any
-\addtoindexx{data location attribute}
-type that provides one or more levels of
+\hypertarget{chap:DWATdatalocationindirectiontoactualdata}{}
+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.
\needlines{5}
\textit{This location description will typically begin with
-\livelink{chap:DWOPpushobjectaddress}{DW\_OP\_push\_object\_address}
+\DWOPpushobjectaddress{}
which loads the address of the
object which can then serve as a descriptor in subsequent
calculation. For an example using
-\livelink{chap:DWATdatalocation}{DW\_AT\_data\_location}
+\DWATdatalocation{}
for a \addtoindex{Fortran 90 array}, see
-Appendix \refersec{app:fortran90example}.}
+Appendix \refersec{app:fortranarrayexample}.}
\subsection{Allocation and Association Status}
\label{chap:allocationandassociationstatus}
may be dynamically allocated or associated with a variable
under explicit program control.}
-\hypertarget{chap:DWATallocatedallocationstatusoftypes}
-The
-\livelink{chap:DWATallocated}{DW\_AT\_allocated}
-attribute
-\addtoindexx{allocated attribute}
-may optionally be used with any
+\hypertarget{chap:DWATallocatedallocationstatusoftypes}{}
+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
an object of the type is
currently allocated or not.
-\hypertarget{chap:DWATassociatedassociationstatusoftypes}
+\needlines{4}
+\hypertarget{chap:DWATassociatedassociationstatusoftypes}{}
The
-\livelink{chap:DWATassociated}{DW\_AT\_associated} 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}.
and zero is interpreted as not allocated or not associated.
\textit{For \addtoindex{Fortran 90},
-if the \livelink{chap:DWATassociated}{DW\_AT\_associated}
+if the \DWATassociated{}
attribute is present,
the type has the POINTER property where either the parent
variable is never associated with a dynamic object or the
implementation does not track whether the associated object
-is static or dynamic. If the \livelink{chap:DWATallocated}{DW\_AT\_allocated} attribute is
-present and the \livelink{chap:DWATassociated}{DW\_AT\_associated} attribute is not, the type
+is static or dynamic. If the \DWATallocated{} attribute is
+present and the \DWATassociated{} attribute is not, the type
has the ALLOCATABLE property. If both attributes are present,
then the type should be assumed to have the POINTER property
-(and not ALLOCATABLE); the \livelink{chap:DWATallocated}{DW\_AT\_allocated} attribute may then
+(and not ALLOCATABLE); the \DWATallocated{} attribute may then
be used to indicate that the association status of the object
resulted from execution of an ALLOCATE statement rather than
pointer assignment.}
\textit{For examples using
-\livelink{chap:DWATallocated}{DW\_AT\_allocated} for \addtoindex{Ada} and
+\DWATallocated{} for \addtoindex{Ada} and
\addtoindex{Fortran 90}
arrays,
see Appendix \refersec{app:aggregateexamples}.}
\subsection{Array Rank}
\label{chap:DWATrank}
-\textit{The Fortran language supports ``assumed-rank arrays''. The
+\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.}
-
-The presence of \DWATrank{} indicates that an array's rank
-(dimensionality) is dynamic, and therefore unknown at compile
-time. \DWATrank{} contains an expression that can be evaluated to look
-up the dynamic rank from the array descriptor.
-
-The dimensions of an array with dynamic rank are described using the
-\DWTAGgenericsubrange{} tag. The \DWTAGgenericsubrange{} tag is the
-dynamic rank array equivalent of
-\livelink{chap:DWTAGsubrangetype}{DW\_TAG\_subrange\_type}. The
-difference is that a \DWTAGgenericsubrange{} contains generic
+ 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 \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
+is the dynamic rank array equivalent of
+\DWTAGsubrangetype. The
+difference is that a \DWTAGgenericsubrange{} entry contains generic
lower/upper bound and stride expressions that need to be evaluated for
-each dimension: Before any expression contained in a
+each dimension. Before any expression contained in a
\DWTAGgenericsubrange{} can be evaluated, the dimension for which the
-expression should be evaluated needs to be pushed onto the stack. The
+expression is to be evaluated needs to be pushed onto the stack. The
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~\ref{app:assumedrankexample}.}
-
-
-\section{Template Alias Entries}
-\label{chap:templatealiasentries}
-
-A type named using a template alias is represented
-by a debugging information entry
-\addtoindexx{template alias entry}
-with the tag
-\livetarg{chap:DWTAGtemplatealias}{DW\_TAG\_template\_alias}.
-The template alias entry has a
-\livelink{chap:DWATname}{DW\_AT\_name} 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 also contains
-\addtoindexx{type attribute}
-a
-\livelink{chap:DWATtype}{DW\_AT\_type} attribute
-whose value is a \livelink{chap:classreference}{reference}
-to the type named by the template alias.
-
-\needlines{4}
-The template alias entry has the following child entries:
-\begin{enumerate}[1. ]
-\item Each formal parameterized type declaration appearing
-in the template alias declaration is represented
-by a debugging information entry with the tag
-\livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}.
-Each such entry may have
-a \livelink{chap:DWATname}{DW\_AT\_name} attribute,
-\addtoindexx{name attribute}
-whose value is a null\dash terminated
-string containing the name of the formal type parameter as it
-appears in the source program. The template type parameter
-entry also has
-\addtoindexx{type attribute}
-a \livelink{chap:DWATtype}{DW\_AT\_type} attribute
-describing the actual
-type by which the formal is replaced for this instantiation.
-
-\item Each formal parameterized value declaration
-appearing in the template alias declaration is
-represented by a debugging information entry with the tag
-\livelink{chap:DWTAGtemplatevalueparameter}{DW\_TAG\_template\_value\_parameter}.
-Each such entry may have
-a \livelink{chap:DWATname}{DW\_AT\_name} attribute,
-\addtoindexx{name attribute}
-whose value is a null\dash terminated
-string containing the name of the formal value parameter
-as it appears in the source program. The template value
-parameter entry also has
-\addtoindexx{type attribute}
-a \livelink{chap:DWATtype}{DW\_AT\_type} attribute describing
-the type of the parameterized value. Finally, the template
-value parameter entry has a \livelink{chap:DWATconstvalue}{DW\_AT\_const\_value}
-attribute, whose value is the actual constant value of the value parameter for
-this instantiation as represented on the target architecture.
-\end{enumerate}
+ Section~\refersec{app:assumedrankexample}.}