\setlength{\extrarowheight}{0.1cm}
\begin{longtable}{l|p{8cm}}
\caption{Attributes by tag value} \\
- \hline \bfseries TAG Name&\bfseries Applicable Attributes\\ \hline
+ \hline \bfseries TAG name&\bfseries Applicable attributes\\ \hline
\endfirsthead
- \bfseries TAG name&\bfseries Applicable Attributes \\ \hline
+ \bfseries TAG name&\bfseries Applicable attributes \\ \hline
\endhead
\hline \emph{Continued on next page}
\endfoot
&\DWATencoding{} \\
&\DWATendianity{} \\
&\DWATname{} \\
-&\DWATpicturestring{} \\
-&\DWATsibling{} \\
-&\DWATsmall{} \\
+&\DWATpicturestring{} \\*
+&\DWATsibling{} \\*
+&\DWATsmall{} \\*
\hline
\DWTAGcatchblock
&\livelink{chap:DECL}{DECL} \\*
&\DWATabstractorigin{} \\
+&\DWATentrypc{} \\
&\DWAThighpc{} \\
&\DWATlowpc{} \\
&\DWATranges{} \\
\hline
\DWTAGcommonblock
-&\livelink{chap:DECL}{DECL} \\
-&\DWATdeclaration{} \\
-&\DWATdescription{} \\
+&\livelink{chap:DECL}{DECL} \\*
+&\DWATdeclaration{} \\*
+&\DWATdescription{} \\*
&\DWATlinkagename{} \\
&\DWATlocation{} \\
&\DWATname{} \\
\hline
\DWTAGcompileunit
+&\DWATaddrbase{} \\
&\DWATbasetypes{} \\
&\DWATcompdir{} \\
+&\DWATentrypc{} \\
&\DWATidentifiercase{} \\
&\DWAThighpc{} \\
&\DWATlanguage{} \\
&\DWATname{} \\
&\DWATproducer{} \\
&\DWATranges{} \\
+&\DWATrangesbase{} \\
&\DWATsegment{} \\
&\DWATstmtlist{} \\
+&\DWATstroffsetsbase{} \\
&\DWATuseUTFeight{} \\
\hline
&\livelink{chap:DECL}{DECL} \\
&\DWATaccessibility{} \\
&\DWATdatamemberlocation{} \\
-&\DWATsibling{} \\
-&\DWATtype{} \\
-&\DWATvirtuality{} \\
+&\DWATsibling{} \\*
+&\DWATtype{} \\*
+&\DWATvirtuality{} \\*
\hline
\DWTAGinlinedsubroutine
\hline
\DWTAGlexicalblock
-&\livelink{chap:DECL}{DECL} \\
-&\DWATabstractorigin{} \\
-&\DWATdescription{} \\
+&\livelink{chap:DECL}{DECL} \\*
+&\DWATabstractorigin{} \\*
+&\DWATdescription{} \\*
+&\DWATentrypc{} \\
&\DWAThighpc{} \\
&\DWATlowpc{} \\
&\DWATname{} \\
\DWTAGmember
&\livelink{chap:DECL}{DECL} \\
&\DWATaccessibility{} \\
+&\DWATartificial{} \\
&\DWATbitoffset{} \\
&\DWATbitsize{} \\
&\DWATbytesize{} \\
\hline
\DWTAGpartialunit
+&\DWATaddrbase{} \\
&\DWATbasetypes{} \\
&\DWATcompdir{} \\
&\DWATdescription{} \\
+&\DWATentrypc{} \\
&\DWATidentifiercase{} \\
&\DWAThighpc{} \\
&\DWATlanguage{} \\
&\DWATname{} \\
&\DWATproducer{} \\
&\DWATranges{} \\
+&\DWATrangesbase{} \\
&\DWATsegment{} \\
&\DWATstmtlist{} \\
+&\DWATstroffsetsbase{} \\
&\DWATuseUTFeight{} \\
\hline
&\DWATname{} \\
&\DWATsibling{} \\
&\DWATstartscope{} \\
-&\DWATstringlength{} \\
-&\DWATstringlengthbitsize{} \\
-&\DWATstringlengthbytesize{} \\
-&\DWATvisibility{} \\
+&\DWATstringlength{} \\*
+&\DWATstringlengthbitsize{} \\*
+&\DWATstringlengthbytesize{} \\*
+&\DWATvisibility{} \\*
\hline
\DWTAGstructuretype
\hline
\DWTAGtemplatetypeparameter
&\livelink{chap:DECL}{DECL} \\
+&\DWATdefaultvalue{} \\
&\DWATdescription{} \\
&\DWATname{} \\
&\DWATsibling{} \\
\DWTAGtemplatevalueparameter{}
&\livelink{chap:DECL}{DECL} \\
&\DWATconstvalue{} \\
+&\DWATdefaultvalue{} \\
&\DWATdescription{} \\
&\DWATname{} \\
&\DWATsibling{} \\
\DWTAGtryblock
&\livelink{chap:DECL}{DECL} \\
&\DWATabstractorigin{} \\
+&\DWATentrypc{} \\
&\DWAThighpc{} \\
&\DWATlowpc{} \\
&\DWATranges{} \\
\hline
\DWTAGtypeunit
-&\DWATlanguage{} \\
+&\DWATaddrbase{} \\
+&\DWATlanguage{} \\
+&\DWATstroffsetsbase{} \\
\hline
\DWTAGuniontype
&\livelink{chap:DECL}{DECL} \\
&\DWATabstractorigin{} \\
&\DWATaccessibility{} \\
+&\DWATartificial{} \\
&\DWATconstexpr{} \\
&\DWATconstvalue{} \\
&\DWATdeclaration{} \\
&\DWATaccessibility{} \\*
&\DWATaddressclass{} \\*
&\DWATdeclaration{} \\*
+&\DWATentrypc{} \\*
&\DWAThighpc{} \\*
&\DWATlocation{} \\*
&\DWATlowpc{} \\*
\vspace{1cm}
\begin{tabular}{ll}
\textbf{Date} & \textbf{Issue Incorported or Other Change} \\ \hline \\
+10/26/2013 & 130313.1 (indirect string table), 130313.2 (indirect address table), \\
+ & 130313.3 (ranges without relocations), 130313.4 (split objects) \\
+10/25/2013 & 130530.1 (MD5 wording), 131017.1 (\DWATentrypcNAME{} descriptions), \\
+ & 130701.1 (MD5 digest for file names in line table), 100831.1 (implicit pointers) \\
+10/24/2013 & 130815.1 (template parameter refactoring) \\
+10/23/2013 & 130722.1 (additional \DWATartificialNAME{} uses in Appendix A), \\
+ & 120719.1 (constant \DWATentrypcNAME{} value), \\
+ & 120727.1 (\DWATuseUTFeightNAME{} affects all sections), \\
+ & 130402.1 (\DWATdefaultvalueNAME{} flag on template parameters), \\
+ & 130412.1 (non-integral non-type template parameters), 131009.1 (OCaml) \\
+10/22/2013 & 120628.1 (language codes for C++:2003 and 2011) \\
10/11/2013 & Several DW<name>TARG repairs \\
10/10/2013 & Convert document to use new DWARF name commands (dwarfnamecmds.tex) \\
10/2/2013 & Fill out the rest of dwarfnamecmds.tex \\
& 101014.1, 101111.1, 120218.1 (Go, Modula-3 and Haskell), \\
& 110803.1 (tls), 110926.1 (DW\_OP\_callx), 121212.1 (type unit) \\
& 121221.1 (location length), 130121.1 (default location) \\
- & 110110.1 (size of string length--\textbf{normative text only, still need examples}) \\
+ & 121123.1 (length in location list entry), \\
+ & 110110.1 \& 130623.1 (size of string length--\textbf{normative text only, need examples}) \\
6/20/2013 & 090824.1 (coarray) \\
6/18/2013 & 100211.1 (OpenCL), add this Change Summary \\
6/1/2013 & Begin V5 (from V4.1), delete V4 vs V3 stuff, delete "new in V4" \\
zero byte.
\item A \DWATexternal{} attribute,
-\hypertarget{chap:DWATexternalexternalvariable}
+\hypertarget{chap:DWATexternalexternalvariable}{}
which
\addtoindexx{external attribute}
is a \livelink{chap:classflag}{flag}, if the name
type of the data member whose definition they
% Getting the link target in a good spot is tricky. So putting
%this one a little early.
-\hypertarget{chap:DWATvariableparameternonconstantparameterflag}
+\hypertarget{chap:DWATvariableparameternonconstantparameterflag}{}
represent.
\item A \DWATvariableparameter{}
value in the calling function cannot be modified by the callee.
\item A \DWATisoptional{} attribute,
-\hypertarget{chap:DWATisoptionaloptionalparameter}
+\hypertarget{chap:DWATisoptionaloptionalparameter}{}
which
\addtoindexx{is optional attribute}
is a \livelink{chap:classflag}{flag}, if a
for
\addtoindexx{formal parameter entry!with default value}
a formal parameter
-\hypertarget{chap:DWATdefaultvaluedefaultvalueofparameter}
+\hypertarget{chap:DWATdefaultvaluedefaultvalueofparameter}{}
entry. The value of this attribute is a reference to the
debugging information entry for a variable or subroutine,
or the value may be a constant. If the attribute form is of
\item A \DWATconstvalue{} attribute
for
-\hypertarget{chap:DWATconstvalueconstantobject}
+\hypertarget{chap:DWATconstvalueconstantobject}{}
an entry describing a
variable or formal parameter whose value is constant and not
represented by an object in the address space of the program,
attribute if the scope of
\addtoindexx{start scope attribute}
an
-\hypertarget{chap:DWATstartscopeobjectdeclaration}
+\hypertarget{chap:DWATstartscopeobjectdeclaration}{}
object is smaller than (that is, is a subset of the addresses
of) the scope most closely enclosing the object. There are
two cases:
\item A \DWATendianity{} attribute,
whose value
-\hypertarget{chap:DWATendianityendianityofdata}
+\hypertarget{chap:DWATendianityendianityofdata}{}
is a constant
\addtoindexx{endianity attribute}
that
\item A \DWATconstexpr{} attribute,
which
-\hypertarget{chap:DWATconstexprcompiletimeconstantobject}
+\hypertarget{chap:DWATconstexprcompiletimeconstantobject}{}
is a \livelink{chap:classflag}{flag}, if a
variable entry represents a C++ object declared with the
\texttt{constexpr} specifier. This attribute indicates that the
name as it appears in the source program.
Each
-\hypertarget{chap:DWATnamelistitemnamelistitem}
+\hypertarget{chap:DWATnamelistitemnamelistitem}{}
name that is part of the namelist is represented
by a debugging information entry with the tag
\DWTAGnamelistitemTARG.
-\section{Executable Objects and Shared Objects}
+\section{Relocatable, Executable, Shared and Split Objects}
\label{datarep:executableobjectsandsharedobjects}
+\subsection{Relocatable Objects}
+
+\subsection{Executable Objects}
+\label{chap:executableobjects}
The relocated addresses in the debugging information for an
-executable object are virtual addresses and the relocated
+executable object are virtual addresses.
+
+\subsection{Shared Objects}
+\label{datarep:sharedobjects}
+The relocated
addresses in the debugging information for a shared object
are offsets relative to the start of the lowest region of
memory loaded from that shared object.
base address at which the object was attached. This offset
is available in the run\dash time linker\textquoteright s data structures.}
+\subsection{Split DWARF Objects}
+\label{datarep:splitdwarfobjects}
+A DWARF producer may partition the debugging
+information such that the majority of the debugging
+information can remain in individual object files without
+being processed by the linker. The first partition contains
+debugging information that must still be processed by the linker,
+and includes the following:
+\begin{itemize}
+\item
+The line number tables, range tables, frame tables, and
+accelerated access tables, in the usual sections:
+\dotdebugline, \dotdebugranges, \dotdebugframe,
+\dotdebugpubnames, \dotdebugpubtypes{} and \dotdebugaranges,
+respectively.
+\item
+An address table, in the \dotdebugaddr{} section. This table
+contains all addresses and constants that require
+link-time relocation, and items in the table can be
+referenced indirectly from the debugging information via
+the \DWFORMaddrx{} form, and by the \DWOPaddrx{} and
+\DWOPconstx{} operators.
+\item
+A skeleton compilation unit, as described in Section
+\refersec{chap:skeletoncompilationunitentries},
+in the \dotdebuginfo{} section.
+\item
+An abbreviations table for the skeleton compilation unit,
+in the \dotdebugabbrev{} section.
+\item
+A string table, in the \dotdebugstr{} section. The string
+table is necessary only if the skeleton compilation unit
+uses either indirect string form, \DWFORMstrp{} or
+\DWFORMstrx.
+\item
+A string offsets table, in the \dotdebugstroffsets{}
+section. The string offsets table is necessary only if
+the skeleton compilation unit uses the \DWFORMstrx{} form.
+\end{itemize}
+The attributes contained in the skeleton compilation
+unit can be used by a DWARF consumer to find the object file
+or DWARF object file that contains the second partition.
+
+The second partition contains the debugging information that
+does not need to be processed by the linker. These sections
+may be left in the object files and ignored by the linker
+(i.e., not combined and copied to the executable object), or
+they may be placed by the producer in a separate DWARF object
+file. This partition includes the following:
+\begin{itemize}
+\item
+The full compilation unit, in the \dotdebuginfodwo{} section.
+Attributes in debugging information entries may refer to
+machine addresses indirectly using the \DWFORMaddrx{} form,
+and location expressions may do so using the \DWOPaddrx{} and
+\DWOPconstx{} forms. Attributes may refer to range table
+entries with an offset relative to a base offset in the
+range table for the compilation unit.
+
+\item Separate type units, in the \dotdebugtypesdwo{} section.
+
+\item
+Abbreviations table(s) for the compilation unit and type
+units, in the \dotdebugabbrevdwo{} section.
+
+\item Location lists, in the \dotdebuglocdwo{} section.
+
+\item
+A skeleton line table (for the type units), in the
+\dotdebuglinedwo{} section (see
+Section \refersec{chap:skeletoncompilationunitentries}).
+
+\item Macro information, in the \dotdebugmacinfodwo{} section.
+
+\item A string table, in the \dotdebugstrdwo{} section.
+
+\item A string offsets table, in the \dotdebugstroffsetsdwo{}
+section.
+\end{itemize}
+
+Except where noted otherwise, all references in this document
+to a debugging information section (for example, \dotdebuginfo),
+applies also to the corresponding split DWARF section (for example,
+\dotdebuginfodwo).
\section{32-Bit and 64-Bit DWARF Formats}
\begin{itemize}
\item \livelinki{chap:classaddress}{address}{address class} \\
\livetarg{datarep:classaddress}{}
-Represented as an object of appropriate size to hold an
+Represented as either:
+\begin{itemize}
+\item An object of appropriate size to hold an
address on the target machine
(\DWFORMaddrTARG).
-The size is
-encoded in the compilation unit header
+The size is encoded in the compilation unit header
(see Section \refersec{datarep:compilationunitheader}).
This address is relocatable in a relocatable object file and
is relocated in an executable file or shared object.
+\item As an indirect index into a table of addresses (as
+described in the previous bullet) in the
+\dotdebugaddr{} section (\DWFORMaddrxTARG).
+The representation of a \DWFORMaddrxNAME{} value is an unsigned
+\addtoindex{LEB128} value, which is interpreted as a zero-based
+index into an array of addresses in the \dotdebugaddr{} section.
+\end{itemize}
+
\needlines{4}
\item \livelink{chap:classblock}{block} \\
\livetarg{datarep:classblock}{}
header for the compilation unit containing the reference. There
are five forms for this type of reference. There are fixed
length forms for one, two, four and eight byte offsets
-(respectively, \DWFORMrefoneTARG,
+(respectively,
+\DWFORMrefnMARK
+\DWFORMrefoneTARG,
\DWFORMreftwoTARG,
\DWFORMreffourTARG,
and \DWFORMrefeightTARG).
A string is a sequence of contiguous non\dash null bytes followed by
one null byte.
\addtoindexx{string class}
-A string may be represented immediately in the
-debugging information entry itself
-(\DWFORMstringTARG), or may
-be represented as an
+A string may be represented:
+\begin{itemize}
+\item immediately in the debugging information entry itself
+(\DWFORMstringTARG),
+\item as an
\addtoindexx{section offset!in class string value}
offset into a string table contained in
the \dotdebugstr{} section of the object file
-(\DWFORMstrpTARG). In
-the \thirtytwobitdwarfformat, the representation of a
-\DWFORMstrp{}
+(\DWFORMstrpTARG).
+In the \thirtytwobitdwarfformat, the representation of a
+\DWFORMstrpNAME{}
value is a 4\dash byte unsigned offset; in the \sixtyfourbitdwarfformat,
it is an 8\dash byte unsigned offset
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
+\item as an indirect offset into the string table using an
+index into a table of offsets contained in the
+\dotdebugstroffsets{} section of the object file (\DWFORMstrxTARG).
+The representation of a \DWFORMstrxNAME{} value is an unsigned
+\addtoindex{LEB128} value, which is interpreted as a zero-based
+index into an array of offsets in the \dotdebugstroffsets{} section.
+The offset entries in the \dotdebugstroffsets{} section have the
+same representation as \DWFORMstrp{} values.
+\end{itemize}
+Any combination of these three forms may be used within a single compilation.
If the \DWATuseUTFeight{}
\addtoindexx{use UTF8 attribute}\addtoindexx{UTF-8} attribute is specified for the
-compilation unit entry, string values are encoded using the
+compilation, partial or type unit entry, string values are encoded using the
UTF\dash 8 (\addtoindex{Unicode} Transformation Format\dash 8) from the Universal
Character Set standard (ISO/IEC 10646\dash 1:1993). Otherwise,
the string representation is unspecified.
\addtoindexx{constant value attribute!encoding} \\
\DWATcontainingtype&0x1d&\livelink{chap:classreference}{reference}
\addtoindexx{containing type attribute!encoding} \\
-\DWATdefaultvalue&0x1e&\livelink{chap:classreference}{reference}
+\DWATdefaultvalue&0x1e&\livelink{chap:classreference}{reference}, \livelink{chap:classflag}{flag}
\addtoindexx{default value attribute!encoding} \\
\DWATinline&0x20&\livelink{chap:classconstant}{constant}
\addtoindexx{inline attribute!encoding} \\
\addtoindexx{data location attribute!encoding} \\
\DWATbytestride&0x51&\livelink{chap:classconstant}{constant}, \livelink{chap:classexprloc}{exprloc},
\livelink{chap:classreference}{reference} \addtoindexx{byte stride attribute!encoding} \\
-\DWATentrypc&0x52&\livelink{chap:classaddress}{address}
+\DWATentrypc&0x52&\livelink{chap:classaddress}{address}, \livelink{chap:classconstant}{constant}
\addtoindexx{entry pc attribute!encoding} \\
\DWATuseUTFeight&0x53&\livelink{chap:classflag}{flag}
\addtoindexx{use UTF8 attribute!encoding}\addtoindexx{UTF-8} \\
\livelink{chap:classconstant}{constant}\addtoindexx{string length attribute!size of length} \\
\DWATrank~\ddag&0x71&
\livelink{chap:DWATrank}{constant, exprloc}\addtoindexx{rank attribute!encoding} \\
+\DWATstroffsetsbase~\ddag&0x72&
+ \livelink{chap:classstring}{reference}\addtoindexx{string offsets base!encoding} \\
+\DWATaddrbase~\ddag &0x73&
+ \livelink{chap:DWATaddrbase}{reference}\addtoindexx{address table base!encoding} \\
+\DWATrangesbase~\ddag&0x74&
+ \livelink{chap:DWATrangesbase}{reference}\addtoindexx{ranges base!encoding} \\
+\DWATdwoid~\ddag &0x75&
+ \livelink{chap:DWATdwoid}{constant}\addtoindexx{split DWARF object id!encoding} \\
+\DWATdwoname~\ddag &0x76&
+ \livelink{chap:DWATdwname}{string}\addtoindexx{split DWARF object file name!encooding} \\
\DWATlouser&0x2000 & --- \addtoindexx{low user attribute encoding} \\
\DWAThiuser&\xiiifff& --- \addtoindexx{high user attribute encoding} \\
\endlastfoot
\DWFORMaddr &0x01&\livelink{chap:classaddress}{address} \\
+\textit{Reserved} &0x02& \\
\DWFORMblocktwo &0x03&\livelink{chap:classblock}{block} \\
\DWFORMblockfour &0x04&\livelink{chap:classblock}{block} \\
\DWFORMdatatwo &0x05&\livelink{chap:classconstant}{constant} \\
\DWFORMstring&0x08&\livelink{chap:classstring}{string} \\
\DWFORMblock&0x09&\livelink{chap:classblock}{block} \\
\DWFORMblockone &0x0a&\livelink{chap:classblock}{block} \\
-\DWFORMdataone &\livelink{chap:classconstant}{constant} \\
+\DWFORMdataone &0x0b&\livelink{chap:classconstant}{constant} \\
\DWFORMflag&0x0c&\livelink{chap:classflag}{flag} \\
\DWFORMsdata&0x0d&\livelink{chap:classconstant}{constant} \\
\DWFORMstrp&0x0e&\livelink{chap:classstring}{string} \\
\DWFORMsecoffset{} &0x17&\livelink{chap:classlineptr}{lineptr}, \livelink{chap:classloclistptr}{loclistptr}, \livelink{chap:classmacptr}{macptr}, \livelink{chap:classrangelistptr}{rangelistptr} \\
\DWFORMexprloc{} &0x18&\livelink{chap:classexprloc}{exprloc} \\
\DWFORMflagpresent{} &0x19&\livelink{chap:classflag}{flag} \\
+\DWFORMstrx &0x1a&\livelink{chap:classstring}{string} \\
+\DWFORMaddrx &0x1b&\livelink{chap:classaddess}{address} \\
\DWFORMrefsigeight &0x20&\livelink{chap:classreference}{reference} \\
\end{longtable}
\begin{centering}
\setlength{\extrarowheight}{0.1cm}
-\begin{longtable}{l|l|c|l}
+\begin{longtable}{l|c|c|l}
\caption{DWARF operation encodings} \label{tab:dwarfoperationencodings} \\
\hline & &\bfseries No. of &\\
\bfseries Operation&\bfseries Code &\bfseries Operands &\bfseries Notes\\ \hline
\endlastfoot
\DWOPaddr&0x03&1 & constant address \\
-& & &(size target specific) \\
+& & &(size is target specific) \\
\DWOPderef&0x06&0 & \\
\DWOPabs&0x19&0 & \\
\DWOPand&0x1a&0 & \\
\DWOPdiv&0x1b&0 & \\
-
-
-
\DWOPminus&0x1c&0 & \\
\DWOPmod&0x1d&0 & \\
\DWOPmul&0x1e&0 & \\
\DWOPlitzero & 0x30 & 0 & \\
\DWOPlitone & 0x31 & 0& literals 0 .. 31 = \\
-\ldots & & &\hspace{0.5cm}(\DWOPlitzero{} + literal) \\
+\ldots & & &\hspace{0.3cm}(\DWOPlitzero{} + literal) \\
\DWOPlitthirtyone & 0x4f & 0 & \\ \hline
-\DWOPregzero & 0x50 & 0 & \\
-\DWOPregone & 0x51 & 0® 0 .. 31 = \\
-\ldots & & &\hspace{0.5cm}(\DWOPregzero{} + regnum) \\
+\DWOPregzero & 0x50 & 0 & \\*
+\DWOPregone & 0x51 & 0® 0 .. 31 = \\*
+\ldots & & &\hspace{0.3cm}(\DWOPregzero{} + regnum) \\*
\DWOPregthirtyone & 0x6f & 0 & \\ \hline
-\DWOPbregzero & 0x70 &1 & SLEB128 offset \\
-\DWOPbregone & 0x71 & 1 &base register 0 .. 31 = \\
-... & & &\hspace{0.5cm}(\DWOPbregzero{} + regnum) \\
+\DWOPbregzero & 0x70 &1 & SLEB128 offset \\*
+\DWOPbregone & 0x71 & 1 &base register 0 .. 31 = \\*
+... & & &\hspace{0.3cm}(\DWOPbregzero{} + regnum) \\*
\DWOPbregthirtyone & 0x8f & 1 & \\ \hline
\DWOPregx{} & 0x90 &1&ULEB128 register \\
\DWOPfbreg{} & 0x91&1&SLEB128 offset \\
-\DWOPbregx{} & 0x92&2 &ULEB128 register followed \\
-& & & by SLEB128 offset \\
-\DWOPpiece{} & 0x93 &1& ULEB128 size of piece addressed \\
+\DWOPbregx{} & 0x92&2 &ULEB128 register, \\*
+ & & &SLEB128 offset \\
+\DWOPpiece{} & 0x93 &1& ULEB128 size of piece \\
\DWOPderefsize{} & 0x94 &1& 1-byte size of data retrieved \\
\DWOPxderefsize{} & 0x95&1&1-byte size of data retrieved \\
\DWOPnop{} & 0x96 &0& \\
-
\DWOPpushobjectaddress&0x97&0 & \\
\DWOPcalltwo&0x98&1& 2\dash byte offset of DIE \\
\DWOPcallfour&0x99&1& 4\dash byte offset of DIE \\
-\DWOPcallref&0x9a&1& 4\dash\ or 8\dash byte\\
- &&& offset of DIE \\
+\DWOPcallref&0x9a&1& 4\dash\ or 8\dash byte offset of DIE \\
\DWOPformtlsaddress&0x9b &0& \\
\DWOPcallframecfa{} &0x9c &0& \\
-\DWOPbitpiece&0x9d &2&ULEB128 size followed by \\
-&&&ULEB128 offset\\
-\DWOPimplicitvalue{} &0x9e &2&ULEB128 size followed by \\
-&&&\nolink{block} of that size\\
+\DWOPbitpiece&0x9d &2&ULEB128 size, \\*
+ &&&ULEB128 offset\\
+\DWOPimplicitvalue{} &0x9e &2&ULEB128 size, \\*
+ &&&\nolink{block} of that size\\
\DWOPstackvalue{} &0x9f &0& \\
+\DWOPimplicitpointer{} &0xa0& 2 &4- or 8-byte offset of DIE, \\*
+ &&&SLEB128 constant offset \\
+\DWOPaddrx&0xa1&1&ULEB128 indirect address \\
+\DWOPconstx&0xa2&1&ULEB128 indirect constant \\
\DWOPlouser{} &0xe0 && \\
\DWOPhiuser{} &\xff && \\
\label{datarep:basetypeattributeencodings}
The encodings of the
-\hypertarget{chap:DWATencodingencodingofbasetype}
+\hypertarget{chap:DWATencodingencodingofbasetype}{}
constants used in
\addtoindexx{encoding attribute!encoding}
the
\setlength{\extrarowheight}{0.1cm}
\begin{longtable}{l|c}
\caption{Base type encoding values} \label{tab:basetypeencodingvalues} \\
- \hline \bfseries Base type encoding code name&\bfseries Value \\ \hline
+ \hline \bfseries Base type encoding name&\bfseries Value \\ \hline
\endfirsthead
- \bfseries Base type encoding code name&\bfseries Value\\ \hline
+ \bfseries Base type encoding name&\bfseries Value\\ \hline
\endhead
\hline \emph{Continued on next page}
\endfoot
\end{longtable}
\end{centering}
+\needlines{9}
The encodings of the constants used in the
\DWATendianity{} attribute are given in
Table \refersec{tab:endianityencodings}.
\DWLANGGo{} \dag \ddag &0x0016 &0 \\
\DWLANGModulathree{} \dag \ddag &0x0017 &1 \\
\DWLANGHaskell{} \dag \ddag &0x0018 &0 \\
+\DWLANGCpluspluszerothree{} \ddag &0x0019 &0 \\
+\DWLANGCpluspluseleven{} \ddag &0x001a &0 \\
+\DWLANGOCaml{} \ddag &0x001b &0 \\
\DWLANGlouser{} &0x8000 & \\
\DWLANGhiuser{} &\xffff & \\
class encoding
\DWADDRnone{} is 0.
-
+\needlines{7}
\section{Identifier Case}
\label{datarep:identifiercase}
\setlength{\extrarowheight}{0.1cm}
\begin{longtable}{l|c}
\caption{Calling convention encodings} \label{tab:callingconventionencodings}\\
- \hline \bfseries Calling Convention name&\bfseries Value \\ \hline
+ \hline \bfseries Calling convention name&\bfseries Value \\ \hline
\endfirsthead
- \bfseries Calling Convention name&\bfseries Value\\ \hline
+ \bfseries Calling convention name&\bfseries Value\\ \hline
\endhead
\hline \emph{Continued on next page}
\endfoot
\setlength{\extrarowheight}{0.1cm}
\begin{longtable}{l|c}
\caption{Inline encodings} \label{tab:inlineencodings}\\
- \hline \bfseries Inline Code name&\bfseries Value \\ \hline
+ \hline \bfseries Inline code name&\bfseries Value \\ \hline
\endfirsthead
\bfseries Inline Code name&\bfseries Value\\ \hline
\endhead
\setlength{\extrarowheight}{0.1cm}
\begin{longtable}{l|c}
\caption{Discriminant descriptor encodings} \label{tab:discriminantdescriptorencodings}\\
- \hline \bfseries Descriptor Name&\bfseries Value \\ \hline
+ \hline \bfseries Descriptor name&\bfseries Value \\ \hline
\endfirsthead
- \bfseries Descriptor Name&\bfseries Value\\ \hline
+ \bfseries Descriptor name&\bfseries Value\\ \hline
\endhead
\hline \emph{Continued on next page}
\endfoot
\label{datarep:linenumberinformation}
The \addtoindexi{version number}{version number!line number information}
-in the line number program header is 4
+in the line number program header is \versiondotdebugline{}
(see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
The boolean values \doublequote{true} and \doublequote{false}
\DWLNSsetbasicblock&0x07 \\
\DWLNSconstaddpc&0x08 \\
\DWLNSfixedadvancepc&0x09 \\
-\DWLNSsetprologueend&0x0a \\
-\DWLNSsetepiloguebegin&0x0b \\
-\DWLNSsetisa&0x0c \\
+\DWLNSsetprologueend&0x0a \\*
+\DWLNSsetepiloguebegin&0x0b \\*
+\DWLNSsetisa&0x0c \\*
\end{longtable}
\end{centering}
\hline
\endlastfoot
-\DWLNEendsequence&0x01 \\
-\DWLNEsetaddress&0x02\\
-\DWLNEdefinefile&0x03\\
-\DWLNEsetdiscriminator{} &0x04 \\
-\DWLNElouser&0x80 \\
-\DWLNEhiuser&\xff \\
+\DWLNEendsequence &0x01 \\
+\DWLNEsetaddress &0x02 \\
+\DWLNEdefinefile &0x03 \\
+\DWLNEsetdiscriminator &0x04 \\
+\DWLNEdefinefileMDfive &0c05 \\
+\DWLNElouser &0x80 \\
+\DWLNEhiuser &\xff \\
+
+\end{longtable}
+\end{centering}
+
+\needspace{10cm}
+The encodings for the file entry format are given in
+\addtoindexx{line number opcodes!file entry format encoding}
+Table \refersec{tab:linenumberfileentryformatencodings}.
+
+\begin{centering}
+\setlength{\extrarowheight}{0.1cm}
+\begin{longtable}{l|c}
+ \caption{Line number file entry format \mbox{encodings}} \label{tab:linenumberfileentryformatencodings}\\
+ \hline \bfseries File entry format name&\bfseries Value \\ \hline
+\endfirsthead
+ \bfseries File entry format name&\bfseries Value\\ \hline
+\endhead
+ \hline \emph{Continued on next page}
+\endfoot
+ \hline
+\endlastfoot
+
+\DWLNFtimestampsize & 0x01 \\
+\DWLNFMDfive & 0x02 \\
\end{longtable}
\end{centering}
\setlength{\extrarowheight}{0.1cm}
\begin{longtable}{l|c}
\caption{Macinfo type encodings} \label{tab:macinfotypeencodings}\\
- \hline \bfseries Macinfo Type Name&\bfseries Value \\ \hline
+ \hline \bfseries Macinfo type name&\bfseries Value \\ \hline
\endfirsthead
- \bfseries Macinfo Type Name&\bfseries Value\\ \hline
+ \bfseries Macinfo type name&\bfseries Value\\ \hline
\endhead
\hline \emph{Continued on next page}
\endfoot
corresponding compilation unit must be defined
(see Section \refersec{chap:normalandpartialcompilationunitentries}).
+\section{String Offsets Table}
+\label{chap:stringoffsetstable}
+Each set of entries in the string offsets table contained in the
+\dotdebugstroffsets{} section begins with a header containing:
+\begin{enumerate}[1. ]
+\item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
+A 4-byte or 12-byte length containing the length of
+the set of entries for this compilation unit, not
+including the length field itself. In the 32-bit
+DWARF format, this is a 4-byte unsigned integer
+(which must be less than \xfffffffzero); in the 64-bit
+DWARF format, this consists of the 4-byte value
+\wffffffff followed by an 8-byte unsigned integer
+that gives the actual length (see
+Section \refersec{datarep:32bitand64bitdwarfformats}).
+
+\item \texttt{version} (\addtoindex{uhalf}) \\
+A 2-byte version identifier containing the value
+\versiondotdebugstroffsets{}
+(see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
+\item \texttt{padding} (\addtoindex{uhalf}) \\
+\end{enumerate}
+
+This header is followed by a series of string table offsets.
+For the 32-bit DWARF format, each offset is 4 bytes long; for
+the 64-bit DWARF format, each offset is 8 bytes long.
+
+The \DWATstroffsetsbase{} attribute points to the first
+entry following the header. The entries are indexed
+sequentially from this base entry, starting from 0.
+
+\section{Address Table}
+\label{chap:addresstable}
+Each set of entries in the address table contained in the
+\dotdebugaddr{} section begins with a header containing:
+\begin{enumerate}[1. ]
+\item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
+A 4-byte or 12-byte length containing the length of
+the set of entries for this compilation unit, not
+including the length field itself. In the 32-bit
+DWARF format, this is a 4-byte unsigned integer
+(which must be less than \xfffffffzero); in the 64-bit
+DWARF format, this consists of the 4-byte value
+\wffffffff followed by an 8-byte unsigned integer
+that gives the actual length (see
+Section \refersec{datarep:32bitand64bitdwarfformats}).
+
+\needlines{4}
+\item \texttt{version} (\addtoindex{uhalf}) \\
+A 2-byte version identifier containing the value
+\versiondotdebugaddr{}
+(see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
+
+\needlines{4}
+\item \texttt{address\_size} (\addtoindex{ubyte}) \\
+A 1-byte unsigned integer containing the size in
+bytes of an address (or the offset portion of an
+address for segmented addressing) on the target
+system.
+
+\needlines{4}
+\item \texttt{segment\_size} (\addtoindex{ubyte}) \\
+A 1-byte unsigned integer containing the size in
+bytes of a segment selector on the target system.
+\end{enumerate}
+
+This header is followed by a series of segment/address pairs.
+The segment size is given by the \texttt{segment\_size} field of the
+header, and the address size is given by the \texttt{address\_size}
+field of the header. If the \texttt{segment\_size} field in the header
+is zero, the entries consist only of an addresses.
+
+The \DWATaddrbase{} attribute points to the first entry
+following the header. The entries are indexed sequentially
+from this base entry, starting from 0.
+
+\section{Range List Table}
+\label{app:rangelisttable}
+Each set of entries in the range list table contained in the
+\dotdebugranges{} section begins with a header containing:
+\begin{enumerate}[1. ]
+\item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
+A 4-byte or 12-byte length containing the length of
+the set of entries for this compilation unit, not
+including the length field itself. In the 32-bit
+DWARF format, this is a 4-byte unsigned integer
+(which must be less than \xfffffffzero); in the 64-bit
+DWARF format, this consists of the 4-byte value
+\wffffffff followed by an 8-byte unsigned integer
+that gives the actual length (see
+Section \refersec{datarep:32bitand64bitdwarfformats}).
+
+\needlines{4}
+\item \texttt{version} (\addtoindex{uhalf}) \\
+A 2-byte version identifier containing the value
+\versiondotdebugranges{}
+(see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
+
+\needlines{4}
+\item \texttt{address\_size} (\addtoindex{ubyte}) \\
+A 1-byte unsigned integer containing the size in
+bytes of an address (or the offset portion of an
+address for segmented addressing) on the target
+system.
+
+\needlines{4}
+\item \texttt{segment\_size} (\addtoindex{ubyte}) \\
+A 1-byte unsigned integer containing the size in
+bytes of a segment selector on the target system.
+\end{enumerate}
+
+This header is followed by a series of range list entries as
+described in Section \refersec{chap:locationlists}.
+The segment size is given by the
+\texttt{segment\_size} field of the header, and the address size is
+given by the \texttt{address\_size} field of the header. If the
+\texttt{segment\_size} field in the header is zero, the segment
+selector is omitted from the range list entries.
+
+The \DWATrangesbase{} attribute points to the first entry
+following the header. The entries are referenced by a byte
+offset relative to this base address.
+
+
+\section{Location List Table}
+\label{datarep:locationlisttable}
+Each set of entries in the location list table contained in the
+\dotdebugloc{} or \dotdebuglocdwo{}sections begins with a header containing:
+\begin{enumerate}[1. ]
+\item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
+A 4-byte or 12-byte length containing the length of
+the set of entries for this compilation unit, not
+including the length field itself. In the 32-bit
+DWARF format, this is a 4-byte unsigned integer
+(which must be less than \xfffffffzero); in the 64-bit
+DWARF format, this consists of the 4-byte value
+\wffffffff followed by an 8-byte unsigned integer
+that gives the actual length (see
+Section \refersec{datarep:32bitand64bitdwarfformats}).
+
+\needlines{4}
+\item \texttt{version} (\addtoindex{uhalf}) \\
+A 2-byte version identifier containing the value
+\versiondotdebugloc{}
+(see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
+
+\needlines{4}
+\item \texttt{address\_size} (\addtoindex{ubyte}) \\
+A 1-byte unsigned integer containing the size in
+bytes of an address (or the offset portion of an
+address for segmented addressing) on the target
+system.
+
+\needlines{4}
+\item \texttt{segment\_size} (\addtoindex{ubyte}) \\
+A 1-byte unsigned integer containing the size in
+bytes of a segment selector on the target system.
+\end{enumerate}
+
+This header is followed by a series of location list entries as
+described in Section \refersec{chap:locationlists}.
+The segment size is given by the
+\texttt{segment\_size} field of the header, and the address size is
+given by the \texttt{address\_size} field of the header. If the
+\texttt{segment\_size} field in the header is zero, the segment
+selector is omitted from the range list entries.
+
+The entries are referenced by a byte offset relative to the first
+location list following this header.
+
\section{Dependencies and Constraints}
\label{datarep:dependenciesandconstraints}
The debugging information in this format is intended to
exist
\addtoindexx{DWARF section names!list of}
-in
-the \dotdebugabbrev{},
+in the
+\dotdebugabbrev{},
+\dotdebugaddr{},
\dotdebugaranges{},
\dotdebugframe{},
\dotdebuginfo{},
\dotdebugpubnames{},
\dotdebugpubtypes{},
\dotdebugranges{},
-\dotdebugstr{}
+\dotdebugstr{},
+\dotdebugstroffsets{}
and
\dotdebugtypes{}
sections of an object file, or equivalent
are given in
Table \ref{tab:integerrepresentationnames}.
+\needlines{8}
\begin{centering}
\setlength{\extrarowheight}{0.1cm}
\begin{longtable}{c|l}
expression when possible.)
Once the string S has been formed from the DWARF encoding,
-an \addtoindex{MD5 hash} is computed for the string and the lower 64 bits
-are taken as the type signature.
+an \addtoindex{MD5 hash} is computed for the string and the
+least significant 64 bits are taken as the type signature.
\textit{The string S is intended to be a flattened representation of
the type that uniquely identifies that type (i.e., a different
or more of the others. These relationships are illustrated by
the diagram and associated notes on the following pages.
+\textit{This diagram does not distinguish between the normal
+and split object section pairs (for example, \dotdebuginfo{}
+versus \dotdebuginfodwo).}
+
\begin{figure}[H]
\begin{tikzpicture}
[sect/.style={rectangle, rounded corners=10pt, draw, fill=blue!10, inner sep=.2cm, minimum width=4.5cm},
% The left column, first sections, then links, from top to bottom
%
-\node(zsectara) at ( 0, 10.) [sect] {\dotdebugaranges};
-\node(zlinka) at ( 0, 8.0) [link] {To compilation unit (a)};
-\node(zsectinf) at ( 0, 5.0) [sect] {\begin{tabular}{c} \dotdebuginfo \\ \dotdebugtypes \end{tabular}};
+\node(zsectara) at ( 0, 16.) [sect] {\dotdebugaranges};
+\node(zlinka) at ( 0, 14.) [link] {To compilation unit (a)};
+\node(zsectinf) at ( 0, 8.0) [sect] {\begin{tabular}{c}
+ \dotdebuginfo \\
+ \dotdebugtypes
+ \end{tabular}};
\node(zlinkb) at ( 0, 2.0) [link] {To compilation unit (b)};
-\node(zsectpub) at ( 0, 0.0) [sect] {\begin{tabular}{c} \dotdebugpubnames \\ \dotdebugpubtypes \end{tabular}};
+\node(zsectpub) at ( 0, 0.0) [sect] {\begin{tabular}{c}
+ \dotdebugpubnames \\
+ \dotdebugpubtypes
+ \end{tabular}};
\draw[thick,-to reversed] (zlinka) -- (zsectara);
\draw[thick,angle 90-] (zsectinf) -- (zlinka);
% The middle column, similarly
%
-\node(zsectfra) at (6, 10.) [sect] {\dotdebugframe};
-\node(zlinkc) at (6, 8.) [link] {To abbreviations (c)};
-\node(zlinkd) at (6, 7.) [link] {\DWFORMstrp{} (d)};
-\node(zlinke) at (6, 6.) [link] {\DWOPcallref{} (e)};
-\node(zlinkf) at (6, 5.) [link] {\DWATlocation{}, etc. (f)};
-\node(zlinkg) at (6, 4.) [link] {\DWATranges{} (g)};
-\node(zlinkh) at (6, 3.) [link] {\DWATmacroinfo{} (h)};
-\node(zlinki) at (6, 2.) [link] {\DWATstmtlist{} (i)};
+\node(zsectfra) at (6, 16.) [sect] {\dotdebugframe};
+\node(zlinkc) at (6, 14.5) [link] {To abbreviations (c)};
+\node(zlinkd) at (6, 13.25) [link] {\DWFORMstrp{} (d)};
+\node(zlinke) at (6, 11.5) [link] {\begin{tabular}{c}
+ \DWATstroffsetsbase, \\
+ \DWFORMstrx{} (e)
+ \end{tabular}};
+\node(zlinkf) at (6, 9.5) [link] {\begin{tabular}{c}
+ \DWOPcallref{} (f) \\
+ \DWFORMrefaddr
+ \end{tabular}};
+\node(zlinkg) at (6, 8.) [link] {\DWATlocation{}, etc. (g)};
+\node(zlinkh) at (6, 6.5) [link] {\DWATranges{} (h)};
+\node(zlinki) at (6, 5.0) [link] {\DWATmacroinfo{} (i)};
+\node(zlinkj) at (6, 3.5) [link] {\DWATstmtlist{} (j)};
+\node(zlinkk) at (6, 1.) [link] {\begin{tabular}(c)
+ \DWATaddrbase, \\
+ \DWFORMaddrx, (k) \\
+ \DWOPaddrx, \\
+ \DWOPconstx
+ \end{tabular}};
% Links between left and center
%
\draw[thick,to reversed-] (zsectinf) -- (zlinkc.west);
\draw[thick,to reversed-] (zsectinf) -- (zlinkd.west);
-\draw[thick,angle 90-] (zsectinf) -- (zlinke.west);
-\draw[thick,to reversed-] (zsectinf) -- (zlinkf.west);
+\draw[thick,to reversed-] (zsectinf) -- (zlinke.west);
+\draw[<->,thick] (zsectinf) -- (zlinkf.west);
\draw[thick,to reversed-] (zsectinf) -- (zlinkg.west);
\draw[thick,to reversed-] (zsectinf) -- (zlinkh.west);
\draw[thick,to reversed-] (zsectinf) -- (zlinki.west);
+\draw[thick,to reversed-] (zsectinf) -- (zlinkj.west);
+\draw[thick,to reversed-] (zsectinf) -- (zlinkk.north west);
% The right column
%
-\node(zsectabb) at (12, 10) [sect] {\dotdebugabbrev};
-\node(zsectstr) at (12, 8) [sect] {\dotdebugstr};
-\node(zsectloc) at (12, 6) [sect] {\dotdebugloc};
-\node(zsectran) at (12, 4) [sect] {\dotdebugranges};
-\node(zsectmac) at (12, 2) [sect] {\dotdebugmacinfo};
-\node(zsectlin) at (12, 0) [sect] {\dotdebugline};
+\node(zsectabb) at (12, 16) [sect] {\dotdebugabbrev};
+\node(zsectstr) at (12, 14) [sect] {\dotdebugstr};
+\node(zlinkl) at (12, 12) [link] {To strings (k)};
+\node(zsectstx) at (12, 10) [sect] {\dotdebugstroffsets};
+\node(zsectloc) at (12, 8) [sect] {\dotdebugloc};
+\node(zsectran) at (12, 6) [sect] {\dotdebugranges};
+\node(zsectmac) at (12, 4) [sect] {\dotdebugmacinfo};
+\node(zsectlin) at (12, 2) [sect] {\dotdebugline};
+\node(zsectadx) at (12, 0) [sect] {\dotdebugaddr};
+
+\draw[thick,to reversed-] (zsectstx) -- (zlinkl);
+\draw[thick,-angle 90] (zlinkl) -- (zsectstr);
% Links between center and right
%
\draw[thick,-angle 90] (zlinkc.east) -- (zsectabb.west);
\draw[thick,-angle 90] (zlinkd.east) -- (zsectstr.west);
-\draw[thick,-to reversed] (zlinke.east) -- (zsectloc.west);
-\draw[thick,-angle 90] (zlinkf.east) -- (zsectloc.south west);
-\draw[thick,-angle 90] (zlinkg.east) -- (zsectran.west);
-\draw[thick,-angle 90] (zlinkh.east) -- (zsectmac.west);
-\draw[thick,-angle 90] (zlinki.east) -- (zsectlin.west);
+\draw[thick,-angle 90] (zlinke.east) -- (zsectstx.west);
+\draw[thick,-angle 90] (zlinkg.east) -- (zsectloc.west);
+\draw[thick,-angle 90] (zlinkh.east) -- (zsectran.west);
+\draw[thick,-angle 90] (zlinki.east) -- (zsectmac.west);
+\draw[thick,-angle 90] (zlinkj.east) -- (zsectlin.west);
+\draw[thick,-angle 90] (zlinkk.east) -- (zsectadx.west);
\end{tikzpicture}
\vspace{5mm}
\textbf{Notes}
\end{center}
\begin{enumerate}[(a)]
-\item \dotdebugaranges{} \\
-The debug\_info\_offset value in
+\item \dotdebugaranges{} to \dotdebuginfo \\
+The \texttt{debug\_info\_offset} value in
the header is
the offset in the \dotdebuginfo{} section of the
corresponding compilation unit header (not the compilation
unit entry).
%b
-\item \dotdebugpubnames{} and \dotdebugpubtypes{} \\
-The debug\_info\_offset value in the header is the offset in the
+\item \dotdebugpubnames{} and \dotdebugpubtypes{} to \dotdebuginfo \\
+The \texttt{debug\_info\_offset} value in the header is the offset in the
\dotdebuginfo{} section of the
corresponding compilation unit header (not
-the compilation unit entry). Each pubname/pubtype has the offset (within
+the compilation unit entry). Each pubname/pubtype unit has the offset (within
the corresponding compilation unit) of the applicable debugging
information entry.
%c
-\item \dotdebuginfo{} and \dotdebugtypes{} \\
-The debug\_abbrev\_offset value in the header is the offset in the
+\item \dotdebuginfo{} and \dotdebugtypes{} to \dotdebugabbrev \\
+The \texttt{debug\_abbrev\_offset} value in the header is the offset in the
\dotdebugabbrev{}
section of the abbreviations for that compilation unit.
%d
-\item \dotdebuginfo{} and \dotdebugtypes{} \\
+\item \dotdebuginfo{} and \dotdebugtypes{} to \dotdebugstr \\
Attribute values of class string may have form
\DWFORMstrp, whose
value is the offset in the \dotdebugstr{}
section of the corresponding string.
%e
-\item \dotdebugloc{} \\
+\item \dotdebugstroffsets{} to \dotdebugstroffsets \\
+The value of the \DWATstroffsetsbase{} attribute in a
+compilation, partial or type unit DIE is the offset in the
+\dotdebugstroffsets{} section of the
+\addtoindex{string offsets table}
+for that unit.
+In addition, attribute values of class string may have form
+\DWFORMstrx, whose value is an index into the
+string offsets table.
+
+%f
+\item \dotdebuginfo{} to \dotdebuginfo \\
The operand of the \DWOPcallref{}
DWARF expression operator is the
offset of a debugging information entry in the
-\dotdebuginfo{} section.
+\dotdebuginfo{} section of another compilation.
+Similarly for attribute operands that have use
+\DWFORMrefaddr.
-%f
-\item \dotdebuginfo{} \\
+%g
+\item \dotdebuginfo{} to \dotdebugloc \\
An attribute value of class \livelink{chap:classloclistptr}{loclistptr}
(specifically form
\DWFORMsecoffset)
section of a
\addtoindex{location list}.
-%g
-\item \dotdebuginfo{} \\
+%h
+\item \dotdebuginfo{} to \dotdebugranges \\
An attribute value of class \livelink{chap:classrangelistptr}{rangelistptr}
(specifically form
\DWFORMsecoffset)
is an offset within the \dotdebugranges{} section of
a range list.
-%h
-\item \dotdebuginfo{} \\
+%i
+\needlines{5}
+\item \dotdebuginfo{} to \dotdebugmacinfo \\
An attribute value of class
\livelink{chap:classmacptr}{macptr} (specifically form
\DWFORMsecoffset) is an
\dotdebugmacinfo{} section
of the beginning of the macro information for the referencing unit.
-%i
-\item \dotdebuginfo{} \\
+%j
+\item \dotdebuginfo{} to \dotdebugline \\
An attribute value of class
\livelink{chap:classlineptr}{lineptr} (specifically form
\DWFORMsecoffset)
is an offset in the
\dotdebugline{} section of the
beginning of the line number information for the referencing unit.
+
+%k
+\item \dotdebuginfo{} to \dotdebugaddr \\
+The value of the \DWATaddrbase{} attribute in the
+\DWTAGcompileunit{} or \DWTAGpartialunit{} DIE is the
+offset in the \dotdebugaddr{} section of the machine
+addresses for that compilation unit or type unit.
+\DWFORMaddrx, \DWOPaddrx, and \DWOPconstx{} contain
+indices relative to the beginning of that section.
+
+%l
+\item \dotdebugstroffsets{} to \dotdebugstr \\
+Entries in the string offsets table
+are offsets to the corresponding string in the
+\dotdebugstr{} section.
+
\end{enumerate}
% If draft is in the document class list, pix are just suggested
% by an outline, the pic does not appear as a picture.
%
-\newcommand{\docdate}{October 11, 2013}
+\newcommand{\docdate}{October 27, 2013}
%
\usepackage{ifthen}
\newboolean{isdraft}
\listoftables
\ifthenelse{\boolean{isdraft}}
- { {% Environment to keep the following header change local
- \cleardoublepage
+ { %\emptypage
+ {% Environment to keep the following header change local
+ \clearpage
\makeevenhead{plain}{}{Change Summary}{}
\makeoddhead{plain}{}{Change Summary}{}
\include{changesummary}
- \cleardoublepage}
+ }
}{}
\flushleft
\setcounter{secnumdepth}{5}
\include{introduction}
-\include{generaldescription} %\emptypage
+\include{generaldescription} \emptypage
\include{programscope} \emptypage
\include{dataobject} \emptypage
-\include{typeentries} \emptypage
+\include{typeentries} %\emptypage
\include{otherdebugginginformation} \emptypage
\include{datarepresentation} \emptypage
\appendix
\include{attributesbytag} \emptypage
-\include{debugsectionrelationships} \emptypage
+\include{debugsectionrelationships} %\emptypage
\include{encodingdecoding} \emptypage
\include{examples} %\emptypage
\include{compression} %\emptypage
+\include{splitobjects} %\emptypage
\include{sectionversionnumbers}
\include{gnulicense}
%
\newdwfnamecommands{DWATabstractorigin}{DW\_AT\_abstract\_origin}
\newdwfnamecommands{DWATaccessibility}{DW\_AT\_accessibility}
+\newdwfnamecommands{DWATaddrbase}{DW\_AT\_addr\_base}
\newdwfnamecommands{DWATaddressclass}{DW\_AT\_address\_class}
\newdwfnamecommands{DWATallocated}{DW\_AT\_allocated}
\newdwfnamecommands{DWATartificial}{DW\_AT\_artificial}
\newdwfnamecommands{DWATdiscr}{DW\_AT\_discr}
\newdwfnamecommands{DWATdiscrlist}{DW\_AT\_discr\_list}
\newdwfnamecommands{DWATdiscrvalue}{DW\_AT\_discr\_value}
+\newdwfnamecommands{DWATdwoid}{DW\_AT\_dwo\_id}
+\newdwfnamecommands{DWATdwoname}{DW\_AT\_dwo\_name}
%
\newdwfnamecommands{DWATelemental}{DW\_AT\_elemental}
\newdwfnamecommands{DWATencoding}{DW\_AT\_encoding}
\newdwfnamecommands{DWATpure}{DW\_AT\_pure}
%
\newdwfnamecommands{DWATranges}{DW\_AT\_ranges}
+\newdwfnamecommands{DWATrangesbase}{DW\_AT\_ranges\_base}
\newdwfnamecommands{DWATrank}{DW\_AT\_rank}
\newdwfnamecommands{DWATrecursive}{DW\_AT\_recursive}
\newdwfnamecommands{DWATreturnaddr}{DW\_AT\_return\_addr}
\newdwfnamecommands{DWATstringlength}{DW\_AT\_string\_length}
\newdwfnamecommands{DWATstringlengthbitsize}{DW\_AT\_string\_length\_bit\_size}
\newdwfnamecommands{DWATstringlengthbytesize}{DW\_AT\_string\_length\_byte\_size}
+\newdwfnamecommands{DWATstroffsetsbase}{DW\_AT\_str\_offsets\_base}
%
\newdwfnamecommands{DWATthreadsscaled}{DW\_AT\_threads\_scaled}
\newdwfnamecommands{DWATtrampoline}{DW\_AT\_trampoline}
\newdwfnamecommands{DWCFAsetloc}{DW\_CFA\_set\_loc}
\newdwfnamecommands{DWCFAundefined}{DW\_CFA\_undefined}
\newdwfnamecommands{DWCFAvalexpression}{DW\_CFA\_val\_expression}
-\newdwfnamecommands{DWCFAvaloffset}{DW\_CFA\_val\_val\_offset}
+\newdwfnamecommands{DWCFAvaloffset}{DW\_CFA\_val\_offset}
\newdwfnamecommands{DWCFAvaloffsetsf}{DW\_CFA\_val\_offset\_sf}
%
% DW_CHILDREN
% DW_FORM
%
\newdwfnamecommands{DWFORMaddr}{DW\_FORM\_addr}
+\newdwfnamecommands{DWFORMaddrx}{DW\_FORM\_addrx}
\newdwfnamecommands{DWFORMblock}{DW\_FORM\_block}
\newdwfnamecommands{DWFORMblockone}{DW\_FORM\_block1}
\newdwfnamecommands{DWFORMblocktwo}{DW\_FORM\_block2}
\newdwfnamecommands{DWFORMflag}{DW\_FORM\_flag}
\newdwfnamecommands{DWFORMflagpresent}{DW\_FORM\_flag\_present}
\newdwfnamecommands{DWFORMindirect}{DW\_FORM\_indirect}
-\newdwfnamecommands{DWFORMrefn}{DW\_FORM\_ref\textit{n}} % Generic name
+\newdwfnamecommands{DWFORMrefn}{DW\_FORM\_ref<n>} % Generic DW_FORM_ref[1248] name
\newdwfnamecommands{DWFORMrefone}{DW\_FORM\_ref1}
\newdwfnamecommands{DWFORMreftwo}{DW\_FORM\_ref2}
\newdwfnamecommands{DWFORMreffour}{DW\_FORM\_ref4}
\newdwfnamecommands{DWFORMsecoffset}{DW\_FORM\_sec\_offset}
\newdwfnamecommands{DWFORMstring}{DW\_FORM\_string}
\newdwfnamecommands{DWFORMstrp}{DW\_FORM\_strp}
+\newdwfnamecommands{DWFORMstrx}{DW\_FORM\_strx}
\newdwfnamecommands{DWFORMudata}{DW\_FORM\_udata}
%
% DW_ID
\newdwfnamecommands{DWLANGModulathree}{DW\_LANG\_Modula3}
\newdwfnamecommands{DWLANGObjC}{DW\_LANG\_ObjC}
\newdwfnamecommands{DWLANGObjCplusplus}{DW\_LANG\_ObjC\_plus\_plus}
+\newdwfnamecommands{DWLANGOCaml}{DW\_LANG\_OCaml}
\newdwfnamecommands{DWLANGOpenCL}{DW\_LANG\_OpenCL}
\newdwfnamecommands{DWLANGPascaleightythree}{DW\_LANG\_Pascal83}
\newdwfnamecommands{DWLANGPLI}{DW\_LANG\_PLI}
\newdwfnamecommands{DWLANGPython}{DW\_LANG\_Python}
\newdwfnamecommands{DWLANGUPC}{DW\_LANG\_UPC}
+\newdwfnamecommands{DWLANGCpluspluszerothree}{DW\_LANG\_C\_plus\_plus\_03}
+\newdwfnamecommands{DWLANGCpluspluseleven}{DW\_LANG\_C\_plus\_plus\_11}
+%
+% DW_LLE
+%
+\newdwfnamecommands{DWLLEbaseaddressselectionentry}{DW\_LLE\_base\_address\_selection\_entry}
+\newdwfnamecommands{DWLLEendoflistentry}{DW\_LLE\_end\_of\_list\_entry}
+\newdwfnamecommands{DWLLEstartendentry}{DW\_LLE\_start\_end\_entry}
+\newdwfnamecommands{DWLLEstartlengthentry}{DW\_LLE\_start\_length\_entry}
+\newdwfnamecommands{DWLLEoffsetpairentry}{DW\_LLE\_offset\_pair\_entry}
%
% DW_LNE
%
\newdwfnamecommands{DWLNEdefinefile}{DW\_LNE\_define\_file}
+\newdwfnamecommands{DWLNEdefinefileMDfive}{DW\_LNE\_define\_file\_MD5}
\newdwfnamecommands{DWLNEendsequence}{DW\_LNE\_end\_sequence}
\newdwfnamecommands{DWLNEhiuser}{DW\_LNE\_hi\_user}
\newdwfnamecommands{DWLNElouser}{DW\_LNE\_lo\_user}
\newdwfnamecommands{DWLNEsetaddress}{DW\_LNE\_set\_address}
\newdwfnamecommands{DWLNEsetdiscriminator}{DW\_LNE\_set\_discriminator}
%
+% DW_LNF
+%
+\newdwfnamecommands{DWLNFMDfive}{DW\_LNF\_MD5}
+\newdwfnamecommands{DWLNFtimestampsize}{DW\_LNF\_timestamp\_size}
+%
% DW_LNS
%
\newdwfnamecommands{DWLNSadvanceline}{DW\_LNS\_advance\_line}
%
\newdwfnamecommands{DWOPabs}{DW\_OP\_abs}
\newdwfnamecommands{DWOPaddr}{DW\_OP\_addr}
+\newdwfnamecommands{DWOPaddrx}{DW\_OP\_addrx}
\newdwfnamecommands{DWOPand}{DW\_OP\_and}
\newdwfnamecommands{DWOPbitpiece}{DW\_OP\_bit\_piece}
\newdwfnamecommands{DWOPbra}{DW\_OP\_bra}
-\newdwfnamecommands{DWOPbregn}{DW\_OP\_breg\textit{n}} % Generic name
+\newdwfnamecommands{DWOPbregn}{DW\_OP\_breg<n>} % Generic DW_OP_breg[0..31] name
\newdwfnamecommands{DWOPbregzero}{DW\_OP\_breg0}
\newdwfnamecommands{DWOPbregone}{DW\_OP\_breg1}
\newdwfnamecommands{DWOPbregthirtyone}{DW\_OP\_breg31}
\newcommand{\DWOPbregtwo}{\hyperlink{chap:DWOPbregn}{DW\_OP\_breg2}} % Link, don't index...
\newcommand{\DWOPbregthree}{\hyperlink{chap:DWOPbregn}{DW\_OP\_breg3}} %
\newcommand{\DWOPbregfour}{\hyperlink{chap:DWOPbregn}{DW\_OP\_breg4}} %
+ \newcommand{\DWOPbregfive}{\hyperlink{chap:DWOPbregn}{DW\_OP\_breg5}} %
\newcommand{\DWOPbregeleven}{\hyperlink{chap:DWOPbregn}{DW\_OP\_breg11}} %
\newdwfnamecommands{DWOPbregx}{DW\_OP\_bregx}
\newdwfnamecommands{DWOPcalltwo}{DW\_OP\_call2}
\newdwfnamecommands{DWOPcallfour}{DW\_OP\_call4}
\newdwfnamecommands{DWOPcallframecfa}{DW\_OP\_call\_frame\_cfa}
\newdwfnamecommands{DWOPcallref}{DW\_OP\_call\_ref}
-\newdwfnamecommands{DWOPconstnx}{DW\_OP\_const\textit{nx}} %generic const%% operator name
-\newdwfnamecommands{DWOPconstns}{DW\_OP\_const\textit{n}s} %generic const%s operator name
-\newdwfnamecommands{DWOPconstnu}{DW\_OP\_const\textit{n}u} %generic const%u operator name
+\newdwfnamecommands{DWOPconstnx}{DW\_OP\_const<n><x>} % Generic const[1248[su] operator name
+\newdwfnamecommands{DWOPconstns}{DW\_OP\_const<n>s} % Generic const[1248]s operator name
+\newdwfnamecommands{DWOPconstnu}{DW\_OP\_const<n>u} % Generic const[1248]u operator name
\newdwfnamecommands{DWOPconstones}{DW\_OP\_const1s}
\newdwfnamecommands{DWOPconstoneu}{DW\_OP\_const1u}
\newdwfnamecommands{DWOPconsttwos}{DW\_OP\_const2s}
\newdwfnamecommands{DWOPconsteightu}{DW\_OP\_const8u}
\newdwfnamecommands{DWOPconsts}{DW\_OP\_consts}
\newdwfnamecommands{DWOPconstu}{DW\_OP\_constu}
+\newdwfnamecommands{DWOPconstx}{DW\_OP\_constx}
\newdwfnamecommands{DWOPderef}{DW\_OP\_deref}
\newdwfnamecommands{DWOPderefsize}{DW\_OP\_deref\_size}
\newdwfnamecommands{DWOPdiv}{DW\_OP\_div}
\newdwfnamecommands{DWOPge}{DW\_OP\_ge}
\newdwfnamecommands{DWOPgt}{DW\_OP\_gt}
\newdwfnamecommands{DWOPhiuser}{DW\_OP\_hi\_user}
+\newdwfnamecommands{DWOPimplicitpointer}{DW\_OP\_implicit\_pointer}
\newdwfnamecommands{DWOPimplicitvalue}{DW\_OP\_implicit\_value}
\newdwfnamecommands{DWOPle}{DW\_OP\_le}
-\newdwfnamecommands{DWOPlitn}{DW\_OP\_lit\textit{n}} % generic lit operator name
+\newdwfnamecommands{DWOPlitn}{DW\_OP\_lit<n>} % generic DW_OP_lit[0..31] name
\newdwfnamecommands{DWOPlitzero}{DW\_OP\_lit0}
\newdwfnamecommands{DWOPlitone}{DW\_OP\_lit1}
\newcommand{\DWOPlittwo}{\hyperlink{chap:DWOPlitn}{DW\_OP\_lit2}} % Link, don't index...
+ \newcommand{\DWOPlitthree}{\hyperlink{chap:DWOPlitn}{DW\_OP\_lit3}} % Link, don't index...
\newdwfnamecommands{DWOPlitthirtyone}{DW\_OP\_lit31}
\newdwfnamecommands{DWOPlouser}{DW\_OP\_lo\_user}
\newdwfnamecommands{DWOPlt}{DW\_OP\_lt}
\newdwfnamecommands{DWOPplus}{DW\_OP\_plus}
\newdwfnamecommands{DWOPplusuconst}{DW\_OP\_plus\_uconst}
\newdwfnamecommands{DWOPpushobjectaddress}{DW\_OP\_push\_object\_address}
-\newdwfnamecommands{DWOPregn}{DW\_OP\_reg\textit{n}} % Generic register name
+\newdwfnamecommands{DWOPregn}{DW\_OP\_reg<n>} % Generic DW_OP_reg[0..31] name
\newdwfnamecommands{DWOPregzero}{DW\_OP\_reg0}
\newdwfnamecommands{DWOPregone}{DW\_OP\_reg1}
\newcommand{\DWOPregtwo}{\hyperlink{chap:DWOPregn}{DW\_OP\_reg2}} % Link, don't index
\newcommand{\DWOPregthree}{\hyperlink{chap:DWOPregn}{DW\_OP\_reg3}}
+ \newcommand{\DWOPregfive}{\hyperlink{chap:DWOPregn}{DW\_OP\_reg5}}
\newcommand{\DWOPregten}{\hyperlink{chap:DWOPregn}{DW\_OP\_reg10}}
\newdwfnamecommands{DWOPregthirtyone}{DW\_OP\_reg31}
\newdwfnamecommands{DWOPregx}{DW\_OP\_regx}
\newdwfnamecommands{DWTAGcondition}{DW\_TAG\_condition}
\newdwfnamecommands{DWTAGconsttype}{DW\_TAG\_const\_type}
\newdwfnamecommands{DWTAGconstant}{DW\_TAG\_constant}
+\newdwfnamecommands{DWTAGdescriptortype}{DW\_TAG\_descriptor\_type}
\newdwfnamecommands{DWTAGdwarfprocedure}{DW\_TAG\_dwarf\_procedure}
\newdwfnamecommands{DWTAGentrypoint}{DW\_TAG\_entry\_point}
\newdwfnamecommands{DWTAGenumerationtype}{DW\_TAG\_enumeration\_type}
%
%%%%%%%%%%%%%%%
%
-% .debug, et al
+% .debug_*, .debug_*.dwo, et al
%
\newcommand{\dotdebugabbrev}{\addtoindex{\texttt{.debug\_abbrev}}}
+\newcommand{\dotdebugaddr}{\addtoindex{\texttt{.debug\_addr}}}
\newcommand{\dotdebugaranges}{\addtoindex{\texttt{.debug\_aranges}}}
\newcommand{\dotdebugframe}{\addtoindex{\texttt{.debug\_frame}}}
\newcommand{\dotdebuginfo}{\addtoindex{\texttt{.debug\_info}}}
\newcommand{\dotdebugline}{\addtoindex{\texttt{.debug\_line}}}
\newcommand{\dotdebugloc}{\addtoindex{\texttt{.debug\_loc}}}
\newcommand{\dotdebugmacinfo}{\addtoindex{\texttt{.debug\_mac\_info}}}
+\newcommand{\dotdebugmacro}{\addtoindex{\texttt{.debug\_macro}}}
\newcommand{\dotdebugpubnames}{\addtoindex{\texttt{.debug\_pubnames}}}
\newcommand{\dotdebugpubtypes}{\addtoindex{\texttt{.debug\_pubtypes}}}
\newcommand{\dotdebugranges}{\addtoindex{\texttt{.debug\_ranges}}}
\newcommand{\dotdebugstr}{\addtoindex{\texttt{.debug\_str}}}
+\newcommand{\dotdebugstroffsets}{\addtoindex{\texttt{.debug\_str\_offsets}}}
\newcommand{\dotdebugtypes}{\addtoindex{\texttt{.debug\_types}}}
%
+\newcommand{\dotdebugabbrevdwo}{\addtoindex{\texttt{.debug\_abbrev.dwo}}}
+\newcommand{\dotdebugaddrdwo}{\addtoindex{\texttt{.debug\_addr.dwo}}}
+\newcommand{\dotdebugarangesdwo}{\addtoindex{\texttt{.debug\_aranges.dwo}}}
+\newcommand{\dotdebugframedwo}{\addtoindex{\texttt{.debug\_frame.dwo}}}
+\newcommand{\dotdebuginfodwo}{\addtoindex{\texttt{.debug\_info.dwo}}}
+\newcommand{\dotdebuglinedwo}{\addtoindex{\texttt{.debug\_line.dwo}}}
+\newcommand{\dotdebuglocdwo}{\addtoindex{\texttt{.debug\_loc.dwo}}}
+\newcommand{\dotdebugmacinfodwo}{\addtoindex{\texttt{.debug\_mac\_info.dwo}}}
+\newcommand{\dotdebugmacrodwo}{\addtoindex{\texttt{.debug\_macro.dwo}}}
+\newcommand{\dotdebugpubnamesdwo}{\addtoindex{\texttt{.debug\_pubnames.dwo}}}
+\newcommand{\dotdebugpubtypesdwo}{\addtoindex{\texttt{.debug\_pubtypes.dwo}}}
+\newcommand{\dotdebugrangesdwo}{\addtoindex{\texttt{.debug\_ranges.dwo}}}
+\newcommand{\dotdebugstrdwo}{\addtoindex{\texttt{.debug\_str.dwo}}}
+\newcommand{\dotdebugstroffsetsdwo}{\addtoindex{\texttt{.debug\_str\_offsets.dwo}}}
+\newcommand{\dotdebugtypesdwo}{\addtoindex{\texttt{.debug\_types.dwo}}}
+%
\newcommand{\dotdata}{\addtoindex{\texttt{.data}}}
\newcommand{\dottext}{\addtoindex{\texttt{.text}}}
%
% Current section version numbers
%
\newcommand{\versiondotdebugabbrev} {5}
+\newcommand{\versiondotdebugaddr} {5}
\newcommand{\versiondotdebugaranges} {2}
\newcommand{\versiondotdebugframe} {4}
\newcommand{\versiondotdebuginfo} {5}
-\newcommand{\versiondotdebugline} {4}
+\newcommand{\versiondotdebugline} {5}
\newcommand{\versiondotdebugloc} {5}
\newcommand{\versiondotdebugmacinfo} {5}
\newcommand{\versiondotdebugpubnames}{2}
\newcommand{\versiondotdebugpubtypes}{2}
\newcommand{\versiondotdebugranges} {5}
\newcommand{\versiondotdebugstr} {5}
+\newcommand{\versiondotdebugstroffsets}{5}
\newcommand{\versiondotdebugtypes} {\versiondotdebuginfo}
-
+%
+% DWARF Standard Versions
+%
+\newcommand{\DWARFVersionI} {\addtoindex{DWARF Version 1}}
+\newcommand{\DWARFVersionII} {\addtoindex{DWARF Version 2}}
+\newcommand{\DWARFVersionIIII}{\addtoindex{DWARF Version 3}}
+\newcommand{\DWARFVersionIV} {\addtoindex{DWARF Version 4}}
+\newcommand{\DWARFVersionV} {\addtoindex{DWARF Version 5}}
\ No newline at end of file
\chapter{Examples (Informative)}
-\label{app:examplesinformative}F
+\label{app:examplesinformative}
The following sections provide examples that illustrate
various aspects of the DWARF debugging information format.
-\section{ Compilation Units and Abbreviations Table Example}F
+\section{Compilation Units and Abbreviations Table Example}
\label{app:compilationunitsandabbreviationstableexample}
1\$: \DWTAGarraytype
! No name, default (Fortran) ordering, default stride
\DWATtype(reference to REAL)
- \DWATassociated(expression= ! Test 'ptr\_assoc' \nolink{flag}
+ \DWATassociated(expression= ! Test 'ptr\_assoc' \nolink{flag}
\DWOPpushobjectaddress
- \DWOPlitn ! where n == offset(ptr\_assoc)
+ \DWOPlitn ! where n == offset(ptr\_assoc)
\DWOPplus
\DWOPderef
- \DWOPlitone ! mask for 'ptr\_assoc' \nolink{flag}
+ \DWOPlitone ! mask for 'ptr\_assoc' \nolink{flag}
\DWOPand)
\DWATdatalocation(expression= ! Get raw data address
\DWOPpushobjectaddress
- \DWOPlitn ! where n == offset(base)
+ \DWOPlitn ! where n == offset(base)
\DWOPplus
- \DWOPderef) ! Type of index of array 'ap'
+ \DWOPderef) ! Type of index of array 'ap'
2\$: \DWTAGsubrangetype
! No name, default stride
\DWATtype(reference to INTEGER)
\DWATlowerbound(expression=
\DWOPpushobjectaddress
- \DWOPlitn ! where n ==
- ! offset(desc, dims) +
- ! offset(dims\_str, lower\_bound)
+ \DWOPlitn ! where n ==
+ ! offset(desc, dims) +
+ ! offset(dims\_str, lower\_bound)
\DWOPplus
\DWOPderef)
\DWATupperbound(expression=
\DWOPpushobjectaddress
- \DWOPlitn ! where n ==
- ! offset(desc, dims) +
- ! offset(dims\_str, upper\_bound)
+ \DWOPlitn ! where n ==
+ ! offset(desc, dims) +
+ ! offset(dims\_str, upper\_bound)
\DWOPplus
\DWOPderef)
! Note: for the m'th dimension, the second operator becomes
6\$: \DWTAGarraytype
! No name, default (Fortran) ordering, default stride
\DWATtype(reference to 3\$)
- \DWATallocated(expression= ! Test 'ptr\_alloc' \nolink{flag}
+ \DWATallocated(expression= ! Test 'ptr\_alloc' \nolink{flag}
\DWOPpushobjectaddress
\DWOPlitn ! where n == offset(ptr\_alloc)
\DWOPplus
\DWOPderef
- \DWOPlittwo ! Mask for 'ptr\_alloc' \nolink{flag}
+ \DWOPlittwo ! Mask for 'ptr\_alloc' \nolink{flag}
\DWOPand)
- \DWATdatalocation(expression= ! Get raw data address
+ \DWATdatalocation(expression= ! Get raw data address
\DWOPpushobjectaddress
\DWOPlitn ! where n == offset(base)
\DWOPplus
\DWATtype(reference to real)
\DWATrank(expression=
\DWOPpushobjectaddress
- \DWOPlitn ! offset of rank in descriptor>
+ \DWOPlitn ! offset of rank in descriptor
\DWOPplus
\DWOPderef)
\DWATdatalocation(expression=
\DWOPpushobjectaddress
- \DWOPlitn ! offset of data in descriptor>
+ \DWOPlitn ! offset of data in descriptor
\DWOPplus
\DWOPderef)
11\$: \DWTAGgenericsubrange
\DWATtype(reference to integer)
\DWATlowerbound(expression=
! Looks up the lower bound of dimension i.
- ! Operation ! Stack effect
- ! (implicit) ! i
- \DWOPlitn ! i sizeof(dim)
- \DWOPmul ! dim[i]
- \DWOPlitn ! dim[i] offsetof(dim)
- \DWOPplus ! dim[i]+offset
- \DWOPpushobjectaddress ! dim[i]+offsetof(dim) objptr
- \DWOPplus ! objptr.dim[i]
- \DWOPlitn ! objptr.dim[i] offsetof(lb)
- \DWOPplus ! objptr.dim[i].lowerbound
- \DWOPderef) ! *objptr.dim[i].lowerbound
+ ! Operation ! Stack effect
+ ! (implicit) ! i
+ \DWOPlitn ! i sizeof(dim)
+ \DWOPmul ! dim[i]
+ \DWOPlitn ! dim[i] offsetof(dim)
+ \DWOPplus ! dim[i]+offset
+ \DWOPpushobjectaddress ! dim[i]+offsetof(dim) objptr
+ \DWOPplus ! objptr.dim[i]
+ \DWOPlitn ! objptr.dim[i] offsetof(lb)
+ \DWOPplus ! objptr.dim[i].lowerbound
+ \DWOPderef) ! *objptr.dim[i].lowerbound
\DWATupperbound(expression=
! Looks up the upper bound of dimension i.
- \DWOPlitn ! sizeof(dim)
+ \DWOPlitn ! sizeof(dim)
\DWOPmul
- \DWOPlitn ! offsetof(dim)
+ \DWOPlitn ! offsetof(dim)
\DWOPplus
\DWOPpushobjectaddress
\DWOPplus
- \DWOPlitn ! offset of upperbound in dim
+ \DWOPlitn ! offset of upperbound in dim
\DWOPplus
\DWOPderef)
\DWATbytestride(expression=
\caption{C++ template alias example \#2: DWARF description}
\label{fig:ctemplatealiasexample2dwarf}
\end{figure}
+
+\clearpage
+\section{Implicit Pointer Examples}
+\label{app:implicitpointerexamples}
+If the compiler determines that the value of an object is
+constant (either throughout the program, or within a specific
+range), it may choose to materialize that constant only when
+used, rather than store it in memory or in a register. The
+\DWOPimplicitvalue{} operation can be used to describe such a
+value. Sometimes, the value may not be constant, but still can be
+easily rematerialized when needed. A DWARF expression terminating
+in \DWOPstackvalue{} can be used for this case. The compiler may
+also eliminate a pointer value where the target of the pointer
+resides in memory, and the \DWOPstackvalue{} operator may be used
+to rematerialize that pointer value. In other cases, the compiler
+will eliminate a pointer to an object that itself needs to be
+materialized. Since the location of such an object cannot be
+represented as a memory address, a DWARF expression cannot give
+either the location or the actual value or a pointer variable
+that would refer to that object. The \DWOPimplicitpointer{}
+operation can be used to describe the pointer, and the debugging
+information entry to which its first operand refers describes the
+value of the dereferenced object. A DWARF consumer will not be
+able to show the location or the value of the pointer variable,
+but it will be able to show the value of the dereferenced
+pointer.
+
+Consider the \addtoindex{C} source shown in
+Figure \refersec{fig:cimplicitpointerexample1source}.
+Assume that the function \texttt{foo} is not inlined,
+that the argument x is passed in register 5, and that the
+function \texttt{foo} is optimized by the compiler into just
+an increment of the volatile variable \texttt{v}. Given these
+assumptions a possible DWARF description is shown in
+Figure \refersec{fig:cimplicitpointerexample1dwarf}.
+
+\begin{figure}[h]
+\begin{lstlisting}
+struct S { short a; char b, c; };
+volatile int v;
+void foo (int x)
+{
+ struct S s = { x, x + 2, x + 3 };
+ char *p = &s.b;
+ s.a++;
+ v++;
+}
+int main ()
+{
+ foo (v+1);
+ return 0;
+}
+\end{lstlisting}
+\caption{C implicit pointer example \#1: source}
+\label{fig:cimplicitpointerexample1source}
+\end{figure}
+
+\begin{figure}[h]
+\addtoindexx{implicit pointer example \#1}
+\begin{dwflisting}
+\begin{alltt}
+1\$: \DWTAGstructuretype
+ \DWATname("S")
+ \DWATbytesize(4)
+10\$: \DWTAGmember
+ \DWATname("a")
+ \DWATtype(reference to "short int")
+ \DWATdatamemberlocation(constant 0)
+11\$: \DWTAGmember
+ \DWATname("b")
+ \DWATtype(reference to "char")
+ \DWATdatamemberlocation(constant 2)
+12\$: \DWTAGmember
+ \DWATname("c")
+ \DWATtype(reference to "char")
+ \DWATdatamemberlocation(constant 3)
+2\$: \DWTAGsubprogram
+ \DWATname("foo")
+20\$: \DWTAGformalparameter
+ \DWATname("x")
+ \DWATtype(reference to "int")
+ \DWATlocation(\DWOPregfive)
+21\$: \DWTAGvariable
+ \DWATname("s")
+ \DWATlocation(expression=
+ \DWOPbregfive(1) \DWOPstackvalue \DWOPpiece(2)
+ \DWOPbregfive(2) \DWOPstackvalue \DWOPpiece(1)
+ \DWOPbregfive(3) \DWOPstackvalue \DWOPpiece(1))
+22\$: \DWTAGvariable
+ \DWATname("p")
+ \DWATtype(reference to "char *")
+ \DWATlocation(expression=
+ \DWOPimplicitpointer(reference to 21\$, 2))
+\end{alltt}
+\end{dwflisting}
+\caption{C implicit pointer example \#1: DWARF description}
+\label{fig:cimplicitpointerexample1dwarf}
+\end{figure}
+
+In Figure \refersec{fig:cimplicitpointerexample1dwarf},
+even though variables \texttt{s} and \texttt{p} are both optimized
+away completely, this DWARF description still allows a debugger to
+print the value of the variable \texttt{s}, namely \texttt{(2, 3, 4)}.
+Similarly, because the variable \texttt{s} does not live in
+memory, there is nothing to print for the value of \texttt{p}, but the
+debugger should still be able to show that \texttt{p[0]} is 3,
+\texttt{p[1]} is 4, \texttt{p[-1]} is 0 and \texttt{p[-2]} is 2.
+
+\needlines{6}
+As a further example, consider the C source
+shown in Figure \refersec{fig:cimplicitpointerexample2source}. Make
+the following assumptions about how the code is compiled:
+\begin{itemize}
+\item The function \texttt{foo} is inlined
+into function \texttt{main}
+\item The body of the main function is optimized to just
+three blocks of instructions which each increment the volatile
+variable \texttt{v}, followed by a block of instructions to return 0 from
+the function
+\item Label \texttt{label0} is at the start of the main
+function, \texttt{label1} follows the first \texttt{v++} block,
+\texttt{label2} follows the second \texttt{v++} block and
+\texttt{label3} is at the end of the main function
+\item Variable \texttt{b} is optimized away completely, as it isn't used
+\item The string literal \texttt{"opq"} is optimized away as well
+\end{itemize}
+Given these assumptions a possible DWARF description is shown in
+Figure \refersec{fig:cimplicitpointerexample2dwarf}.
+
+\begin{figure}[h]
+\begin{lstlisting}
+static const char *b = "opq";
+volatile int v;
+static inline void foo (int *p)
+{
+ (*p)++;
+ v++;
+ p++;
+ (*p)++;
+ v++;
+}
+int main ()
+{
+ int a[2] = { 1, 2 };
+ v++;
+ foo (a);
+ return a[0] + a[1] - 5;
+}
+\end{lstlisting}
+\caption{C implicit pointer example \#2: source}
+\label{fig:cimplicitpointerexample2source}
+\end{figure}
+
+\begin{figure}[h]
+\addtoindexx{implicit pointer example \#2}
+\begin{dwflisting}
+\begin{alltt}
+1\$: \DWTAGvariable
+ \DWATname("b")
+ \DWATtype(reference to "const char *")
+ \DWATlocation(expression=
+ \DWOPimplicitpointer(reference to 2$, 0))
+2\$: \DWTAGdwarfprocedure
+ \DWATlocation(expression=
+ \DWOPimplicitvalue(4, \{'o', 'p', 'q', '\slash0'\}))
+3\$: \DWTAGsubprogram
+ \DWATname("foo")
+ \DWATinline(\DWINLdeclaredinlined)
+30\$: \DWTAGformalparameter
+ \DWATname("p")
+ \DWATtype(reference to "int *")
+4\$: \DWTAGsubprogram
+ \DWATname("main")
+40\$: \DWTAGvariable
+ \DWATname("a")
+ \DWATtype(reference to "int[2]")
+ \DWATlocation(location list 98$)
+41\$: \DWTAGinlinedsubroutine
+ \DWATabstractorigin(reference to 3$)
+42\$: \DWTAGformalparameter
+ \DWATabstractorigin(reference to 30$)
+ \DWATlocation(location list 99$)
+
+! .debug_loc section
+98\$:<label0 in main> .. <label1 in main>
+ \DWOPlitone \DWOPstackvalue \DWOPpiece(4)
+ \DWOPlittwo \DWOPstackvalue \DWOPpiece(4)
+ <label1 in main> .. <label2 in main>
+ \DWOPlittwo \DWOPstackvalue \DWOPpiece(4)
+ \DWOPlittwo \DWOPstackvalue \DWOPpiece(4)
+ <label2 in main> .. <label3 in main>
+ \DWOPlittwo \DWOPstackvalue \DWOPpiece(4)
+ \DWOPlitthree \DWOPstackvalue \DWOPpiece(4)
+ 0 .. 0
+99\$:<label1 in main> .. <label2 in main>
+ \DWOPimplicitpointer(reference to 40\$, 0)
+ <label2 in main> .. <label3 in main>
+ \DWOPimplicitpointer(reference to 40\$, 4)
+ 0 .. 0
+\end{alltt}
+\end{dwflisting}
+\caption{C implicit pointer example \#2: DWARF description}
+\label{fig:cimplicitpointerexample2dwarf}
+\end{figure}
% These each need to link to definition page: FIXME
-
\begin{table}[p]
\caption{Tag names}
\label{tab:tagnames}
\dotdebugtypes{}
sections of an object file.
+\needlines{7}
+Optionally, debugging information may be partitioned such
+that the majority of the debugging information can remain in
+individual object files without being processed by the
+linker. These debugging information entries are contained in
+the \dotdebuginfodwo{} and \dotdebugtypesdwo{} sections. These
+sections may be placed in the object file but marked so that
+the linker ignores them, or they may be placed in a separate
+DWARF object file that resides alongside the normal object
+file. See Section \refersec{datarep:splitdwarfobjects} and
+Appendix \refersec{app:splitdwarfobjectsinformative} for details.
+
\section{Attribute Types}
\label{chap:attributetypes}
\DWATaddressclassTARG
&\livelinki{chap:DWATadressclasspointerorreferencetypes}{Pointer or reference types}{pointer or reference types} \\
&\livelinki{chap:DWATaddressclasssubroutineorsubroutinetype}{Subroutine or subroutine type}{subroutine or subroutine type} \\
+\DWATaddrbaseTARG
+&\livelinki{chap:DWATaddrbaseforaddresstable}{Base offset for address table}{address table} \\
\DWATallocatedTARG
&\livelinki{chap:DWATallocatedallocationstatusoftypes}{Allocation status of types}{allocation status of types} \\
\DWATartificialTARG
\DWATbitsizeTARG{}
&\livelinki{chap:DWATbitsizebasetypebitsize}{Base type bit size}{base type bit size} \\
&\livelinki{chap:DWATbitsizedatamemberbitsize}{Data member bit size}{data member bit size} \\
-\newpage
\DWATbitstrideTARG{}
&\livelinki{chap:DWATbitstridearrayelementstrideofarraytype}{Array element stride (of array type)}{array element stride (of array type)} \\
&\livelinki{chap:DWATbitstridesubrangestridedimensionofarraytype}{Subrange stride (dimension of array type)}{subrange stride (dimension of array type)} \\
&\livelinki{chap:DWATdiscrlistlistofdiscriminantvalues}{List of discriminant values}{list of discriminant values} \\
\DWATdiscrvalueTARG
&\livelinki{chap:DWATdiscrvaluediscriminantvalue}{Discriminant value}{discriminant value} \\
+\DWATdwoidTARG
+&\livelinki{chap:DWATdwoidforunit}{Signature for compilation unit}{split DWARF object file!unit signature} \\
+\DWATdwonameTARG
+&\livelinki{chap:DWATdwoidforunit}{Name of split DWARF object file}{split DWARF object file!object file name} \\
\DWATelementalTARG
&\livelinki{chap:DWATelementalelementalpropertyofasubroutine}{Elemental property of a subroutine}{elemental property of a subroutine} \\
\DWATencodingTARG
\DWATendianityTARG
&\livelinki{chap:DWATendianityendianityofdata}{Endianity of data}{endianity of data} \\
\DWATentrypcTARG
-&\livelinki{chap:DWATentrypcentryaddressofmoduleinitialization}{Entry address of module initialization}{entry address of module initialization}\\
-&\livelinki{chap:DWATentrypcentryaddressofsubprogram}{Entry address of subprogram}{entry address of subprogram} \\
-&\livelinki{chap:DWATentrypcentryaddressofinlinedsubprogram}{Entry address of inlined subprogram}{entry address of inlined subprogram}\\
+&\livelinki{chap:entryaddressofscope}{Entry address of a scope (compilation unit, \mbox{subprogram,} and so on)}{} \\
\DWATenumclassTARG
&\livelinki{chap:DWATenumclasstypesafeenumerationdefinition}{Type safe enumeration definition}{type safe enumeration definition}\\
\DWATexplicitTARG
&\livelinki{chap:DWATpurepurepropertyofasubroutine}{Pure property of a subroutine}{pure property of a subroutine} \\
\DWATrangesTARG
&\livelinki{chap:DWATrangesnoncontiguousrangeofcodeaddresses}{Non-contiguous range of code addresses}{non-contiguous range of code addresses} \\
+\DWATrangesbaseTARG
+&\livelinki{chap:DWATrangesbaseforrangelists}{Base offset for range lists}{Ranges lists} \\
\DWATrankTARG
&\livelinki{chap:DWATrankofdynamicarray}{Dynamic number of array dimensions}{dynamic number of array dimensions} \\
\DWATrecursiveTARG
\DWATstringlengthbytesizeTARG
&\livelinki{chap:DWATstringlengthstringlengthofstringtype}{Size of string length of string type}{string length of string type!size of}
\\
+\DWATstroffsetsbaseTARG
+&\livelinki{chap:DWATstroffsetbaseforindirectstringtable}{Base of string offsets table}{string offsets table} \\
\DWATthreadsscaledTARG
&\livelink{chap:DWATthreadsscaledupcarrayboundthreadsscalfactor}{UPC!array bound THREADS scale factor}\\
\DWATtrampolineTARG
A chain of sibling entries is terminated by a null entry.
In cases where a producer of debugging information feels that
-\hypertarget{chap:DWATsiblingdebugginginformationentryrelationship}
+\hypertarget{chap:DWATsiblingdebugginginformationentryrelationship}{}
it will be important for consumers of that information to
quickly scan chains of sibling entries, while ignoring the
children of individual siblings, that producer may attach
are pushed on the stack.
\begin{enumerate}[1. ]
\itembfnl{\DWOPlitzeroTARG, \DWOPlitoneTARG, \dots, \DWOPlitthirtyoneTARG}
-The \DWOPlitnTARG{} operations encode the unsigned literal values
+The \DWOPlitnNAME{} operations encode the unsigned literal values
from 0 through 31, inclusive.
\itembfnl{\DWOPaddrTARG}
-The \DWOPaddrTARG{} operation has a single operand that encodes
+The \DWOPaddrNAME{} operation has a single operand that encodes
a machine address and whose size is the \addtoindex{size of an address}
on the target machine.
\itembfnl{\DWOPconstoneuTARG, \DWOPconsttwouTARG, \DWOPconstfouruTARG, \DWOPconsteightuTARG}
-\DWOPconstnxMARK\DWOPconstnxINDX{}
-The single operand of a \DWOPconstnuTARG{} operation provides a 1,
+\DWOPconstnxMARK{}
+The single operand of a \DWOPconstnuNAME{} operation provides a 1,
2, 4, or 8\dash byte unsigned integer constant, respectively.
\itembfnl{\DWOPconstonesTARG, \DWOPconsttwosTARG, \DWOPconstfoursTARG, \DWOPconsteightsTARG}
-The single operand of a \DWOPconstnsTARG{} operation provides a 1,
+The single operand of a \DWOPconstnsNAME{} operation provides a 1,
2, 4, or 8\dash byte signed integer constant, respectively.
\itembfnl{\DWOPconstuTARG}
-The single operand of the \DWOPconstuTARG{} operation provides
+The single operand of the \DWOPconstuNAME{} operation provides
an unsigned LEB128 integer constant.
\itembfnl{\DWOPconstsTARG}
-The single operand of the \DWOPconstsTARG{} operation provides
+The single operand of the \DWOPconstsNAME{} operation provides
a signed LEB128 integer constant.
+\itembfnl{\DWOPaddrxTARG}
+The \DWOPaddrxNAME{} operation has a single operand that
+encodes an unsigned LEB128 value, which is a zero-based
+index into the \dotdebugaddr{} section, where a machine
+address is stored.
+
+\itembfnl{\DWOPconstxTARG}
+The \DWOPconstxNAME{} operation has a single operand that
+encodes an unsigned LEB128 value, which is a zero-based
+index into the \dotdebugaddr{} section, where a constant, the
+size of a machine address, is stored.
+
+\textit{The \DWOPconstxNAME{} operation is provided for constants that
+require link-time relocation but should not be
+interpreted by the consumer as a relocatable address
+(for example, offsets to thread-local storage).}
+
\end{enumerate}
describe
\addtoindexx{location description!use in location list}
objects that have a limited lifetime or change their location
-during their lifetime. Location lists are more completely
-described below.
+during their lifetime. Location lists are described in
+Section \refersec{chap:locationlists} below.
\end{enumerate}
-The two forms are distinguished in a context sensitive
+Location descriptions are distinguished in a context sensitive
manner. As the value of an attribute, a location description
is encoded using
\addtoindexx{exprloc class}
a piece or all of an object or other entity in memory.
\subsubsubsection{Register Location Descriptions}
+\label{chap:registerlocationdescriptions}
A register location description consists of a register name
operation, which represents a piece or all of an object
located in a given register.
of location description, the DWARF expression represents the
actual value of the object, rather than its location. The
\DWOPstackvalueINDX{} operation terminates the expression.
+
+\itembfnl{\DWOPimplicitpointerTARG}
+The \DWOPimplicitpointerNAME{} operation specifies that the object
+is a pointer that cannot be represented as a real pointer,
+even though the value it would point to can be described. In
+this form of location description, the DWARF expression refers
+to a debugging information entry that represents the actual
+value of the object to which the pointer would point. Thus, a
+consumer of the debug information would be able to show the
+value of the dereferenced pointer, even when it cannot show
+the value of the pointer itself.
+
+\needlines{5}
+The \DWOPimplicitpointerNAME{} operation has two operands: a
+reference to a debugging information entry that describes
+the dereferenced object's value, and a signed number that
+is treated as a byte offset from the start of that value.
+The first operand is a 4-byte unsigned value in the 32-bit
+DWARF format, or an 8-byte unsigned value in the 64-bit
+DWARF format (see Section
+\refersec{datarep:32bitand64bitdwarfformats}).
+The second operand is a \addtoindex{signed LEB128} number.
+
+The first operand is used as the offset of a debugging
+information entry in a \dotdebuginfo{} section, which may be
+contained in a shared object or executable other than that
+containing the operator. For references from one shared object
+or executable to another, the relocation must be performed by
+the consumer.
+
+\textit{The debugging information entry referenced by a
+\DWOPimplicitpointerNAME{} operation is typically a
+\DWTAGvariable{} or \DWTAGformalparameter{} entry whose
+\DWATlocation{} attribute gives a second DWARF expression or a
+location list that describes the value of the object, but the
+referenced entry may be any entry that contains a \DWATlocation{}
+or \DWATconstvalue{} attribute (for example, \DWTAGdwarfprocedure).
+By using the second DWARF expression, a consumer can
+reconstruct the value of the object when asked to dereference
+the pointer described by the original DWARF expression
+containing the \DWOPimplicitpointer{} operation.}
+
\end{enumerate}
+\textit{DWARF location expressions are intended to yield the \textbf{location}
+of a value rather than the value itself. An optimizing compiler
+may perform a number of code transformations where it becomes
+impossible to give a location for a value, but remains possible
+to describe the value itself.
+Section \refersec{chap:registerlocationdescriptions}
+describes operators that can be used to
+describe the location of a value when that value exists in a
+register but not in memory. The operations in this section are
+used to describe values that exist neither in memory nor in a
+single register.}
\paragraph{Empty Location Descriptions}
\subsection{Location Lists}
\label{chap:locationlists}
+There are two forms of location lists. The first form
+is intended for use in other than a split DWARF object,
+while the second is intended for use in a split DWARF object
+(see Section \refersec{datarep:splitdwarfobjects}). The two
+forms are otherwise equivalent.
+
+\textit{The form for split DWARF objects is new in \DWARFVersionV.}
+
+\subsubsection{Location Lists in Non-split Objects}
+\label{chap:locationlistsinnonsplitobjects}
Location lists
\addtoindexx{location list}
are used in place of location expressions
in interpretation
and representation.}
+\subsubsection{Location Lists in Split Objects}
+\label{chap:locationlistsinsplitobjects}
+In a split DWARF object (see
+Section \refersec{datarep:splitdwarfobjects}),
+location lists are contained in the \dotdebuglocdwo{} section.
+
+Each entry in the location list
+begins with a type code, which is a single byte that
+identifies the type of entry. There are five types of entries:
+\begin{enumerate}
+\itembfnl{\DWLLEendoflistentryTARG}
+This entry indicates the end of a location list, and
+contains no further data.
+
+\itembfnl{\DWLLEbaseaddressselectionentryTARG}
+This entry contains an unsigned LEB128 value immediately
+following the type code. This value is the index of an
+address in the \dotdebugaddr{} section, which is then used as
+the base address when interpreting offsets in subsequent
+location list entries of type \DWLLEoffsetpairentry.
+
+\itembfnl{\DWLLEstartendentryTARG}
+This entry contains two unsigned LEB128 values
+immediately following the type code. These values are the
+indexes of two addresses in the \dotdebugaddr{} section.
+These indicate the starting and ending addresses,
+respectively, that define the address range for which
+this location is valid. The starting and ending addresses
+given by this type of entry are not relative to the
+compilation unit base address. A single location
+description follows the fields that define the address range.
+
+\itembfnl{\DWLLEstartlengthentryTARG}
+This entry contains one LEB128 value and a 4-byte
+unsigned value immediately following the type code. The
+first value is the index of an address in the \dotdebugaddr{}
+section, which marks the beginning of the address range
+over which the location is valid. The second value is the
+length of the range. The starting address given by this
+type of entry is not relative to the compilation unit
+base address. A single location
+description follows the fields that define the address range.
+
+\itembfnl{\DWLLEoffsetpairentryTARG}
+This entry contains two 4-byte unsigned values
+immediately following the type code. These values are the
+starting and ending offsets, respectively, relative to
+the applicable base address, that define the address
+range for which this location is valid. A single location
+description follows the fields that define the address range.
+\end{enumerate}
+
\section{Types of Program Entities}
\label{chap:typesofprogramentities}
Any
-\hypertarget{chap:DWATtypetypeofdeclaration}
+\hypertarget{chap:DWATtypetypeofdeclaration}{}
debugging information entry describing a declaration that
has a type has
\addtoindexx{type attribute}
program objects are permitted access to the object in question.}
The accessibility of a declaration is
-\hypertarget{chap:DWATaccessibilitycandadadeclarations}
+\hypertarget{chap:DWATaccessibilitycandadadeclarations}{}
represented by a
\DWATaccessibility{}
attribute, whose
declared.}
The
-\hypertarget{chap:DWATvisibilityvisibilityofdeclaration}
+\hypertarget{chap:DWATvisibilityvisibilityofdeclaration}{}
visibility of a declaration is represented
by a \DWATvisibility{}
attribute\addtoindexx{visibility attribute}, whose value is a
member functions and for virtual base classes.}
The
-\hypertarget{chap:DWATvirtualityvirtualityindication}
+\hypertarget{chap:DWATvirtualityvirtualityindication}{}
virtuality of a declaration is represented by a
\DWATvirtuality{}
attribute\addtoindexx{virtuality attribute}, whose value is a constant drawn
from the set of codes listed in
Table \refersec{tab:virtualitycodes}.
-\begin{simplenametable}[2.4in]{Virtuality codes}{tab:virtualitycodes}
+\begin{simplenametable}[2.5in]{Virtuality codes}{tab:virtualitycodes}
\DWVIRTUALITYnoneTARG{} \\
\DWVIRTUALITYvirtualTARG{} \\
\DWVIRTUALITYpurevirtualTARG{} \\
\addtoindexx{artificial attribute}
declaration of an object or type artificially generated by
a compiler and not explicitly declared by the source program
-\hypertarget{chap:DWATartificialobjectsortypesthat}
+\hypertarget{chap:DWATartificialobjectsortypesthat}{}
may have a
\DWATartificial{} attribute,
which is a \livelink{chap:classflag}{flag}.
address space.}
Any debugging information entry that contains a description
-\hypertarget{chap:DWATsegmentaddressinginformation}
+\hypertarget{chap:DWATsegmentaddressinginformation}{}
of the location of an object or subroutine may have
a
\DWATsegment{} attribute,
information about a declaration of an entity that is not
\addtoindexx{incomplete declaration}
also a definition, or is otherwise incomplete, to evaluate
-\hypertarget{chap:DWATdeclarationincompletenondefiningorseparateentitydeclaration}
+\hypertarget{chap:DWATdeclarationincompletenondefiningorseparateentitydeclaration}{}
an expression correctly.
\textit{As an example, consider the following fragment of \addtoindex{C} code:}
\subsection{Declarations Completing Non-Defining Declarations}
A debugging information entry that represents a
-\hypertarget{chap:DWATspecificationincompletenondefiningorseparatedeclaration}
+\hypertarget{chap:DWATspecificationincompletenondefiningorseparatedeclaration}{}
declaration that completes another (earlier)
non\dash defining declaration may have a
\DWATspecification{}
a declaration with its occurrence in the program source.}
Any debugging information
-\hypertarget{chap:DWATdeclfilefilecontainingsourcedeclaration}
+\hypertarget{chap:DWATdeclfilefilecontainingsourcedeclaration}{}
entry
-\hypertarget{chap:DWATdecllinelinenumberofsourcedeclaration}
+\hypertarget{chap:DWATdecllinelinenumberofsourcedeclaration}{}
representing
-\hypertarget{chap:DWATdeclcolumncolumnpositionofsourcedeclaration}
+\hypertarget{chap:DWATdeclcolumncolumnpositionofsourcedeclaration}{}
the
\addtoindexx{line number of declaration}
declaration of an object, module, subprogram or
\section{Identifier Names}
\label{chap:identifiernames}
Any
-\hypertarget{chap:DWATnamenameofdeclaration}
+\hypertarget{chap:DWATnamenameofdeclaration}{}
debugging information entry
\addtoindexx{identifier names}
representing
\addtoindexx{name attribute}
including the keyword operator (in names such as \doublequote{operator +}),
if present. See also
-Section \refersec{chap:linkagenames} regarding the use
+Section \referfol{chap:linkagenames} regarding the use
of \DWATlinkagename{} for
\addtoindex{mangled names}
mangled names.
\section{Data Locations and DWARF Procedures}
Any debugging information entry describing a data object (which
-\hypertarget{chap:DWATlocationdataobjectlocation}
+\hypertarget{chap:DWATlocationdataobjectlocation}{}
includes variables and parameters) or
\livelink{chap:commonblockentry}{common blocks}
may have
Any debugging information entry describing an entity that has
a machine code address or range of machine code addresses,
which includes compilation units, module initialization,
-\hypertarget{chap:DWATrangesnoncontiguousrangeofcodeaddresses}
+\hypertarget{chap:DWATrangesnoncontiguousrangeofcodeaddresses}{}
subroutines, ordinary \nolink{blocks},
try/catch \nolink{blocks} (see Section\refersec{chap:tryandcatchblockentries}),
labels and the like, may have
\begin{itemize}
\item A \DWATlowpc{} attribute for
-\hypertarget{chap:DWATlowpccodeaddressorrangeofaddresses}
+\hypertarget{chap:DWATlowpccodeaddressorrangeofaddresses}{}
a single address,
\item A \DWATlowpc{}
and
\DWAThighpc{}
\addtoindexx{high PC attribute}
-\hypertarget{chap:DWAThighpccontiguousrangeofcodeaddresses}
+\hypertarget{chap:DWAThighpccontiguousrangeofcodeaddresses}{}
pair of attributes for
a single contiguous range of
addresses, or
may have a value of class
\livelink{chap:classrangelistptr}{rangelistptr} for the same reason.
-Range lists are contained
-in a separate object file section called
+Range lists are contained in a separate object file section called
\dotdebugranges{}. A
\addtoindex{range list} is indicated by a
\DWATranges{} attribute whose
\dotdebugranges{} section to the beginning of the
\addtoindex{range list}.
+If the current compilation unit contains a \DWATrangesbase{}
+attribute, the value of that attribute establishes a base
+offset within the \dotdebugranges{} section for the compilation
+unit. The offset given by the \DWATranges{} attribute is
+relative to that base.
+
+\textit{The \DWATrangesbase{} attribute is new in \addtoindex{DWARF Version 5}.
+The advantage of this attribute is that is reduces the number of
+object language relocations needed for references to the \dotdebugranges{}
+section from one for each reference to a single relocation that
+applies for the entire compilation unit.}
+
Each entry in a \addtoindex{range list} is either a
\addtoindex{range list} entry,
\addtoindexx{base address selection entry!in range list}
a range of code addresses, which includes compilation units,
module initialization, subroutines,
ordinary \livelink{chap:lexicalblock}{block},
-try/catch \nolink{blocks} (see Section \refersec{chap:tryandcatchblockentries}),
-and the like,
-may have a \DWATentrypc{} attribute to
+try/catch \nolink{blocks} (see Section
+\refersec{chap:tryandcatchblockentries}),
+and the like, may have a \DWATentrypcNAME{} attribute to
indicate the first executable instruction within that range
-of addresses. The value of the \DWATentrypc{} attribute is a
-relocated address. If no \DWATentrypc{} attribute is present,
+\hypertarget{chap:entryaddressofscope}{}
+of addresses. The value of the \DWATentrypcNAME{} attribute is a
+relocated address if the
+value of \DWATentrypcNAME{} is of class address; or if it is of class
+constant, the value is an unsigned integer offset which, when
+added to the base address of the function, gives the entry
+address.
+
+The base address of the containing scope is given by either the
+\DWATlowpc{} attribute, or the first range entry in the list of
+ranges given by the \DWATranges{} attribute.
+If no \DWATentrypcNAME{} attribute is present,
then the entry address is assumed to be the same as the
value of the \DWATlowpc{} attribute, if present; otherwise,
the entry address is unknown.
Generally, any debugging information
entry that
-\hypertarget{chap:DWATdescriptionartificialnameordescription}
+\hypertarget{chap:DWATdescriptionartificialnameordescription}{}
has, or may have,
\addtoindexx{name attribute}
a
for a producer to include this name in the DWARF description
of the program to facilitate consumer access to and use of
object file information about an entity and/or information
-\hypertarget{chap:DWATlinkagenameobjectfilelinkagenameofanentity}
+\hypertarget{chap:DWATlinkagenameobjectfilelinkagenameofanentity}{}
that is encoded in the linkage name itself.
}
\DWTAGentrypoint, \DWTAGsubprogram{}
and \DWTAGvariable.
}
+
+\section{Template Parameters}
+\label{chap:templateparameters}
+\textit{
+In \addtoindex{C++}, a template is a generic definition of a class, function, member
+function, or typedef (alias). A template has formal parameters that
+can be types or constant values; the class, function,
+member function, or typedef is instantiated differently for each
+distinct combination of type or value actual parameters. DWARF does
+not represent the generic template definition, but does represent each
+instantiation.
+}
+
+A debugging information entry that represents a
+\addtoindex{template instantiation}
+will contain child entries describing the actual template parameters.
+The containing entry and each of its child entries reference a template
+parameter entry in any circumstance where the template definition
+referenced a formal template parameter.
+
+A template type parameter is represented by a debugging information
+entry with the tag
+\addtoindexx{template type parameter entry}
+\DWTAGtemplatetypeparameterTARG.
+A template value parameter is represented by a debugging information
+entry with the tag
+\addtoindexx{template value parameter entry}
+\DWTAGtemplatevalueparameterTARG.
+The actual template parameter entries appear in the same order as the
+corresponding template formal parameter declarations in the
+source program.
+
+\needlines{4}
+A type or value parameter entry may have a \DWATname{} attribute,
+\addtoindexx{name attribute}
+whose value is a
+null\dash terminated string containing the name of the corresponding
+formal parameter as it appears in the source program.
+
+A
+\addtoindexx{formal type parameter|see{template type parameter entry}}
+template type parameter entry has a
+\addtoindexx{type attribute}
+\DWATtype{} attribute
+describing the actual type by which the formal is replaced.
+
+A value parameter entry has an attribute giving the
+actual compile-time or run-time constant value
+of the value parameter for this instantiation.
+This can be a \DWATconstvalue{} attribute, whose
+value is the compile-time constant value as represented
+on the target architecture.
+Or, it can a \DWATlocation{} attribute, whose value is a
+single location description for the run-time constant address.
+The entry may also have a
+\DWATdefaultvalue{} attribute, which is a flag indicating
+that the value corresponds to the default argument for the
+template parameter.
+
compilation unit are assumed to be contiguous). \\
\end{longtable}
+\needlines{5}
\subsection{State Machine Registers}
\label{chap:statemachineregisters}
The line number information state machine has the following
\textit{Codes for vendor specific extensions, if any, are described
just like standard opcodes.}
+\item \texttt{file\_entry\_format} (\addtoindex{ubyte}) \\
+A format code indicating the format of certain data in the
+entries of the file names field (see below). The format codes
+and their meanings are as follows:
+\begin{itemize}
+\item \DWLNFtimestampsizeTARG \\
+Entries contain a modification timestamp and file size.
+\item \DWLNFMDfiveTARG \\
+Entries contain an \addtoindex{MD5} digest of the file contents.
+\end{itemize}
+
\needlines{3}
\item \texttt{include\_directories} (sequence of path names) \\
Entries
index of a directory in the
\addttindex{include\_directories} section.
-
-\item An unsigned LEB128\addtoindexx{LEB128!unsigned}
-number representing the
-(implementation\dash defined) time of last modification for
-the file, or 0 if not available.
-
-\item An unsigned LEB128\addtoindexx{LEB128!unsigned}
-number representing the length in
-bytes of the file, or 0 if not available.
+\item If \texttt{file\_entry\_format} (see above) is \DWLNFtimestampsize:
+\begin{itemize}
+ \item An unsigned LEB128\addtoindexx{LEB128!unsigned}
+ number representing the
+ (implementation-\linebreak[0]defined) time of last modification for
+ the file, or 0 if not available.
+
+ \item An unsigned LEB128\addtoindexx{LEB128!unsigned}
+ number representing the length in
+ bytes of the file, or 0 if not available.
+\end{itemize}
+If \texttt{file\_entry\_format} is \DWLNFMDfive:
+\begin{itemize}
+\item A 16-byte MD5 digest of the file contents.
+\end{itemize}
\end{itemize}
\textit{A compiler may generate a single null byte for the file
names field and define file names using the extended opcode
-\DWLNEdefinefile.}
+\DWLNEdefinefile{} (when \texttt{file\_entry\_format} is \DWLNFtimestampsize) or
+\DWLNEdefinefileMDfive{} (when \texttt{file\_entry\_format} is \DWLNFMDfive).}
\end{enumerate}
\addttindex{epilogue\_begin}
registers to \doublequote{false.}
+\needlines{5}
\item \textbf{\DWLNSadvancepcTARG} \\
The \DWLNSadvancepcTARG{}
opcode takes a single unsigned LEB128\addtoindexx{LEB128!unsigned}
integer. It sets the
\addttindex{discriminator} register to the new value.
+\needlines{4}
+\item \textbf{\DWLNEdefinefileMDfiveTARG} \\
+The \DWLNEdefinefileMDfiveTARG{} opcode takes three operands:
+\begin{enumerate}[1. ]
+
+\item A null\dash terminated string containing the full or relative
+path name of a source file. If the entry contains a file
+name or a relative path name, the file is located relative
+to either the compilation directory (as specified by the
+\DWATcompdir{} attribute given in the compilation unit)
+or one of the directories in the
+\addttindex{include\_directories} section.
+
+\item An unsigned LEB128\addtoindexx{LEB128!unsigned}
+number representing the directory index
+of the directory in which the file was found.
+
+\item A 16-byte \addtoindex{MD5} digest of the file contents.
+\end{enumerate}
+The first two operands are interpreted in the same way as the
+first two operands of \DWLNEdefinefile.
\end{enumerate}
\textit{Appendix \refersec{app:linenumberprogramexample}
signed and factored. The resulting offset is
\textit{factored\_offset} * \addttindex{data\_alignment\_factor}.
+\needlines{4}
\item \textbf{\DWCFAvaloffsetTARG} \\
The \DWCFAvaloffsetTARG{}
instruction takes two unsigned
compilation unit using an
\addtoindex{imported unit entry}.
+
\subsection[Normal and Partial CU Entries]{Normal and Partial Compilation Unit Entries}
\label{chap:normalandpartialcompilationunitentries}
\addtoindexx{name attribute}
whose value is a null\dash terminated
string
-\hypertarget{chap:DWATnamepathnameofcompilationsource}
+\hypertarget{chap:DWATnamepathnameofcompilationsource}{}
containing the full or relative path name of the primary
source file from which the compilation unit was derived.
\item A \DWATlanguage{} attribute
\addtoindexx{language attribute}
whose constant value is an
-\hypertarget{chap:DWATlanguageprogramminglanguage}
+\hypertarget{chap:DWATlanguageprogramminglanguage}{}
integer code
\addtoindexx{language attribute}
indicating the source language of the compilation
\DWLANGCeightynineTARG & ISO C:1989 \\
\DWLANGCninetynineTARG & ISO \addtoindex{C}:1999 \\
\DWLANGCplusplusTARG & ISO \addtoindex{C++}:1998 \\
+\DWLANGCpluspluszerothreeTARG & ISO \addtoindex{C++}:2003 \\
+\DWLANGCpluspluselevenTARG & ISO \addtoindex{C++}:2011 \\
\DWLANGCobolseventyfourTARG & ISO \addtoindex{COBOL}:1974 \\
\DWLANGCoboleightyfiveTARG & ISO \addtoindex{COBOL}:1985 \\
\DWLANGDTARG{} \dag & D \addtoindexx{D language} \\
\DWLANGModulathreeTARG & \addtoindex{Modula-3}\\
\DWLANGObjCTARG{} & \addtoindex{Objective C}\\
\DWLANGObjCplusplusTARG{} & \addtoindex{Objective C++}\\
+\DWLANGOCamlTARG{} \dag & \addtoindex{OCaml}\index{Objective Caml|see{OCaml}}\\
\DWLANGOpenCLTARG{} \dag & \addtoindex{OpenCL}\\
\DWLANGPascaleightythreeTARG & ISO \addtoindex{Pascal}:1983\\
\DWLANGPLITARG{} \dag & ANSI \addtoindex{PL/I}:1976\\
a
\addtoindexx{section offset!in statement list attribute}
section
-\hypertarget{chap:DWATstmtlistlinenumberinformationforunit}
+\hypertarget{chap:DWATstmtlistlinenumberinformationforunit}{}
offset to the line number information for this compilation
unit.
whose value is a
\addtoindexx{section offset!in macro information attribute}
section
-\hypertarget{chap:DWATmacroinfomacroinformation}
+\hypertarget{chap:DWATmacroinfomacroinformation}{}
offset to the macro information for this compilation unit.
This information is placed in a separate object file section
\item A
\DWATcompdir{}
attribute
-\hypertarget{chap:DWATcompdircompilationdirectory}
+\hypertarget{chap:DWATcompdircompilationdirectory}{}
whose value is a
null\dash terminated string containing the current working directory
of the compilation command that produced this compilation
\addtoindexx{producer attribute}
whose value is a null\dash
terminated string containing information about the compiler
-\hypertarget{chap:DWATproducercompileridentification}
+\hypertarget{chap:DWATproducercompileridentification}{}
that produced the compilation unit. The actual contents of
the string will be specific to each producer, but should
begin with the name of the compiler vendor or some other
attribute
\addtoindexx{identifier case attribute}
whose integer
-\hypertarget{chap:DWATidentifiercaseidentifiercaserule}
+\hypertarget{chap:DWATidentifiercaseidentifiercaserule}{}
constant value is a code describing the treatment
of identifiers within this compilation unit. The
set of identifier case codes is given in
Table \refersec{tab:identifiercasecodes}.
\begin{simplenametable}{Identifier case codes}{tab:identifiercasecodes}
-\DWIDcasesensitive{} \\
-\DWIDupcase{} \\
-\DWIDdowncase{} \\
+\DWIDcasesensitive{} \\
+\DWIDupcase{} \\
+\DWIDdowncase{} \\
\DWIDcaseinsensitive{} \\
\end{simplenametable}
\livelink{chap:classreference}{reference}.
This
-\hypertarget{chap:DWATbasetypesprimitivedatatypesofcompilationunit}
+\hypertarget{chap:DWATbasetypesprimitivedatatypesofcompilationunit}{}
attribute
\addtoindexx{base types attribute}
points to a debugging information entry
contain such definitions. This allows a consumer, for example,
to interpret a type conversion to a base type
% getting this link target at the right spot is tricky.
-\hypertarget{chap:DWATuseUTF8compilationunitusesutf8strings}
+\hypertarget{chap:DWATuseUTF8compilationunitusesutf8strings}{}
correctly.
\item A \DWATuseUTFeight{} attribute,
\addtoindexx{use UTF8 attribute}\addtoindexx{UTF-8}
which is a \livelink{chap:classflag}{flag} whose
presence indicates that all strings (such as the names of
-declared entities in the source program) are represented
-using the UTF\dash 8 representation
-(see Section \refersec{datarep:attributeencodings}).
-
+declared entities in the source program, or file names in the line table)
+are represented using the UTF\dash 8 representation.
\item A \DWATmainsubprogram{} attribute, which is a \livelink{chap:classflag}{flag}
\addtoindexx{main subprogram attribute}
whose presence indicates
-\hypertarget{chap:DWATmainsubprogramunitcontainingmainorstartingsubprogram}
+\hypertarget{chap:DWATmainsubprogramunitcontainingmainorstartingsubprogram}{}
that the compilation unit contains a
subprogram that has been identified as the starting function
of the program. If more than one compilation unit contains
similar or other means to identify the main subprogram of
a program.}
+\item A \DWATentrypc{} attribute whose value is the address of the first
+\hypertarget{chap:DWATentrypcofcompileunit}{}
+\hypertarget{chap:DWATentrypcofpartialunit}{}
+\addtoindexx{entry pc attribute!for normal compilation unit}
+\addtoindexx{entry pc attribute!for partial compilation unit}
+executable instruction of the unit (see
+Section \refersec{chap:entryaddress}).
+
+\item A \DWATstroffsetsbaseNAME\addtoindexx{string offset base attribute}
+\hypertarget{chap:DWATstroffsetbaseforindirectstringtable}{}
+attribute, whose value is a reference.
+This attribute points to the first string
+offset of the compilation unit's contribution to the
+\dotdebugstroffsets{} section. Indirect string references
+(using \DWFORMstrx) within the compilation unit are
+interpreted as indices relative to this base.
+
+\item A \DWATaddrbaseNAME\addtoindexx{address table base attribute}
+\hypertarget{chap:DWATaddrbaseforaddresstable}{}
+attribute, whose value is a reference.
+This attribute points to the beginning of the compilation
+unit's contribution to the \dotdebugaddr{} section.
+Indirect references (using \DWFORMaddrx, \DWOPaddrx, or
+\DWOPconstx) within the compilation unit are
+interpreted as indices relative to this base.
+
+\needlines{5}
+\item A \DWATrangesbaseNAME\addtoindexx{ranges table base attribute}
+\hypertarget{chap:DWATrangesbaseforrangestable}{}
+attribute, whose value is a reference.
+This attribute points to the beginning of the compilation
+unit's contribution to the \dotdebugranges{} section.
+References to range lists (using \DWFORMsecoffset)
+within the compilation unit are
+interpreted as offsets relative to this base.
+
+
\end{enumerate}
The base address of a compilation unit is defined as the
DWARF entry or structure defined in terms of the base address
of that compilation unit is not valid.
+\subsection{Skeleton Compilation Unit Entries}
+\label{chap:skeletoncompilationunitentries}
+When generating a split DWARF object (see
+Section \refersec{datarep:splitdwarfobjects}), the
+compilation unit in the \dotdebuginfo{} section is a "skeleton"
+compilation unit, which contains only a subset of the
+attributes of the full compilation unit. In general, it
+contains those attributes that are necessary for the consumer
+to locate the DWARF object where the full compilation unit
+can be found, and for the consumer to interpret references to
+addresses in the program.
+
+A skeleton compilation unit has no
+children, and may have the following attributes:
+\begin{enumerate}[1. ]
+
+\item
+Either a \DWATlowpc{} and \DWAThighpc{} pair of attributes
+or a \DWATranges{} attribute (the same as for regular
+compilation unit entries).
+
+\item
+A \DWATstmtlist{} attribute (the same as for regular
+compilation unit entries).
+
+\item
+A \DWATcompdir{} attribute (the same as for regular
+compilation unit entries).
+
+\item
+A \DWATdwoname{} attribute whose value is a
+null-terminated string containing the full or relative
+path name of the DWARF object file that contains the full
+compilation unit.
+
+\item
+A \DWATdwoid{} attribute whose value is an 8-byte
+unsigned hash of the full compilation unit. This hash
+value is computed by the method described in
+Section \refersec{datarep:typesignaturecomputation}.
+
+\item
+A \DWATrangesbase{} attribute (the same as for regular
+compilation unit entries).
+
+\item
+A \DWATaddrbase{} attribute (the same as for regular
+compilation unit entries).
+\end{enumerate}
+
+All other attributes of a compilation unit entry (described
+in Section \refersec{chap:normalandpartialcompilationunitentries})
+should be placed in the full compilation
+unit entry in the \dotdebuginfodwo{} section of the split DWARF
+object. The attributes provided by the skeleton compilation
+unit entry do not need to be repeated in the full compilation
+unit entry, except for \DWATdwoid, which should appear in
+both entries so that the consumer can verify that it has
+found the correct DWARF object.
+
\subsection{Imported Unit Entries}
\label{chap:importedunitentries}
The
-\hypertarget{chap:DWATimportimportedunit}
+\hypertarget{chap:DWATimportimportedunit}{}
place where a normal or partial unit is imported is
represented by a debugging information entry with the
\addtoindexx{imported unit entry}
language used to define the type. The set of language names
and their meanings are given in Table \refersec{tab:languagenames}.
+A type unit entry may have a
+\DWATstroffsetsbase\addtoindexx{string base offset attribute}
+attribute, whose value is a reference. This attribute points
+to the first string offset of the type unit's contribution to
+the \dotdebugstroffsets{} section. Indirect string references
+(using \DWFORMstrx) within the type unit must be interpreted
+as indices relative to this base.
+
+A type unit entry may have a \DWATstmtlist{} attribute, whose
+value is a section offset to a line number table for this
+type unit. Because type units do not describe any code, they
+do not actually need a line number table, but the line number
+tables also contain a list of directories and file names that
+may be referenced by the \DWATdeclfile{} attribute. In a
+normal object file with a regular compilation unit entry, the
+type unit entries can simply refer to the line number table
+used by the compilation unit. In a split DWARF object, where
+the type units are located in a separate DWARF object file,
+the \DWATstmtlist{} attribute refers to a "skeleton"
+line number table in the \dotdebuglinedwo{} section, which
+contains only the list of directories and file names. All
+type unit entries in a split DWARF object may (but are not
+required to) refer to the same skeleton line number table.
+
A \addtoindex{type unit} entry for a given type T owns a debugging
information entry that represents a defining declaration
of type T. If the type is nested within enclosing types or
ranges, respectively, of the machine instructions generated for
the module initialization code
(see Section \refersec{chap:codeaddressesandranges}).
-\hypertarget{chap:DWATentrypcentryaddressofmoduleinitialization}
+\hypertarget{chap:DWATentrypcentryaddressofmoduleinitialization}{}
It may also
\addtoindexx{entry pc attribute!for module initialization}
have a
(see Section \refersec{chap:entryaddress}).
If
-\hypertarget{chap:DWATprioritymodulepriority}
+\hypertarget{chap:DWATprioritymodulepriority}{}
the module has been assigned a priority, it may have
\addtoindexx{priority attribute}
a
with the
tag \DWTAGnamespaceTARG.
A namespace extension is
-\hypertarget{chap:DWATextensionpreviousnamespaceextensionororiginalnamespace}
+\hypertarget{chap:DWATextensionpreviousnamespaceextensionororiginalnamespace}{}
represented by a
\DWTAGnamespace{} entry
with
more debugging information entries with the
tag \DWTAGimporteddeclarationTARG.
When
-\hypertarget{chap:DWATimportimporteddeclaration}
+\hypertarget{chap:DWATimportimporteddeclaration}{}
an overloaded entity
is imported, there is one imported declaration entry for
each overloading.
declaration or the imported entity occurs.
\textit{A \addtoindex{C++} namespace alias may be represented by an imported
-\hypertarget{chap:DWATimportnamespacealias}
+\hypertarget{chap:DWATimportnamespacealias}{}
declaration entry
\addtoindexx{namespace (C++)!alias}
with a name attribute whose value is
}
\textit{A \addtoindex{C++} using declaration may be represented by one or more
-\hypertarget{chap:DWATimportnamespaceusingdeclaration}
+\hypertarget{chap:DWATimportnamespaceusingdeclaration}{}
imported
\addtoindexx{namespace (C++)!using declaration}
declaration entries. When the using declaration
\addtoindexx{namespace (C++)!using directive}
\addtoindexx{using directive|see {namespace (C++), using directive}}
may be represented by an imported module
-\hypertarget{chap:DWATimportnamespaceusingdirective}
+\hypertarget{chap:DWATimportnamespaceusingdirective}{}
entry, with an import attribute referring to the namespace
entry of the appropriate extension of the namespace (which
might be the original namespace entry) and no owned entries.
\addtoindexx{subprogram entry}
tag \DWTAGsubprogram{}
is visible outside of its containing
-\hypertarget{chap:DWATexternalexternalsubroutine}
+\hypertarget{chap:DWATexternalexternalsubroutine}{}
compilation unit, that entry has
\addtoindexx{external attribute}
a
}
A
-\hypertarget{chap:DWATmainsubprogrammainorstartingsubprogram}
+\hypertarget{chap:DWATmainsubprogrammainorstartingsubprogram}{}
subroutine entry
may contain a
\DWATmainsubprogram{}
}
A subroutine entry may
-\hypertarget{chap:DWATcallingconventionsubprogramcallingconvention}
+\hypertarget{chap:DWATcallingconventionsubprogramcallingconvention}{}
contain a
\DWATcallingconvention{}
attribute, whose value is an
}
A subprogram entry
-\hypertarget{chap:DWATelementalelementalpropertyofasubroutine}
+\hypertarget{chap:DWATelementalelementalpropertyofasubroutine}{}
may have
\addtoindexx{elemental attribute}
a
or property.
A
-\hypertarget{chap:DWATpurepurepropertyofasubroutine}
+\hypertarget{chap:DWATpurepurepropertyofasubroutine}{}
subprogram entry may have
\addtoindexx{pure attribute}
a
\label{chap:subroutineandentrypointreturntypes}
If
-\hypertarget{chap:DWATtypetypeofsubroutinereturn}
+\hypertarget{chap:DWATtypetypeofsubroutinereturn}{}
the subroutine or entry point
\addtoindexx{return type of subroutine}
is a function that returns a
Section \refersec{chap:codeaddressesandranges}).
A
-\hypertarget{chap:DWATentrypcentryaddressofsubprogram}
+\hypertarget{chap:DWATentrypcentryaddressofsubprogram}{}
subroutine entry may also have
\addtoindexx{entry pc attribute!for subroutine}
a
entry
\addtoindexx{address class!attribute}
points
-\hypertarget{chap:DWATaddressclasssubroutineorsubroutinetype}
+\hypertarget{chap:DWATaddressclasssubroutineorsubroutinetype}{}
may also have
\DWATsegment{}
and
has a child entry with the
tag \DWTAGcommoninclusionTARG.
The
-\hypertarget{chap:commonreferencecommonblockusage}
+\hypertarget{chap:commonreferencecommonblockusage}{}
common inclusion entry has a
\DWATcommonreference{} attribute
whose value is a \livelink{chap:classreference}{reference}
\label{chap:lowlevelinformation}
A
-\hypertarget{chap:DWATreturnaddrsubroutinereturnaddresssavelocation}
+\hypertarget{chap:DWATreturnaddrsubroutinereturnaddresssavelocation}{}
subroutine or entry point entry may have
\addtoindexx{return address attribute}
a
subroutine or entry point is stored.
A
-\hypertarget{chap:DWATframebasesubroutineframebaseaddress}
+\hypertarget{chap:DWATframebasesubroutineframebaseaddress}{}
subroutine or entry point entry may also have
\addtoindexx{frame base attribute}
a
debuggers to support this same kind of referencing.}
If
-\hypertarget{chap:DWATstaticlinklocationofuplevelframe}
+\hypertarget{chap:DWATstaticlinklocationofuplevelframe}{}
a
\addtoindexx{address!uplevel|see {static link attribute}}
\addtoindexx{uplevel address|see {static link attribute}}
information entry with the
\addtoindexx{subprogram entry!use for template instantiation}
tag \DWTAGsubprogram.
-With four
+With the following
exceptions, such an entry will contain the same attributes and
will have the same types of child entries as would an entry
for a subroutine defined explicitly using the instantiation
types. 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
-\addtoindexx{template type parameter entry}
-tag \DWTAGtemplatetypeparameterTARG.
-Each
-such entry has a \DWATname{} 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
-\addtoindexx{formal type parameter|see{template type parameter entry}}
-template type parameter entry also has
-\addtoindexx{type attribute}
-a \DWATtype{} attribute
-describing the actual type by which the formal is replaced
-for this instantiation.
-
-\item The subprogram entry and each of its child entries reference
-a template type parameter entry in any circumstance where
-the template definition referenced a formal parameterized type.
+\item Template parameters are described and referenced as specified in
+Section \refersec{chap:templateparameters}.
\item If the compiler has generated a special compilation unit
to hold the template instantiation and that compilation unit
The entry for a
\addtoindexx{subprogram entry!use in inlined subprogram}
subroutine that is
-\hypertarget{chap:DWATinlineinlinedsubroutine}
+\hypertarget{chap:DWATinlineinlinedsubroutine}{}
explicitly declared to be available for inline expansion or
that was expanded inline implicitly by the compiler has
\addtoindexx{inline attribute}
\subsubsection{Abstract Instances}
\label{chap:abstractinstances}
Any debugging information entry that is owned (either
-\hypertarget{chap:DWATinlineabstracttinstance}
+\hypertarget{chap:DWATinlineabstracttinstance}{}
directly or indirectly) by a debugging information entry
that contains the
\DWATinline{} attribute is referred to
generated for the inlined subroutine (see
Section \refersec{chap:codeaddressesandranges}).
An
-\hypertarget{chap:DWATentrypcentryaddressofinlinedsubprogram}
+\hypertarget{chap:DWATentrypcentryaddressofinlinedsubprogram}{}
inlined subroutine entry may
\addtoindexx{inlined subprogram entry!in concrete instance}
also
% Positions of the 3 targets here is a bit arbitrary.
An inlined
-\hypertarget{chap:DWATcalllinelinenumberofinlinedsubroutinecall}
+\hypertarget{chap:DWATcalllinelinenumberofinlinedsubroutinecall}{}
subroutine
-\hypertarget{chap:DWATcallcolumncolumnpositionofinlinedsubroutinecall}
+\hypertarget{chap:DWATcallcolumncolumnpositionofinlinedsubroutinecall}{}
entry
-\hypertarget{chap:DWATcallfilefilecontaininginlinedsubroutinecall}
+\hypertarget{chap:DWATcallfilefilecontaininginlinedsubroutinecall}{}
may also have \DWATcallfile,
\DWATcallline{} and \DWATcallcolumn{} attributes,
each of whose
}
An inlined subroutine entry
-\hypertarget{chap:DWATconstexprcompiletimeconstantfunction}
+\hypertarget{chap:DWATconstexprcompiletimeconstantfunction}{}
may have a
\DWATconstexpr{}
attribute, which is a \livelink{chap:classflag}{flag}
the abstract instance) and need include only attributes that
are specific to the concrete instance (but omitted in the
abstract instance). In place of these omitted attributes, each
-\hypertarget{chap:DWATabstractorigininlineinstance}
+\hypertarget{chap:DWATabstractorigininlineinstance}{}
concrete inlined instance entry
\addtoindexx{abstract origin attribute}
has a
out\dash of\dash line
\addtoindexx{abstract origin attribute}
instance
-\hypertarget{chap:DWATabstractoriginoutoflineinstance}
+\hypertarget{chap:DWATabstractoriginoutoflineinstance}{}
makes use of
\DWATabstractorigin{}
attributes in exactly the same way as they are used for
concrete instance tree for the outer subroutine according
to the rules in
Sections \refersec{chap:concreteinlinedinstances} or
-\refersec{chap:outoflineinstancesofinlinedsubroutines}
+\referfol{chap:outoflineinstancesofinlinedsubroutines}
, respectively,
and without regard to the fact that it is within an outer
concrete instance tree.
\label{chap:trampolines}
\textit{A trampoline is a compiler\dash generated subroutine that serves as
-\hypertarget{chap:DWATtrampolinetargetsubroutine}
+\hypertarget{chap:DWATtrampolinetargetsubroutine}{}
an intermediary in making a call to another subroutine. It may
adjust parameters and/or the result (if any) as appropriate
to the combined calling and called execution contexts.}
for the lexical \nolink{block}
(see Section \refersec{chap:codeaddressesandranges}).
+A
+\hypertarget{chap:DWATentrypcoflexicalblock}{}
+lexical block entry may also have
+\addtoindexx{entry pc attribute!for lexical block}
+a
+\DWATentrypc{} attribute
+whose value is the address of the first executable instruction
+of the lexical block (see
+Section \refersec{chap:entryaddress}).
+
If a name has been given to the
lexical \nolink{block}
in the source
for the with statement
(see Section \refersec{chap:codeaddressesandranges}).
+A
+\hypertarget{chap:DWATentrypcofwithstmt}{}
+with statement entry may also have
+\addtoindexx{entry pc attribute!for with statement}
+a
+\DWATentrypc{} attribute
+whose value is the address of the first executable instruction
+of the with statement (see
+Section \refersec{chap:entryaddress}).
+
+\needlines{5}
The with statement entry has
\addtoindexx{type attribute}
a \DWATtype{} attribute, denoting
(see Section
\refersec{chap:codeaddressesandranges}).
+A
+\hypertarget{chap:DWATentrypcoftryblock}{}
+\hypertarget{chap:DWATentrypcofcatchblock}{}
+try or catch block entry may also have
+\addtoindexx{entry pc attribute!for try block}
+\addtoindexx{entry pc attribute!for catch block}
+a
+\DWATentrypc{} attribute
+whose value is the address of the first executable instruction
+of the try or catch block (see
+Section \refersec{chap:entryaddress}).
+
Catch \livelink{chap:catchblock}{block} entries have at
least one child entry, an
entry representing the type of exception accepted by
\hline
\endlastfoot
\dotdebugabbrev{} & - & - & - & - \\
+\dotdebugaddr{} & x & x & x & 5 \\
\dotdebugaranges{} & 2 & 2 & 2 & 2 \\
\dotdebugframe{} & 1 & 3 & 4 & 4 \\
\dotdebuginfo{} & 2 & 3 & 4 & 5 \\
\dotdebugline{} & 2 & 3 & 4 & 4 \\
-\dotdebugloc{} & - & - & - & - \\
+\dotdebugloc{} & - & - & - & 5 \\
\dotdebugmacinfo{} & - & - & - & - \\
\dotdebugpubnames{} & 2 & 2 & 2 & 2 \\
\dotdebugpubtypes{} & x & 2 & 2 & 2 \\
-\dotdebugranges{} & x & - & - & - \\
+\dotdebugranges{} & x & - & - & 5 \\
\dotdebugstr{} & - & - & - & - \\
+\dotdebugstroffsets & x & x & x & 5 \\
\dotdebugtypes{} & x & x & 4 & 5 \\
\end{longtable}
\end{centering}
\item \doublequote{V5} means \addtoindex{DWARF Version 5}, published
\ifthenelse{\boolean{isdraft}}{\textit{<to be determined>}}{\docdate}.
\item \doublequote{-} means that a version number is not applicable
-(the section's header does not include a version).
+(the section does not include a header or the section's header does not include a version).
\item \doublequote{x} means that the section was not defined in that
version of the DWARF standard.
\item The version numbers for the \dotdebuginfo{} and \dotdebugtypes{}
sections must be the same.
+\item The version numbers for corresponding .debug\_<kind> and .debug\_<kind>.dwo
+sections are the same.
+
\end{itemize}
-\textit{For \dotdebugframe{}, section version 2 is unused.}
+\textit{For the \dotdebugframe{} section, version 2 is unused.}
Higher numbers are reserved for future use.
user\dash defined types.
If the scope of the declaration of a named type begins after
-\hypertarget{chap:DWATstartscopetypedeclaration}
+\hypertarget{chap:DWATstartscopetypedeclaration}{}
the low pc value for the scope most closely enclosing the
declaration, the declaration may have a
\DWATstartscope{}
is the default for the target architecture.
A base type entry has
-\hypertarget{chap:DWATbytesizedataobjectordatatypesize}
+\hypertarget{chap:DWATbytesizedataobjectordatatypesize}{}
either a \DWATbytesize{} attribute
-\hypertarget{chap:DWATbitsizebasetypebitsize}
+\hypertarget{chap:DWATbitsizebasetypebitsize}{}
or a \DWATbitsize{} attribute
\addtoindexx{bit size attribute}
whose \livelink{chap:classconstant}{integer constant} value
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}
+\hypertarget{chap:DWATdatabitoffsetbasetypebitlocation}{}
the base type entry may also have
\addtoindexx{bit size attribute}
a
is also used for bit field members
(see Section \refersec{chap:datamemberentries}).
It
-\hypertarget{chap:DWATbitoffsetbasetypebitlocation}
+\hypertarget{chap:DWATbitoffsetbasetypebitlocation}{}
replaces the attribute
\DWATbitoffset{}
when used for base
or
\addtoindexx{digit count attribute}
unsigned.
-\hypertarget{chap:DWATdecimalsigndecimalsignrepresentation}
+\hypertarget{chap:DWATdecimalsigndecimalsignrepresentation}{}
These
-\hypertarget{chap:DWATdigitcountdigitcountforpackeddecimalornumericstringtype}
+\hypertarget{chap:DWATdigitcountdigitcountforpackeddecimalornumericstringtype}{}
base types are used in combination with
\DWATdecimalsign,
\DWATdigitcount{} and
value that represents the number of digits in an instance of
the type.
-\hypertarget{chap:DWATdecimalscaledecimalscalefactor}
+\hypertarget{chap:DWATdecimalscaledecimalscalefactor}{}
The \DWATdecimalscale{}
attribute
\addtoindexx{decimal scale attribute}
The \DWATEedited{}
base
-\hypertarget{chap:DWATpicturestringpicturestringfornumericstringtype}
+\hypertarget{chap:DWATpicturestringpicturestringfornumericstringtype}{}
type is used to represent an edited
numeric or alphanumeric data type. It is used in combination
with a \DWATpicturestring{} attribute whose value is a
\DWATEpackeddecimal{}
and \DWATEnumericstring{} base types.
-\hypertarget{chap:DWATbinaryscalebinaryscalefactorforfixedpointtype}
+\hypertarget{chap:DWATbinaryscalebinaryscalefactorforfixedpointtype}{}
For a data type with a binary scale factor, the fixed
\addtoindexx{binary scale attribute}
binary type entry has a
bits on the left are not stored in an instance of the type.
For
-\hypertarget{chap:DWATsmallscalefactorforfixedpointtype}
+\hypertarget{chap:DWATsmallscalefactorforfixedpointtype}{}
a data type with a non\dash decimal and non\dash binary scale factor,
the fixed binary type entry has a
\DWATsmall{} attribute which
may
\addtoindexx{address class!attribute}
have
-\hypertarget{chap:DWATadressclasspointerorreferencetypes}
+\hypertarget{chap:DWATadressclasspointerorreferencetypes}{}
a
\DWATaddressclass{}
attribute to describe how objects having the given pointer
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 \DWATordering{} attribute whose
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
A structure type, union type or class type entry may have
either a \DWATbytesize{} or a
\DWATbitsize{} attribute
-\hypertarget{chap:DWATbitsizedatamemberbitsize}
+\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,
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}),
an incomplete declaration
An inheritance entry
\addtoindexx{inheritance entry}
for a class that derives from or extends
-\hypertarget{chap:DWATdatamemberlocationinheritedmemberlocation}
+\hypertarget{chap:DWATdatamemberlocationinheritedmemberlocation}{}
another class or struct also has
\addtoindexx{data member location attribute}
a
An
\addtoindexx{inheritance entry}
inheritance entry
-\hypertarget{chap:DWATaccessibilitycppinheritedmembers}
+\hypertarget{chap:DWATaccessibilitycppinheritedmembers}{}
may
\addtoindexx{accessibility attribute}
have a
struct or union.
If
-\hypertarget{chap:DWATvirtualityvirtualityofbaseclass}
+\hypertarget{chap:DWATvirtualityvirtualityofbaseclass}{}
the class referenced by the
\addtoindexx{inheritance entry}
inheritance entry serves
or structure qualifiers.
An access declaration entry
-\hypertarget{chap:DWATaccessibilitycppbaseclasses}
+\hypertarget{chap:DWATaccessibilitycppbaseclasses}{}
also
has a
\DWATaccessibility{}
Each \doublequote{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
is assumed for an entry of a structure, union, or interface.
A data member
-\hypertarget{chap:DWATmutablemutablepropertyofmemberdata}
+\hypertarget{chap:DWATmutablemutablepropertyofmemberdata}{}
entry
\addtoindexx{member entry (data)}
may
The member entry
\addtoindexx{member entry (data)}
corresponding to a data member that is
-\hypertarget{chap:DWATdatabitoffsetdatamemberbitlocation}
+\hypertarget{chap:DWATdatabitoffsetdatamemberbitlocation}{}
defined
-\hypertarget{chap:DWATdatamemberlocationdatamemberlocation}
+\hypertarget{chap:DWATdatamemberlocationdatamemberlocation}{}
in a structure, union or class may have either
\addtoindexx{data member location attribute}
a
as non\dash member global subroutine entries
(see Section \refersec{chap:subroutineandentrypointentries}).
+\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
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
\DWATvirtuality{} attribute.
If
-\hypertarget{chap:DWATexplicitexplicitpropertyofmemberfunction}
+\hypertarget{chap:DWATexplicitexplicitpropertyofmemberfunction}{}
the member function entry describes an explicit member
function, then that entry has
\addtoindexx{explicit attribute}
\DWATexplicit{} attribute.
An
-\hypertarget{chap:DWATvtableelemlocationvirtualfunctiontablevtableslot}
+\hypertarget{chap:DWATvtableelemlocationvirtualfunctiontablevtableslot}{}
entry for a virtual function also has a
\DWATvtableelemlocation{}
\addtoindexi{attribute}{vtable element location attribute} whose value contains
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
\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 \DWTAGclasstype,
\DWTAGstructuretype{} or
-\DWTAGuniontype. With five
+\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
-\DWTAGtemplatetypeparameter. Each
-such entry may have a \DWATname{} 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
-\DWATtype{} 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 \DWTAGtemplatevalueparameterTARG.
-Each
-such entry may have a
-\DWATname{} 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
-\DWATtype{} attribute
-describing the type of the parameterized value. Finally,
-the template value parameter entry has a
-\DWATconstvalue{}
-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
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
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 \DWTAGvariantTARG{}
and is a child of the variant part entry. The value that
\needlines{5}
Alternatively,
-\hypertarget{chap:DWATdiscrlistlistofdiscriminantvalues}
+\hypertarget{chap:DWATdiscrlistlistofdiscriminantvalues}{}
the variant entry may contain
\addtoindexx{discriminant list attribute}
a
\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
\DWATname{} attribute, whose
\addtoindexx{name attribute}
value is a null\dash terminated string containing the name of the
-\hypertarget{chap:DWATconstvalueenumerationliteralvalue}
+\hypertarget{chap:DWATconstvalueenumerationliteralvalue}{}
enumeration literal as it appears in the source program.
Each enumerator entry also has a
\DWATconstvalue{} attribute,
If the enumeration type occurs as the description of a
\addtoindexx{enumeration type endry!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
\DWATbytestride{}
or \DWATbitstride{} attribute
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}
The
-\hypertarget{chap:DWATstringlengthstringlengthofstringtype}
+\hypertarget{chap:DWATstringlengthstringlengthofstringtype}{}
string type entry may also have a
\DWATstringlength{} attribute
whose
storage needed to hold a value of the subrange type.
The
-\hypertarget{chap:DWATthreadsscaledupcarrayboundthreadsscalfactor}
+\hypertarget{chap:DWATthreadsscaledupcarrayboundthreadsscalfactor}{}
subrange entry may have
\addtoindexx{threads scaled attribute}
a
\end{lstlisting}
The
-\hypertarget{chap:DWATlowerboundlowerboundofsubrange}
+\hypertarget{chap:DWATlowerboundlowerboundofsubrange}{}
subrange
-\hypertarget{chap:DWATupperboundupperboundofsubrange}
+\hypertarget{chap:DWATupperboundupperboundofsubrange}{}
entry may have the attributes
\DWATlowerbound{}
\addtoindexx{lower bound attribute}
and upper bound values of the subrange. The
\DWATupperbound{}
attribute
-\hypertarget{chap:DWATcountelementsofsubrangetype}
+\hypertarget{chap:DWATcountelementsofsubrangetype}{}
may
% FIXME: The following matches DWARF4: odd as there is no default count.
\addtoindexx{count attribute!default}
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
objects of this type may point.
The \addtoindexx{pointer to member} entry also
-\hypertarget{chap:DWATcontainingtypecontainingtypeofpointertomembertype}
+\hypertarget{chap:DWATcontainingtypecontainingtypeofpointertomembertype}{}
has a
\DWATcontainingtype{}
attribute, whose value is a \livelink{chap:classreference}{reference} to a debugging
objects of this type may point.
The \addtoindex{pointer to member entry}
-\hypertarget{chap:DWATuselocationmemberlocationforpointertomembertype}
+\hypertarget{chap:DWATuselocationmemberlocationforpointertomembertype}{}
has a
\DWATuselocation{} attribute
\addtoindexx{use location attribute}
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 \DWATuselocation{} description
information, including a location and/or run\dash time parameters,
about the data that represents the value for that object.}
-\hypertarget{chap:DWATdatalocationindirectiontoactualdata}
+\hypertarget{chap:DWATdatalocationindirectiontoactualdata}{}
The \DWATdatalocation{}
attribute may be used with any
\addtoindexx{data location attribute}
may be dynamically allocated or associated with a variable
under explicit program control.}
-\hypertarget{chap:DWATallocatedallocationstatusoftypes}
+\hypertarget{chap:DWATallocatedallocationstatusoftypes}{}
The
\DWATallocated{}
attribute
an object of the type is
currently allocated or not.
-\hypertarget{chap:DWATassociatedassociationstatusoftypes}
+\hypertarget{chap:DWATassociatedassociationstatusoftypes}{}
The
\DWATassociated{} attribute
may
\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}
\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
-\DWATtype{} 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
-\DWTAGtemplatetypeparameter.
-Each such entry may have
-a \DWATname{} 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 \DWATtype{} 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
-\DWTAGtemplatevalueparameter.
-Each such entry may have
-a \DWATname{} 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 \DWATtype{} attribute describing
-the type of the parameterized value. Finally, the template
-value parameter entry has a \DWATconstvalue{}
-attribute, whose value is the actual constant value of the value parameter for
-this instantiation as represented on the target architecture.
-\end{enumerate}
+the source program.
+The template alias entry has child entries describing the template
+actual parameters (see Section \refersec{chap:templateparameters}).