last several months.
Signed-off-by: Ron Brender <ron.brender@gmail.com>
cannot be considered definitive.
In the following table,
-\addtoindex{DECL}
+\addtoindex{DECL}
+\livetarg{chap:DECL}
means include all three of the
\addtoindex{declaration coordinates}
\addtoindexx{declaration coordinates|see {DW\_AT\_decl\_file,DW\_AT\_decl\_line, DW\_AT\_decl\_column}}
\endlastfoot
\livelink{chap:DWTAGaccessdeclaration}{DW\_TAG\_access\_declaration}
-& DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATdescription}{DW\_AT\_description} \\
&\livelink{chap:DWATname}{DW\_AT\_name} \\
\hline
\livelink{chap:DWTAGarraytype}{DW\_TAG\_array\_type}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATallocated}{DW\_AT\_allocated} \\
\hline
\livelink{chap:DWTAGbasetype}{DW\_TAG\_base\_type}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATallocated}{DW\_AT\_allocated} \\
&\livelink{chap:DWATassociated}{DW\_AT\_associated} \\
&\livelink{chap:DWATbinaryscale}{DW\_AT\_binary\_scale} \\
\hline
\livelink{chap:DWTAGcatchblock}{DW\_TAG\_catch\_block}
-&DECL \\*
+&\livelink{chap:DECL}{DECL} \\*
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWAThighpc}{DW\_AT\_high\_pc} \\
&\livelink{chap:DWATlowpc}{DW\_AT\_low\_pc} \\
\hline
\livelink{chap:DWTAGclasstype}{DW\_TAG\_class\_type}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATallocated}{DW\_AT\_allocated} \\
\hline
\livelink{chap:DWTAGcommonblock}{DW\_TAG\_common\_block}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATdeclaration}{DW\_AT\_declaration} \\
&\livelink{chap:DWATdescription}{DW\_AT\_description} \\
&\livelink{chap:DWATlinkagename}{DW\_AT\_linkage\_name} \\
\hline
\livelink{chap:DWTAGcommoninclusion}{DW\_TAG\_common\_inclusion}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATcommonreference}{DW\_AT\_common\_reference} \\
&\livelink{chap:DWATdeclaration}{DW\_AT\_declaration} \\
&\livelink{chap:DWATsibling}{DW\_AT\_sibling} \\
\hline
\livelink{chap:DWTAGcondition}{DW\_TAG\_condition}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATname}{DW\_AT\_name} \\
&\livelink{chap:DWATsibling}{DW\_AT\_sibling} \\
\hline
\livelink{chap:DWTAGconstant}{DW\_TAG\_constant}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATconstvalue}{DW\_AT\_const\_value} \\
&\livelink{chap:DWATdeclaration}{DW\_AT\_declaration} \\
\hline
\livelink{chap:DWTAGentrypoint}{DW\_TAG\_entry\_point}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATaddressclass}{DW\_AT\_address\_class} \\
&\livelink{chap:DWATdescription}{DW\_AT\_description} \\
&\livelink{chap:DWATframebase}{DW\_AT\_frame\_base} \\
\hline
\livelink{chap:DWTAGenumerationtype}{DW\_TAG\_enumeration\_type}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATallocated}{DW\_AT\_allocated} \\
\hline
\livelink{chap:DWTAGenumerator}{DW\_TAG\_enumerator}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATconstvalue}{DW\_AT\_const\_value} \\
&\livelink{chap:DWATdescription}{DW\_AT\_description} \\
&\livelink{chap:DWATname}{DW\_AT\_name} \\
\hline
\livelink{chap:DWTAGfiletype}{DW\_TAG\_file\_type}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATallocated}{DW\_AT\_allocated} \\
&\livelink{chap:DWATassociated}{DW\_AT\_associated} \\
\hline
\livelink{chap:DWTAGformalparameter}{DW\_TAG\_formal\_parameter}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATartificial}{DW\_AT\_artificial} \\
&\livelink{chap:DWATconstvalue}{DW\_AT\_const\_value} \\
\hline
\livelink{chap:DWTAGfriend}{DW\_TAG\_friend}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATfriend}{DW\_AT\_friend} \\
&\livelink{chap:DWATsibling}{DW\_AT\_sibling} \\
\hline
\livelink{chap:DWTAGimporteddeclaration}{DW\_TAG\_imported\_declaration}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATdescription}{DW\_AT\_description} \\
&\livelink{chap:DWATimport}{DW\_AT\_import} \\
\hline
\livelink{chap:DWTAGimportedmodule}{DW\_TAG\_imported\_module}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATimport}{DW\_AT\_import} \\
&\livelink{chap:DWATsibling}{DW\_AT\_sibling} \\
&\livelink{chap:DWATstartscope}{DW\_AT\_start\_scope} \\
\hline
\livelink{chap:DWTAGinheritance}{DW\_TAG\_inheritance}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATdatamemberlocation}{DW\_AT\_data\_member\_location} \\
&\livelink{chap:DWATsibling}{DW\_AT\_sibling} \\
\hline
\livelink{chap:DWTAGinterfacetype}{DW\_TAG\_interface\_type}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATdescription}{DW\_AT\_description} \\
&\livelink{chap:DWATname}{DW\_AT\_name} \\
\hline
\livelink{chap:DWTAGlabel}{DW\_TAG\_label}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATdescription}{DW\_AT\_description} \\
&\livelink{chap:DWATlowpc}{DW\_AT\_low\_pc} \\
\hline
\livelink{chap:DWTAGlexicalblock}{DW\_TAG\_lexical\_block}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATdescription}{DW\_AT\_description} \\
&\livelink{chap:DWAThighpc}{DW\_AT\_high\_pc} \\
\hline
\livelink{chap:DWTAGmember}{DW\_TAG\_member}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATbitoffset}{DW\_AT\_bit\_offset} \\
&\livelink{chap:DWATbitsize}{DW\_AT\_bit\_size} \\
\hline
\livelink{chap:DWTAGmodule}{DW\_TAG\_module}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATdeclaration}{DW\_AT\_declaration} \\
&\livelink{chap:DWATdescription}{DW\_AT\_description} \\
\hline
\livelink{chap:DWTAGnamelist}{DW\_TAG\_namelist}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATdeclaration}{DW\_AT\_declaration} \\
\hline
\livelink{chap:DWTAGnamelistitem}{DW\_TAG\_namelist\_item}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATnamelistitem}{DW\_AT\_namelist\_item} \\
&\livelink{chap:DWATsibling}{DW\_AT\_sibling} \\
\hline
\livelink{chap:DWTAGnamespace}{DW\_TAG\_namespace}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATdescription}{DW\_AT\_description} \\
&\livelink{chap:DWATextension}{DW\_AT\_extension} \\
&\livelink{chap:DWATname}{DW\_AT\_name} \\
\hline
\livelink{chap:DWTAGpointertype}{DW\_TAG\_pointer\_type}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATaddressclass}{DW\_AT\_address\_class} \\
&\livelink{chap:DWATallocated}{DW\_AT\_allocated} \\
&\livelink{chap:DWATassociated}{DW\_AT\_associated} \\
\hline
\livelink{chap:DWTAGptrtomembertype}{DW\_TAG\_ptr\_to\_member\_type}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATaddressclass}{DW\_AT\_address\_class} \\
&\livelink{chap:DWATallocated}{DW\_AT\_allocated} \\
\hline
\livelink{chap:DWTAGrvaluereferencetype}{DW\_TAG\_rvalue\_reference\_type}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATaddressclass}{DW\_AT\_address\_class} \\
&\livelink{chap:DWATallocated}{DW\_AT\_allocated} \\
&\livelink{chap:DWATassociated}{DW\_AT\_associated} \\
\hline
\livelink{chap:DWTAGsettype}{DW\_TAG\_set\_type}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATallocated}{DW\_AT\_allocated} \\
\hline
\livelink{chap:DWTAGstringtype}{DW\_TAG\_string\_type}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATallocated}{DW\_AT\_allocated} \\
\hline
\livelink{chap:DWTAGstructuretype}{DW\_TAG\_structure\_type}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATallocated}{DW\_AT\_allocated} \\
\hline
\livelink{chap:DWTAGsubprogram}{DW\_TAG\_subprogram}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATaddressclass}{DW\_AT\_address\_class} \\
\hline
\livelink{chap:DWTAGsubrangetype}{DW\_TAG\_subrange\_type}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATallocated}{DW\_AT\_allocated} \\
\hline
\livelink{chap:DWTAGsubroutinetype}{DW\_TAG\_subroutine\_type}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATaddressclass}{DW\_AT\_address\_class} \\
\hline
\livelink{chap:DWTAGtemplatealias}{DW\_TAG\_template\_alias}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATallocated}{DW\_AT\_allocated} \\
\hline
\livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATdescription}{DW\_AT\_description} \\
&\livelink{chap:DWATname}{DW\_AT\_name} \\
&\livelink{chap:DWATsibling}{DW\_AT\_sibling} \\
\hline
\livelink{chap:DWTAGtemplatevalueparameter}{DW\_TAG\_template\_value\_parameter}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATconstvalue}{DW\_AT\_const\_value} \\
&\livelink{chap:DWATdescription}{DW\_AT\_description} \\
&\livelink{chap:DWATname}{DW\_AT\_name} \\
\hline
\livelink{chap:DWTAGthrowntype}{DW\_TAG\_thrown\_type}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATallocated}{DW\_AT\_allocated} \\
&\livelink{chap:DWATassociated}{DW\_AT\_associated} \\
&\livelink{chap:DWATdatalocation}{DW\_AT\_data\_location} \\
\hline
\livelink{chap:DWTAGtryblock}{DW\_TAG\_try\_block}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWAThighpc}{DW\_AT\_high\_pc} \\
&\livelink{chap:DWATlowpc}{DW\_AT\_low\_pc} \\
\hline
\livelink{chap:DWTAGtypedef}{DW\_TAG\_typedef}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATallocated}{DW\_AT\_allocated} \\
\hline
\livelink{chap:DWTAGuniontype}{DW\_TAG\_union\_type}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATallocated}{DW\_AT\_allocated} \\
\hline
\livelink{chap:DWTAGunspecifiedparameters}{DW\_TAG\_unspecified\_parameters}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATartificial}{DW\_AT\_artificial} \\
&\livelink{chap:DWATsibling}{DW\_AT\_sibling} \\
\hline
\livelink{chap:DWTAGunspecifiedtype}{DW\_TAG\_unspecified\_type}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATdescription}{DW\_AT\_description} \\
&\livelink{chap:DWATname}{DW\_AT\_name} \\
\hline
\livelink{chap:DWTAGvariable}{DW\_TAG\_variable}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATconstexpr}{DW\_AT\_const\_expr} \\
\hline
\livelink{chap:DWTAGvariant}{DW\_TAG\_variant}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATdeclaration}{DW\_AT\_declaration} \\
\hline
\livelink{chap:DWTAGvariantpart}{DW\_TAG\_variant\_part}
-&DECL \\
+&\livelink{chap:DECL}{DECL} \\
&\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} \\
&\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility} \\
&\livelink{chap:DWATdeclaration}{DW\_AT\_declaration} \\
from a single compilation might contain sections
named:
\begin{alltt}
- \addtoindex{.data}
- \addtoindex{.text}
- \addtoindex{.debug\_info}
- \addtoindex{.debug\_abbrev}
- \addtoindex{.debug\_line}
- \addtoindex{.debug\_aranges}
+ \dotdata{}
+ \dottext{}
+ \dotdebuginfo{}
+ \dotdebugabbrev{}
+ \dotdebugline{}
+ \dotdebugaranges{}
\end{alltt}
A relocatable object from a compilation system
attempting duplicate DWARF elimination might
contain sections as in:
\begin{alltt}
- \addtoindex{.data}
- \addtoindex{.text}
- \addtoindex{.debug\_info}
- \addtoindex{.debug\_abbrev}
- \addtoindex{.debug\_line}
- \addtoindex{.debug\_aranges}
+ \dotdata{}
+ \dottext{}
+ \dotdebuginfo{}
+ \dotdebugabbrev{}
+ \dotdebugline{}
+ \dotdebugaranges{}
\end{alltt}
followed (or preceded, the order is not significant)
section groups:
\begin{alltt}
==== Section group 1
- \addtoindex{.debug\_info}
- \addtoindex{.debug\_abbrev}
- \addtoindex{.debug\_line}
+ \dotdebuginfo{}
+ \dotdebugabbrev{}
+ \dotdebugline{}
==== ...
==== Section group N
- \addtoindex{.debug\_info}
- \addtoindex{.debug\_abbrev}
- \addtoindex{.debug\_line}
+ \dotdebuginfo{}
+ \dotdebugabbrev{}
+ \dotdebugline{}
\end{alltt}
where each \addtoindex{section group} might or might not contain executable
-code (\textit{.text} sections) or data (\textit{.data} sections).
+code (\dottext{} sections) or data (\dotdata{} sections).
\needlines{6}
A \textit{\addtoindex{section group}} is a named set
facilities such as simple relocations) are:
\begin{enumerate}[1. ]
-\item A means of referencing from inside one \addtoindex{.debug\_info}
+\item A means of referencing from inside one \dotdebuginfo{}
compilation unit to another
-\addtoindex{.debug\_info} compilation unit
+\dotdebuginfo{} compilation unit
(\livelink{chap:DWFORMrefaddr}{DW\_FORM\_ref\_addr} provides this).
\item A means of having multiple contributions to specific sections
-(for example, \addtoindex{.debug\_info}, and so on) in a single object file.
+(for example, \dotdebuginfo{}, and so on) in a single object file.
\item A means of identifying a \addtoindex{section group} (giving it a name).
So, for example, the \addtoindex{section group}
corresponding to file wa.h
-above is given the name \textit{my.compiler.company.cpp.wa.h.123456}.
+above is given the name \texttt{my.compiler.company.cpp.wa.h.123456}.
In general, every point in the
\addtoindexx{section group}
section group
-\addtoindex{.debug\_info} that
+\dotdebuginfo{} that
could be referenced from outside by \emph{any} compilation unit must
normally have an external name generated for it in the linker
symbol table, whether the current compilation references all
compilation unit.
When referencing into a removable \addtoindex{section group}
-\addtoindex{.debug\_info}
-from another \addtoindex{.debug\_info} (from anywhere), the
+\dotdebuginfo{}
+from another \dotdebuginfo{} (from anywhere), the
\texttt{<prefix>.<file-designator>.<gid-number>.<die-number>}
name should be used for an external symbol and a relocation
generated based on that name.
\textit{When referencing into a
\addtoindexx{section group}
non-section group
-\addtoindex{.debug\_info},
-from another \addtoindex{.debug\_info} (from anywhere)
+\dotdebuginfo{},
+from another \dotdebuginfo{} (from anywhere)
\livelink{chap:DWFORMrefaddr}{DW\_FORM\_ref\_addr} is
still the form to be used, but a section\dash relative relocation
generated by use of a non-exported name (often called an
In these examples, the focus is on the arrangement of DWARF
information into sections (specifically the
-\addtoindex{.debug\_info}
+\dotdebuginfo{}
section) and the naming conventions used to achieve references
into
\addtoindexx{section group}
section groups.
In practice, all of the examples that
follow involve DWARF sections other than just
-\addtoindex{.debug\_info}
-(for example, \addtoindex{.debug\_line},
-\addtoindex{.debug\_aranges}, or others);
-however, only the \addtoindex{.debug\_info}
+\dotdebuginfo{}
+(for example, \dotdebugline{},
+\dotdebugaranges{}, or others);
+however, only the \dotdebuginfo{}
section is shown to keep the
examples compact and easier to read.
\begin{alltt}
==== Section group name:
my.compiler.company.cpp.wa.h.123456
-== section \addtoindex{.debug\_info}
+== section \dotdebuginfo{}
DW.cpp.wa.h.123456.1: ! linker global symbol
\livelink{chap:DWTAGcompileunit}{DW\_TAG\_compile\_unit}
\livelink{chap:DWATlanguage}{DW\_AT\_language}(\livelink{chap:DWLANGCplusplus}{DW\_LANG\_C\_plus\_plus})
\begin{figure}
\begin{dwflisting}
\begin{alltt}
-== section .text
+== section \dottext{}
[generated code for function f]
-== section \addtoindex{.debug\_info}
+== section \dotdebuginfo{}
\livelink{chap:DWTAGcompileunit}{DW\_TAG\_compile\_unit}
.L1: ! local (non-linker) symbol
\livelink{chap:DWTAGreferencetype}{DW\_TAG\_reference\_type}
my.f90.company.f90.CommonStuff.fh.654321
-== section \addtoindex{.debug\_info}
+== section \dotdebuginfo{}
DW.myf90.CommonStuff.fh.654321.1: ! linker global symbol
\livelink{chap:DWTAGpartialunit}{DW\_TAG\_partial\_unit}
\begin{figure}
\begin{dwflisting}
\begin{alltt}
-== section .text
+== section \dottext{}
[code for function Foo]
-== section \addtoindex{.debug\_info}
+== section \dotdebuginfo{}
\livelink{chap:DWTAGcompileunit}{DW\_TAG\_compile\_unit}
\livelink{chap:DWTAGsubprogram}{DW\_TAG\_subprogram}
\livelink{chap:DWATname}{DW\_AT\_name}("Foo")
\needlines{3}
That main program results in an object file that
contained a duplicate of the \addtoindex{section group} named
-my.f90.company.f90.CommonStuff.fh.654321
+\texttt{my.f90.company.f90.CommonStuff.fh.654321}
corresponding to the
included file as well as the remainder of the main subprogram
as shown in
\begin{figure}
\begin{dwflisting}
\begin{alltt}
-== section \addtoindex{.debug\_info}
+== section \dotdebuginfo{}
\livelink{chap:DWTAGcompileunit}{DW\_TAG\_compile\_unit}
\livelink{chap:DWATname}{DW\_AT\_name}(F90\$main)
\livelink{chap:DWTAGbasetype}{DW\_TAG\_base\_type}
in a typical compilation environment, many types are duplicated
many times. One method of controlling the amount of duplication
is separating each type into a separate
-\addtoindex{.debug\_types} section
+\dotdebugtypes{} section
and arranging for the linker to recognize and eliminate
duplicates at the individual type level.
of each of these debug sections:
\begin{alltt}
-\addtoindex{.debug\_abbrev}
-\addtoindex{.debug\_info}
-\addtoindex{.debug\_line}
+\dotdebugabbrev{}
+\dotdebuginfo{}
+\dotdebugline{}
\end{alltt}
and any number of these additional sections:
\begin{alltt}
-\addtoindex{.debug\_types}
+\dotdebugtypes{}
\end{alltt}
As discussed in the previous section
will include only one copy of a \addtoindex{section group}
(or individual section) for any given key.
For
-\addtoindex{.debug\_types} sections, the
+\dotdebugtypes{} sections, the
key is the \addtoindex{type signature}
formed from the algorithm given in
Section \refersec{datarep:typesignaturecomputation}.
\end{figure}
\needlines{3}
-In computing a signature for the type N::C, flatten the type
+In computing a signature for the type \texttt{N::C}, flatten the type
\addtoindexx{type signature}
description into a byte stream according to the procedure
outlined in
\end{center}
\end{figure}
-In this example, the structure types N::A and N::C have each
+In this example, the structure types \texttt{N::A} and \texttt{N::C} have each
been placed in separate
\addtoindexx{type unit}
-type units. For N::A, the actual
+type units. For \texttt{N::A}, the actual
definition of the type begins at label L1. The definition
involves references to the int base type and to two pointer
types. The information for each of these referenced types is
types are trivial types that are not worth the overhead of a
separate \addtoindex{type unit}.
The last pointer type contains a reference
-to an incomplete type N::B, which is also included here as
+to an incomplete type \texttt{N::B}, which is also included here as
a declaration, since the complete type is unknown and its
signature is therefore unavailable. There is also a reference
-to N::C, using
+to \texttt{N::C}, using
\livelink{chap:DWFORMrefsig8}{DW\_FORM\_ref\_sig8} to
refer to the type signature
\addtoindexx{type signature}
for that type.
-In computing a signature for the type N::A, flatten the type
+In computing a signature for the type \texttt{N::A}, flatten the type
description into a byte stream according to the procedure
outlined in
Section \refersec{datarep:typesignaturecomputation}.
A source file that includes this header file may declare a
-variable of type N::A, and its DWARF information may look
+variable of type \texttt{N::A}, and its DWARF information may look
like that shown in
Figure \refersec{fig:typesignatureexampleusage}.
\addtoindexx{section group}
into non-section group
sections such as the base object file
-\addtoindex{.debug\_info} section.
+\dotdebuginfo{} section.
\subsection{Eliminating function duplication}
\label{app:eliminatingfunctionduplication}
References to other
-\addtoindex{.debug\_info} sections follow the approach
+\dotdebuginfo{} sections follow the approach
suggested above, but the naming rule is slightly
different in that the \texttt{\textless file-designator\textgreater}
should be interpreted as a \texttt{\textless file-designator\textgreater}.
There will also be a compilation unit that has the file\dash level
declarations and definitions. Other per\dash function compilation
-unit DWARF information (
-\addtoindex{.debug\_info}) points to this common
-file\dash level compilation unit using \livelink{chap:DWTAGimportedunit}{DW\_TAG\_imported\_unit}.
+unit DWARF information (\dotdebuginfo{}) points to this common
+file\dash level compilation unit using
+\livelink{chap:DWTAGimportedunit}{DW\_TAG\_imported\_unit}.
Section groups can use \livelink{chap:DWFORMrefaddr}{DW\_FORM\_ref\_addr} and internal labels
(section\dash relative relocations) to refer to the main object
\hypertarget{chap:DWATconstexprcompiletimeconstantobject}
is a \livelink{chap:flag}{flag}, if a
variable entry represents a C++ object declared with the
-\textit{constexpr} specifier. This attribute indicates that the
+\texttt{constexpr} specifier. This attribute indicates that the
variable can be evaluated as a compile\dash time constant.
\textit{In C++,
-a variable declared with constexpr is implicitly const. Such a
+a variable declared with \texttt{constexpr} is implicitly \texttt{const}. Such a
variable has a \livelink{chap:DWATtype}{DW\_AT\_type} attribute whose value is a reference
to a debugging information entry describing a const qualified type.}
value range for vendor specific extensions consist of the
appropriate prefix (DW\_TAG, DW\_AT, DW\_END, DW\_ATE, DW\_OP,
DW\_LANG, DW\_LNE, DW\_CC or DW\_CFA respectively) followed by
+\livetarg{chap:DWXXXlohiuser}
\_lo\_user or \_hi\_user.
\textit{For example, for entry tags, the special
-labels are \livetarg{chap:DWTAGlouser}{DW\_TAG\_lo\_user} and
-\livetarg{chap:DWTAGhiuser}{DW\_TAG\_hi\_user}.}
-Values in the
-range between \textit{prefix}\_lo\_user and \textit{prefix}\_hi\_user inclusive,
+labels are DW\_TAG\_lo\_user and DW\_TAG\_hi\_user.}
+Values in the range between \textit{prefix}\_lo\_user
+and \textit{prefix}\_hi\_user inclusive,
are reserved for vendor specific extensions. Vendors may
use values in this range without conflicting with current or
future system\dash defined values. All other values are reserved
\label{datarep:initiallengthvalues}
\addtoindexx{reserved values!initial length}
-An \addtoindex{initial length field} is one of the length fields that occur
+An \livetarg{datarep:initiallengthvalues}{initial length field} is one of the length fields that occur
at the beginning
of those DWARF sections that
have a header
-(\addtoindex{.debug\_aranges},
-\addtoindex{.debug\_info},
-\addtoindex{.debug\_types},
-\addtoindex{.debug\_line},
-\addtoindex{.debug\_pubnames}, and
-\addtoindex{.debug\_pubtypes}) or the length field
+(\dotdebugaranges{},
+\dotdebuginfo{},
+\dotdebugtypes{},
+\dotdebugline{},
+\dotdebugpubnames{}, and
+\dotdebugpubtypes{}) or the length field
that occurs at the beginning of the CIE and FDE structures
-in the \addtoindex{.debug\_frame} section.
+in the \dotdebugframe{} section.
In an \addtoindex{initial length field}, the values \wfffffffzero through
\wffffffff are reserved by DWARF to indicate some form of
\section{32-Bit and 64-Bit DWARF Formats}
\label{datarep:32bitand64bitdwarfformats}
-
+\hypertarget{datarep:xxbitdwffmt}{}
\addtoindexx{32-bit DWARF format}
\addtoindexx{64-bit DWARF format}
There are two closely related file formats. In the 32\dash bit DWARF
detect that a DWARF section contribution is using the 64\dash bit
format and to adapt its processing accordingly.}
-\item Section offset and section length
+\item Section offset and section length
+\hypertarget{datarep:sectionoffsetlength}{}
\addtoindexx{section length!use in headers}
fields that occur
\addtoindexx{section offset!use in headers}
\begin{center}
\begin{tabular}{lll}
Section &Name & Role \\ \hline
-\addtoindex{.debug\_aranges} & \addtoindex{debug\_info\_offset} & offset in \addtoindex{.debug\_info} \\
-\addtoindex{.debug\_frame}/CIE & \addtoindex{CIE\_id} & CIE distinguished value \\
-\addtoindex{.debug\_frame}/FDE & \addtoindex{CIE\_pointer} & offset in \addtoindex{.debug\_frame} \\
-\addtoindex{.debug\_info} & \addtoindex{debug\_abbrev\_offset} & offset in \addtoindex{.debug\_abbrev} \\
-\addtoindex{.debug\_line} & \addtoindex{header\_length} & length of header itself \\
-\addtoindex{.debug\_pubnames} & \addtoindex{debug\_info\_offset} & offset in \addtoindex{.debug\_info} \\
- & \addtoindex{debug\_info\_length} & length of \addtoindex{.debug\_info} \\
+\dotdebugaranges{} & \addtoindex{debug\_info\_offset} & offset in \dotdebuginfo{} \\
+\dotdebugframe{}/CIE & \addtoindex{CIE\_id} & CIE distinguished value \\
+\dotdebugframe{}/FDE & \addtoindex{CIE\_pointer} & offset in \dotdebugframe{} \\
+\dotdebuginfo{} & \addtoindex{debug\_abbrev\_offset} & offset in \dotdebugabbrev{} \\
+\dotdebugline{} & \addtoindex{header\_length} & length of header itself \\
+\dotdebugpubnames{} & \addtoindex{debug\_info\_offset} & offset in \dotdebuginfo{} \\
+ & \addtoindex{debug\_info\_length} & length of \dotdebuginfo{} \\
& & contribution \\
-\addtoindex{.debug\_pubtypes} & \addtoindex{debug\_info\_offset} & offset in \addtoindex{.debug\_info} \\
- & \addtoindex{debug\_info\_length} & length of \addtoindex{.debug\_info} \\
+\dotdebugpubtypes{} & \addtoindex{debug\_info\_offset} & offset in \dotdebuginfo{} \\
+ & \addtoindex{debug\_info\_length} & length of \dotdebuginfo{} \\
& & contribution \\
-\addtoindex{.debug\_types} & \addtoindex{debug\_abbrev\_offset} & offset in \addtoindex{.debug\_abbrev} \\
- & \addtoindex{type\_offset} & offset in of \addtoindex{.debug\_types} \\
+\dotdebugtypes{} & \addtoindex{debug\_abbrev\_offset} & offset in \dotdebugabbrev{} \\
+ & \addtoindex{type\_offset} & offset in \dotdebugtypes{} \\
\end{tabular}
\end{center}
-The CIE\_id field in a CIE structure must be 64 bits because
-it overlays the CIE\_pointer in a FDE structure; this implicit
+The \texttt{CIE\_id} field in a CIE structure must be 64 bits because
+it overlays the \texttt{CIE\_pointer} in a FDE structure; this implicit
union must be accessed to distinguish whether a CIE or FDE is
present, consequently, these two fields must exactly overlay
each other (both offset and size).
-\item Within the body of the \addtoindex{.debug\_info} or \addtoindex{.debug\_types}
+\item Within the body of the \dotdebuginfo{} or \dotdebugtypes{}
section, certain forms of attribute value depend on the choice
of DWARF format as follows. For the 32\dash bit DWARF format,
the value is a 32\dash bit unsigned integer; for the 64\dash bit DWARF
\begin{center}
\begin{tabular}{ll}
Form & Role \\ \hline
-\livelink{chap:DWFORMrefaddr}{DW\_FORM\_ref\_addr}& offset in \addtoindex{.debug\_info} \\
+\livelink{chap:DWFORMrefaddr}{DW\_FORM\_ref\_addr}& offset in \dotdebuginfo{} \\
\livelink{chap:DWFORMsecoffset}{DW\_FORM\_sec\_offset}& offset in a section other than \\
- &\addtoindex{.debug\_info} or \addtoindex{.debug\_str} \\
-\livelink{chap:DWFORMstrp}{DW\_FORM\_strp}&offset in \addtoindex{.debug\_str} \\
-\livelink{chap:DWOPcallref}{DW\_OP\_call\_ref}&offset in \addtoindex{.debug\_info} \\
+ &\dotdebuginfo{} or \dotdebugstr{} \\
+\livelink{chap:DWFORMstrp}{DW\_FORM\_strp}&offset in \dotdebugstr{} \\
+\livelink{chap:DWOPcallref}{DW\_OP\_call\_ref}&offset in \dotdebuginfo{} \\
\end{tabular}
\end{center}
-\item Within the body of the \addtoindex{.debug\_pubnames} and
-\addtoindex{.debug\_pubtypes}
+\item Within the body of the \dotdebugpubnames{} and
+\dotdebugpubtypes{}
sections, the representation of the first field
of each tuple (which represents an offset in the
-\addtoindex{.debug\_info}
+\dotdebuginfo{}
section) depends on the DWARF format as follows: in the
32\dash bit DWARF format, this field is a 32\dash bit unsigned integer;
in the 64\dash bit DWARF format, it is a 64\dash bit unsigned integer.
implementation is not required to guarantee detection and
reporting of all such errors.)
-\textit{It is expected that DWARF producing compilers will \textbf{not} use
-the 64\dash bit format \textbf{by default}. In most cases, the division of
+\textit{It is expected that DWARF producing compilers will \emph{not} use
+the 64\dash bit format \emph{by default}. In most cases, the division of
even very large applications into a number of executable and
shared objects will suffice to assure that the DWARF sections
within each individual linked object are less than 4 GBytes
\label{datarep:formatofdebugginginformation}
For each compilation unit compiled with a DWARF producer,
-a contribution is made to the \addtoindex{.debug\_info} section of
+a contribution is made to the \dotdebuginfo{} section of
the object file. Each such contribution consists of a
compilation unit header
(see Section \refersec{datarep:compilationunitheader})
information entry, together with its children.
For each type defined in a compilation unit, a contribution may
-be made to the \addtoindex{.debug\_types}
+be made to the \dotdebugtypes{}
section of the object file. Each
such contribution consists of a
\addtoindex{type unit} header
The appropriate entry in the
\addtoindex{abbreviations table} guides the
interpretation of the information contained directly in the
-\addtoindex{.debug\_info} or
-\addtoindex{.debug\_types} section.
+\dotdebuginfo{} or
+\dotdebugtypes{} section.
\needlines{4}
Multiple debugging information entries may share the same
\label{datarep:compilationunitheader}
\begin{enumerate}[1. ]
-\item unit\_length (initial length) \\
-\addtoindexx{unit\_length}
+\item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
+\addtoindexx{\texttt{unit\_length}}
A 4\dash byte or 12\dash byte
\addtoindexx{initial length}
unsigned integer representing the length
-of the \addtoindex{.debug\_info}
+of the \dotdebuginfo{}
contribution for that compilation unit,
-not including the length field itself. In the 32\dash bit DWARF
-format, this is a 4\dash byte unsigned integer (which must be less
-than \xfffffffzero); in the 64\dash bit DWARF format, this consists
+not including the length field itself. In the \thirtytwobitdwarfformat,
+ this is a 4\dash byte unsigned integer (which must be less
+than \xfffffffzero); in the \sixtyfourbitdwarfformat, this consists
of the 4\dash byte value \wffffffff followed by an 8\dash byte unsigned
integer that gives the actual length
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
-\item version (\addtoindex{uhalf}) \\
+\item \texttt{version} (\addtoindex{uhalf}) \\
A 2\dash byte unsigned integer representing the version of the
DWARF information for the compilation unit \addtoindexx{version number!compilation unit}
(see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
The value in this field is 4.
-\item \addtoindex{debug\_abbrev\_offset} (section offset) \\
+\item \addtoindex{\texttt{debug\_abbrev\_offset}} (\livelink{datarep:sectionoffsetlength}{section offset}) \\
A
\addtoindexx{section offset!in .debug\_info header}
4\dash byte or 8\dash byte unsigned offset into the
-\addtoindex{.debug\_abbrev}
+\dotdebugabbrev{}
section. This offset associates the compilation unit with a
particular set of debugging information entry abbreviations. In
-the 32\dash bit DWARF format, this is a 4\dash byte unsigned length;
-in the 64\dash bit DWARF format, this is an 8\dash byte unsigned length
+the \thirtytwobitdwarfformat, this is a 4\dash byte unsigned length;
+in the \sixtyfourbitdwarfformat, this is an 8\dash byte unsigned length
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
-\item address\_size (\addtoindex{ubyte}) \\
+\item \texttt{address\_size} (\addtoindex{ubyte}) \\
A 1\dash byte unsigned integer representing the size in bytes of
-\addtoindexx{address\_size}
+\addtoindexx{\texttt{address\_size}}
an address on the target architecture. If the system uses
\addtoindexx{address space!segmented}
segmented addressing, this value represents the size of the
The header for the series of debugging information entries
contributing to the description of a type that has been
placed in its own \addtoindex{type unit}, within the
-\addtoindex{.debug\_types} section,
+\dotdebugtypes{} section,
consists of the following information:
\begin{enumerate}[1. ]
-\item unit\_length (initial length) \\
-\addtoindexx{unit\_length}
+\item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
+\addtoindexx{\texttt{unit\_length}}
A 4\dash byte or 12\dash byte unsigned integer
\addtoindexx{initial length}
representing the length
-of the \addtoindex{.debug\_types} contribution for that compilation unit,
-not including the length field itself. In the 32\dash bit DWARF
-format, this is a 4\dash byte unsigned integer (which must be
-less than \xfffffffzero); in the 64\dash bit DWARF format, this
+of the \dotdebugtypes{} contribution for that compilation unit,
+not including the length field itself. In the \thirtytwobitdwarfformat,
+this is a 4\dash byte unsigned integer (which must be
+less than \xfffffffzero); in the \sixtyfourbitdwarfformat, this
consists of the 4\dash byte value \wffffffff followed by an
8\dash byte unsigned integer that gives the actual length
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
-\item version (\addtoindex{uhalf}) \\
+\item \texttt{version} (\addtoindex{uhalf}) \\
A 2\dash byte unsigned integer representing the version of the
DWARF information for the
compilation unit\addtoindexx{version number!type unit}
(see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
The value in this field is 4.
-\item \addtoindex{debug\_abbrev\_offset} (section offset) \\
+\item \addtoindex{\texttt{debug\_abbrev\_offset}} (\livelink{datarep:sectionoffsetlength}{section offset}) \\
A
\addtoindexx{section offset!in .debug\_types header}
4\dash byte or 8\dash byte unsigned offset into the
-\addtoindex{.debug\_abbrev}
+\dotdebugabbrev{}
section. This offset associates the compilation unit with a
particular set of debugging information entry abbreviations. In
-the 32\dash bit DWARF format, this is a 4\dash byte unsigned length;
-in the 64\dash bit DWARF format, this is an 8\dash byte unsigned length
+the \thirtytwobitdwarfformat, this is a 4\dash byte unsigned length;
+in the \sixtyfourbitdwarfformat, this is an 8\dash byte unsigned length
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
-\item address\_size (ubyte) \\
+\item \texttt{address\_size} (ubyte) \\
A 1\dash byte unsigned integer representing the size
\addtoindexx{size of an address}
in bytes of
-\addtoindexx{address\_size}
+\addtoindexx{\texttt{address\_size}}
an address on the target architecture. If the system uses
\addtoindexx{address space!segmented}
segmented addressing, this value represents the size of the
offset portion of an address.
-\item type\_signature (8\dash byte unsigned integer) \\
+\item \texttt{type\_signature} (8\dash byte unsigned integer) \\
\addtoindexx{type signature}
A
-\addtoindexx{type\_signature}
+\addtoindexx{\texttt{type\_signature}}
64\dash bit unique signature (see Section
\refersec{datarep:typesignaturecomputation})
of the type described in this type
\addtoindex{type unit} uses this value.}
-\item type\_offset (section offset) \\
-\addtoindexx{type\_offset}
+\item \texttt{type\_offset} (\livelink{datarep:sectionoffsetlength}{section offset}) \\
+\addtoindexx{\texttt{type\_offset}}
A 4\dash byte or 8\dash byte unsigned offset
\addtoindexx{section offset!in .debug\_types header}
relative to the beginning
may be nested inside a namespace or other structures, and may
contain references to other types that have not been placed in
separate type units, it is not necessarily either the first or
-the only entry in the type unit. In the 32\dash bit DWARF format,
-this is a 4\dash byte unsigned length; in the 64\dash bit DWARF format,
+the only entry in the type unit. In the \thirtytwobitdwarfformat,
+this is a 4\dash byte unsigned length; in the \sixtyfourbitdwarfformat,
this is an 8\dash byte unsigned length
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
The abbreviations tables for all compilation units
are contained in a separate object file section called
-\addtoindex{.debug\_abbrev}.
+\dotdebugabbrev{}.
As mentioned before, multiple compilation
units may share the same abbreviations table.
an unsigned LEB128 number representing the abbreviation
code itself. It is this code that appears at the beginning
of a debugging information entry in the
-\addtoindex{.debug\_info} or
-\addtoindex{.debug\_types}
+\dotdebuginfo{} or
+\dotdebugtypes{}
section. As described above, the abbreviation
code 0 is reserved for null debugging information entries. The
abbreviation code is followed by another unsigned LEB128
\livelink{chap:DWTAGtypeunit}{DW\_TAG\_type\_unit} \ddag &0x41 \\
\livelink{chap:DWTAGrvaluereferencetype}{DW\_TAG\_rvalue\_reference\_type} \ddag &0x42 \\
\livelink{chap:DWTAGtemplatealias}{DW\_TAG\_template\_alias} \ddag &0x43 \\
-\livelink{chap:DWTAGlouser}{DW\_TAG\_lo\_user}&0x4080 \\
-\livelink{chap:DWTAGhiuser}{DW\_TAG\_hi\_user}&\xffff \\
+\livelink{chap:DWXXXlohiuser}{DW\_TAG\_lo\_user}&0x4080 \\
+\livelink{chap:DWXXXlohiuser}{DW\_TAG\_hi\_user}&\xffff \\
\end{longtable}
\end{centering}
The attribute form
\livetarg{chap:DWFORMindirect}{DW\_FORM\_indirect} is a special case. For
attributes with this form, the attribute value itself in the
-\addtoindex{.debug\_info} or
-\addtoindex{.debug\_types}
+\dotdebuginfo{} or
+\dotdebugtypes{}
section begins with an unsigned
LEB128 number that represents its form. This allows producers
to choose forms for particular attributes
This is an offset into
\addtoindexx{section offset!in class lineptr value}
the
-\addtoindex{.debug\_line} section
+\dotdebugline{} section
(\livelink{chap:DWFORMsecoffset}{DW\_FORM\_sec\_offset}).
It consists of an offset from the
beginning of the
-\addtoindex{.debug\_line}
+\dotdebugline{}
section to the first byte of
the data making up the line number list for the compilation
unit.
It is relocatable in a relocatable object file, and
-relocated in an executable or shared object. In the 32\dash bit
-DWARF format, this offset is a 4\dash byte unsigned value;
-in the 64\dash bit DWARF format, it is an 8\dash byte unsigned value
+relocated in an executable or shared object. In the
+\thirtytwobitdwarfformat, this offset is a 4\dash byte unsigned value;
+in the \sixtyfourbitdwarfformat, it is an 8\dash byte unsigned value
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
\item \livelink{chap:loclistptr}{loclistptr} \\
This is an offset into the
-\addtoindex{.debug\_loc}
+\dotdebugloc{}
section
(\livelink{chap:DWFORMsecoffset}{DW\_FORM\_sec\_offset}).
It consists of an offset from the
\addtoindexx{section offset!in class loclistptr value}
beginning of the
-\addtoindex{.debug\_loc}
+\dotdebugloc{}
section to the first byte of
the data making up the
\addtoindex{location list} for the compilation
unit.
It is relocatable in a relocatable object file, and
-relocated in an executable or shared object. In the 32\dash bit
-DWARF format, this offset is a 4\dash byte unsigned value;
-in the 64\dash bit DWARF format, it is an 8\dash byte unsigned value
+relocated in an executable or shared object. In the
+\thirtytwobitdwarfformat, this offset is a 4\dash byte unsigned value;
+in the \sixtyfourbitdwarfformat, it is an 8\dash byte unsigned value
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
This is an
\addtoindexx{section offset!in class macptr value}
offset into the
-\addtoindex{.debug\_macinfo} section
+\dotdebugmacinfo{} section
(\livelink{chap:DWFORMsecoffset}{DW\_FORM\_sec\_offset}).
It consists of an offset from the
-beginning of the \addtoindex{.debug\_macinfo}
+beginning of the \dotdebugmacinfo{}
section to the first byte of
the data making up the macro information list for the compilation
unit.
It is relocatable in a relocatable object file, and
-relocated in an executable or shared object. In the 32\dash bit
-DWARF format, this offset is a 4\dash byte unsigned value;
-in the 64\dash bit DWARF format, it is an 8\dash byte unsigned value
+relocated in an executable or shared object. In the
+\thirtytwobitdwarfformat, this offset is a 4\dash byte unsigned value;
+in the \sixtyfourbitdwarfformat, it is an 8\dash byte unsigned value
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
\needlines{4}
\item \livelink{chap:rangelistptr}{rangelistptr} \\
This is an
\addtoindexx{section offset!in class rangelistptr value}
-offset into the \addtoindex{.debug\_ranges} section
+offset into the \dotdebugranges{} section
(\livelink{chap:DWFORMsecoffset}{DW\_FORM\_sec\_offset}).
It consists of an
offset from the beginning of the
-\addtoindex{.debug\_ranges} section
+\dotdebugranges{} section
to the beginning of the non\dash contiguous address ranges
information for the referencing entity.
It is relocatable in
a relocatable object file, and relocated in an executable or
-shared object. In the 32\dash bit DWARF format, this offset
+shared object. In the \thirtytwobitdwarfformat, this offset
is a 4\dash byte unsigned value; in the 64\dash bit DWARF
format, it is an 8\dash byte unsigned value (see Section
\refersec{datarep:32bitand64bitdwarfformats}).
The second type of reference can identify any debugging
information entry within a
-\addtoindex{.debug\_info} section; in particular,
+\dotdebuginfo{} section; in particular,
it may refer to an entry in a different compilation unit
from the unit containing the reference, and may refer to an
entry in a different shared object. This type of reference
(\livetarg{chap:DWFORMrefaddr}{DW\_FORM\_ref\_addr})
is an offset from the beginning of the
-\addtoindex{.debug\_info}
+\dotdebuginfo{}
section of the target executable or shared object;
it is relocatable in a relocatable object file and frequently
relocated in an executable file or shared object. For
references from one shared object or static executable file
to another, the relocation and identification of the target
-object must be performed by the consumer. In the 32\dash bit DWARF
-format, this offset is a 4\dash byte unsigned value;
-in the 64\dash bit DWARF format, it is an 8\dash byte
+object must be performed by the consumer. In the
+\thirtytwobitdwarfformat, this offset is a 4\dash byte unsigned value;
+in the \sixtyfourbitdwarfformat, it is an 8\dash byte
unsigned value
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
\textit{For a reference from one executable or shared object to
another, the reference is resolved by the debugger to identify
the shared object or executable and the offset into that
-object\textquoteright s \addtoindex{.debug\_info}
+object\textquoteright s \dotdebuginfo{}
section in the same fashion as the run
time loader, either when the debug information is first read,
or when the reference is used.}
be represented as an
\addtoindexx{section offset!in class string value}
offset into a string table contained in
-the \addtoindex{.debug\_str} section of the object file
+the \dotdebugstr{} section of the object file
(\livetarg{chap:DWFORMstrp}{DW\_FORM\_strp}). In
-the 32\dash bit DWARF format, the representation of a
+the \thirtytwobitdwarfformat, the representation of a
\livelink{chap:DWFORMstrp}{DW\_FORM\_strp}
-value is a 4\dash byte unsigned offset; in the 64\dash bit DWARF format,
+value is a 4\dash byte unsigned offset; in the \sixtyfourbitdwarfformat,
it is an 8\dash byte unsigned offset
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
classes \livelink{chap:lineptr}{lineptr},
\livelink{chap:loclistptr}{loclistptr}, \livelink{chap:macptr}{macptr} or
\livelink{chap:rangelistptr}{rangelistptr} to point into either the
-\addtoindex{.debug\_info} or \addtoindex{.debug\_str} section.
+\dotdebuginfo{} or \dotdebugstr{} section.
The form encodings are listed in
Table \refersec{tab:attributeformencodings}.
\addtoindexx{enumeration class attribute!encoding} \\
\livelink{chap:DWATlinkagename}{DW\_AT\_linkage\_name} \ddag &0x6e&string
\addtoindexx{linkage name attribute!encoding} \\
-\livetarg{chap:DWATlouser}{DW\_AT\_lo\_user}&0x2000 & --- \addtoindexx{low user attribute encoding} \\
-\livetarg{chap:DWAThiuser}{DW\_AT\_hi\_user}&\xiiifff& --- \addtoindexx{high user attribute encoding} \\
+\livelink{chap:DWXXXlohiuser}{DW\_AT\_lo\_user}&0x2000 & --- \addtoindexx{low user attribute encoding} \\
+\livelink{chap:DWXXXlohiuser}{DW\_AT\_hi\_user}&\xiiifff& --- \addtoindexx{high user attribute encoding} \\
\end{longtable}
\end{centering}
\livelink{chap:DWOPimplicitvalue}{DW\_OP\_implicit\_value} \ddag &0x9e &2&ULEB128 size followed by \\
&&&\nolink{block} of that size\\
\livelink{chap:DWOPstackvalue}{DW\_OP\_stack\_value} \ddag &0x9f &0& \\
-\livetarg{chap:DWOPlouser}{DW\_OP\_lo\_user} &0xe0 && \\
-\livetarg{chap:DWOPhiuser}{DW\_OP\_hi\_user} &\xff && \\
+\livelink{chap:DWXXXlohiuser}{DW\_OP\_lo\_user} &0xe0 && \\
+\livelink{chap:DWXXXlohiuser}{DW\_OP\_hi\_user} &\xff && \\
\end{longtable}
\end{centering}
\livelink{chap:DWATEunsignedfixed}{DW\_ATE\_unsigned\_fixed}&0x0e \\
\livelink{chap:DWATEdecimalfloat}{DW\_ATE\_decimal\_float} & 0x0f \\
\livelink{chap:DWATEUTF}{DW\_ATE\_UTF} \ddag & 0x10 \\
-\livetarg{chap:DWATElouser}{DW\_ATE\_lo\_user} & 0x80 \\
-\livetarg{chap:DWATEhiuser}{DW\_ATE\_hi\_user} & \xff \\
+\livelink{chap:DWXXXlohiuser}{DW\_ATE\_lo\_user} & 0x80 \\
+\livelink{chap:DWXXXlohiuser}{DW\_ATE\_hi\_user} & \xff \\
\end{longtable}
\end{centering}
\livelink{chap:DWENDdefault}{DW\_END\_default} & 0x00 \\
\livelink{chap:DWENDbig}{DW\_END\_big} & 0x01 \\
\livelink{chap:DWENDlittle}{DW\_END\_little} & 0x02 \\
-\livetarg{chap:DWENDlouser}{DW\_END\_lo\_user} & 0x40 \\
-\livetarg{chap:DWENDhiuser}{DW\_END\_hi\_user} & \xff \\
+\livelink{chap:DWXXXlohiuser}{DW\_END\_lo\_user} & 0x40 \\
+\livelink{chap:DWXXXlohiuser}{DW\_END\_hi\_user} & \xff \\
\end{longtable}
\end{centering}
\livelink{chap:DWLANGUPC}{DW\_LANG\_UPC}&0x0012&0 \\
\livelink{chap:DWLANGD}{DW\_LANG\_D}&0x0013&0 \\
\livelink{chap:DWLANGPython}{DW\_LANG\_Python} \dag &0x0014&0 \\
-\livetarg{chap:DWLANGlouser}{DW\_LANG\_lo\_user}&0x8000 & \\
-\livetarg{chap:DWLANGhiuser}{DW\_LANG\_hi\_user}&\xffff & \\
+\livelink{chap:DWXXXlohiuser}{DW\_LANG\_lo\_user}&0x8000 & \\
+\livelink{chap:DWXXXlohiuser}{DW\_LANG\_hi\_user}&\xffff & \\
\end{longtable}
\end{centering}
\livelink{chap:DWCCnormal}{DW\_CC\_normal}&0x01 \\
\livelink{chap:DWCCprogram}{DW\_CC\_program}&0x02 \\
\livelink{chap:DWCCnocall}{DW\_CC\_nocall}&0x03 \\
-\livetarg{chap:DWCClouser}{DW\_CC\_lo\_user}&0x40 \\
-\livetarg{chap:DWCChiuser}{DW\_CC\_hi\_user}&\xff \\
+\livelink{chap:DWXXXlohiuser}{DW\_CC\_lo\_user}&0x40 \\
+\livelink{chap:DWXXXlohiuser}{DW\_CC\_hi\_user}&\xff \\
\end{longtable}
\end{centering}
\label{datarep:namelookuptables}
Each set of entries in the table of global names contained
-in the \addtoindex{.debug\_pubnames} and
-\addtoindex{.debug\_pubtypes} sections begins
+in the \dotdebugpubnames{} and
+\dotdebugpubtypes{} sections begins
with a header consisting of:
\begin{enumerate}[1. ]
-\item unit\_length (initial length) \\
-\addtoindexx{unit\_length}
+\item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
+\addtoindexx{\texttt{unit\_length}}
A 4\dash byte or 12\dash byte unsigned integer
\addtoindexx{initial length}
representing the length
-of the \addtoindex{.debug\_info}
+of the \dotdebuginfo{}
contribution for that compilation unit,
-not including the length field itself. In the 32\dash bit DWARF
-format, this is a 4\dash byte unsigned integer (which must be less
-than \xfffffffzero); in the 64\dash bit DWARF format, this consists
+not including the length field itself. In the
+\thirtytwobitdwarfformat, this is a 4\dash byte unsigned integer (which must be less
+than \xfffffffzero); in the \sixtyfourbitdwarfformat, this consists
of the 4\dash byte value \wffffffff followed by an 8\dash byte unsigned
integer that gives the actual length
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
\addtoindexx{section offset!in name lookup table set of entries}
4\dash byte or 8\dash byte
offset into the
-\addtoindex{.debug\_info}
+\dotdebuginfo{}
section of the compilation unit header.
-In
-the 32\dash bit DWARF format, this is a 4\dash byte unsigned offset;
-in the 64\dash bit DWARF format, this is an 8\dash byte unsigned offsets
+In the \thirtytwobitdwarfformat, this is a 4\dash byte unsigned offset;
+in the \sixtyfourbitdwarfformat, this is an 8\dash byte unsigned offsets
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
-\item \addtoindex{debug\_info\_length} (section length) \\
+\item \addtoindex{debug\_info\_length} (\livelink{datarep:sectionoffsetlength}{section length}) \\
\addtoindexx{section length!in .debug\_pubnames header}
A
\addtoindexx{section length!in .debug\_pubtypes header}
4\dash byte or 8\dash byte length containing the size in bytes of the
-contents of the \addtoindex{.debug\_info}
+contents of the \dotdebuginfo{}
section generated to represent
-this compilation unit. In the 32\dash bit DWARF format, this is
-a 4\dash byte unsigned length; in the 64\dash bit DWARF format, this
+this compilation unit. In the \thirtytwobitdwarfformat, this is
+a 4\dash byte unsigned length; in the \sixtyfourbitdwarfformat, this
is an 8-byte unsigned length
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
\label{datarep:addrssrangetable}
Each set of entries in the table of address ranges contained
-in the \addtoindex{.debug\_aranges}
+in the \dotdebugaranges{}
section begins with a header containing:
\begin{enumerate}[1. ]
% FIXME The unit length text is not fully consistent across
% these tables.
-\item unit\_length (initial length) \\
-\addtoindexx{unit\_length}
+\item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
+\addtoindexx{\texttt{unit\_length}}
A 4-byte or 12-byte length containing the length of the
\addtoindexx{initial length}
set of entries for this compilation unit, not including the
-length field itself. In the 32-bit DWARF format, this is a
+length field itself. In the \thirtytwobitdwarfformat, 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
+in the \sixtyfourbitdwarfformat, 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}).
This value in this field \addtoindexx{version number!address range table} is 2.
-\item debug\_info\_offset (section offset) \\
+\item debug\_info\_offset (\livelink{datarep:sectionoffsetlength}{section offset}) \\
A
\addtoindexx{section offset!in .debug\_aranges header}
4\dash byte or 8\dash byte offset into the
-\addtoindex{.debug\_info} section of
-the compilation unit header. In the 32\dash bit DWARF format,
-this is a 4\dash byte unsigned offset; in the 64\dash bit DWARF format,
+\dotdebuginfo{} section of
+the compilation unit header. In the \thirtytwobitdwarfformat,
+this is a 4\dash byte unsigned offset; in the \sixtyfourbitdwarfformat,
this is an 8\dash byte unsigned offset
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
\livelink{chap:DWLNEsetaddress}{DW\_LNE\_set\_address}&0x02\\
\livelink{chap:DWLNEdefinefile}{DW\_LNE\_define\_file}&0x03\\
\livelink{chap:DWLNEsetdiscriminator}{DW\_LNE\_set\_discriminator} \ddag &0x04 \\
-\livetarg{chap:DWLNElouser}{DW\_LNE\_lo\_user}&0x80 \\
-\livetarg{chap:DWLNEhiuser}{DW\_LNE\_hi\_user}&\xff \\
+\livelink{chap:DWXXXlohiuser}{DW\_LNE\_lo\_user}&0x80 \\
+\livelink{chap:DWXXXlohiuser}{DW\_LNE\_hi\_user}&\xff \\
\end{longtable}
\end{centering}
\section{Call Frame Information}
\label{datarep:callframeinformation}
-In the 32\dash bit DWARF format, the value of the CIE id in the
-CIE header is \xffffffff; in the 64\dash bit DWARF format, the
+In the \thirtytwobitdwarfformat, the value of the CIE id in the
+CIE header is \xffffffff; in the \sixtyfourbitdwarfformat, the
value is \xffffffffffffffff.
The value of the CIE \addtoindexi{version number}{version number!call frame information}
\livelink{chap:DWCFAvaloffset}{DW\_CFA\_val\_offset}&0&0x14&ULEB128&ULEB128 \\
\livelink{chap:DWCFAvaloffsetsf}{DW\_CFA\_val\_offset\_sf}&0&0x15&ULEB128&SLEB128 \\
\livelink{chap:DWCFAvalexpression}{DW\_CFA\_val\_expression}&0&0x16&ULEB128&BLOCK \\
-\livetarg{chap:DWCFAlouser}{DW\_CFA\_lo\_user}&0&0x1c & & \\
-\livetarg{chap:DWCFAhiuser}{DW\_CFA\_hi\_user}&0&\xiiif & & \\
+\livelink{chap:DWXXXlohiuser}{DW\_CFA\_lo\_user}&0&0x1c & & \\
+\livelink{chap:DWXXXlohiuser}{DW\_CFA\_hi\_user}&0&\xiiif & & \\
\end{longtable}
\end{centering}
exist
\addtoindexx{DWARF section names!list of}
in
-the \addtoindex{.debug\_abbrev},
-\addtoindex{.debug\_aranges},
-\addtoindex{.debug\_frame},
-\addtoindex{.debug\_info},
-\addtoindex{.debug\_line},
-\addtoindex{.debug\_loc},
-\addtoindex{.debug\_macinfo},
-\addtoindex{.debug\_pubnames},
-\addtoindex{.debug\_pubtypes},
-\addtoindex{.debug\_ranges},
-\addtoindex{.debug\_str}
+the \dotdebugabbrev{},
+\dotdebugaranges{},
+\dotdebugframe{},
+\dotdebuginfo{},
+\dotdebugline{},
+\dotdebugloc{},
+\dotdebugmacinfo{},
+\dotdebugpubnames{},
+\dotdebugpubtypes{},
+\dotdebugranges{},
+\dotdebugstr{}
and
-\addtoindex{.debug\_types}
+\dotdebugtypes{}
sections of an object file, or equivalent
separate file or database. The information is not
word\dash aligned. Consequently:
\begin{itemize}
-\item For the 32\dash bit DWARF format and a target architecture with
+\item For the \thirtytwobitdwarfformat{} and a target architecture with
32\dash bit addresses, an assembler or compiler must provide a way
to produce 2\dash byte and 4\dash byte quantities without alignment
restrictions, and the linker must be able to relocate a
section offset that occurs at an arbitrary
alignment.
-\item For the 32\dash bit DWARF format and a target architecture with
+\item For the \thirtytwobitdwarfformat{} and a target architecture with
64\dash bit addresses, an assembler or compiler must provide a
way to produce 2\dash byte, 4\dash byte and 8\dash byte quantities without
alignment restrictions, and the linker must be able to relocate
section offset that occurs at an
arbitrary alignment.
-\item For the 64\dash bit DWARF format and a target architecture with
+\item For the \sixtyfourbitdwarfformat{} and a target architecture with
32\dash bit addresses, an assembler or compiler must provide a
way to produce 2\dash byte, 4\dash byte and 8\dash byte quantities without
alignment restrictions, and the linker must be able to relocate
a mix of 32\dash bit and 64\dash bit code and data within the same
executable object.}
-\item For the 64\dash bit DWARF format and a target architecture with
+\item For the \sixtyfourbitdwarfformat{} and a target architecture with
64\dash bit addresses, an assembler or compiler must provide a
way to produce 2\dash byte, 4\dash byte and 8\dash byte quantities without
alignment restrictions, and the linker must be able to
An example that illustrates the computation of an MD5 hash may be found in
Appendix \refersec{app:usingtypeunits}.
-
\textbf{Notes}
\end{center}
\begin{enumerate}[(a)]
-\item \addtoindex{.debug\_aranges} \\
+\item \dotdebugaranges{} \\
The debug\_info\_offset value in
the header is
-the offset in the \addtoindex{.debug\_info} section of the
+the offset in the \dotdebuginfo{} section of the
corresponding compilation unit header (not the compilation
unit entry).
%b
-\item \addtoindex{.debug\_pubnames} and \addtoindex{.debug\_pubtypes} \\
+\item \dotdebugpubnames{} and \dotdebugpubtypes{} \\
The debug\_info\_offset value in the header is the offset in the
-\addtoindex{.debug\_info} section of the
+\dotdebuginfo{} section of the
corresponding compilation unit header (not
the compilation unit entry). Each pubname/pubtype has the offset (within
the corresponding compilation unit) of the applicable debugging
information entry.
%c
-\item \addtoindex{.debug\_info} and \addtoindex{.debug\_types} \\
+\item \dotdebuginfo{} and \dotdebugtypes{} \\
The debug\_abbrev\_offset value in the header is the offset in the
-\addtoindex{.debug\_abbrev}
+\dotdebugabbrev{}
section of the abbreviations for that compilation unit.
%d
-\item \addtoindex{.debug\_info} and \addtoindex{.debug\_types} \\
+\item \dotdebuginfo{} and \dotdebugtypes{} \\
Attribute values of class string may have form
\livelink{chap:DWFORMstrp}{DW\_FORM\_strp}, whose
-value is the offset in the \addtoindex{.debug\_str}
+value is the offset in the \dotdebugstr{}
section of the corresponding string.
%e
-\item \addtoindex{.debug\_loc} \\
+\item \dotdebugloc{} \\
The operand of the \livelink{chap:DWOPcallref}{DW\_OP\_call\_ref}
DWARF expression operator is the
offset of a debugging information entry in the
-\addtoindex{.debug\_info} section.
+\dotdebuginfo{} section.
%f
-\item \addtoindex{.debug\_info} \\
+\item \dotdebuginfo{} \\
An attribute value of class \livelink{chap:loclistptr}{loclistptr}
(specifically form
\livelink{chap:DWFORMsecoffset}{DW\_FORM\_sec\_offset})
-is an offset within the \addtoindex{.debug\_loc}
+is an offset within the \dotdebugloc{}
section of a
\addtoindex{location list}.
%g
-\item \addtoindex{.debug\_info} \\
+\item \dotdebuginfo{} \\
An attribute value of class \livelink{chap:rangelistptr}{rangelistptr}
(specifically form
\livelink{chap:DWFORMsecoffset}{DW\_FORM\_sec\_offset})
-is an offset within the \addtoindex{.debug\_ranges} section of
+is an offset within the \dotdebugranges{} section of
a range list.
%h
-\item \addtoindex{.debug\_info} \\
+\item \dotdebuginfo{} \\
An attribute value of class
\livelink{chap:macptr}{macptr} (specifically form
\livelink{chap:DWFORMsecoffset}{DW\_FORM\_sec\_offset}) is an
offset within the
-\addtoindex{.debug\_macinfo} section
+\dotdebugmacinfo{} section
of the beginning of the macro information for the referencing unit.
%i
-\item \addtoindex{.debug\_info} \\
+\item \dotdebuginfo{} \\
An attribute value of class
\livelink{chap:lineptr}{lineptr} (specifically form
\livelink{chap:DWFORMsecoffset}{DW\_FORM\_sec\_offset})
is an offset in the
-\addtoindex{.debug\_line} section of the
+\dotdebugline{} section of the
beginning of the line number information for the referencing unit.
\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}{May 2, 2013 \hspace{1cm}(***\textbf{DRAFT}***)}
+\newcommand{\docdate}{May 9, 2013 \hspace{1cm}(***\textbf{DRAFT}***)}
%
\usepackage[T1]{fontenc}
\usepackage{palatino}
% When we want the index entry to look different from the name.
\newcommand{\livetargi}[3]{\hypertarget{#1}{#2}\index{#3}}
+\newcommand{\thirtytwobitdwarfformat}[1][]{\livelink{datarep:xxbitdwffmt}{32-bit DWARF format}}
+\newcommand{\sixtyfourbitdwarfformat}[1][]{\livelink{datarep:xxbitdwffmt}{64-bit DWARF format}}
+
\newcommand{\dash}{\nobreakdash-\hspace{0pt}} % So we handle dashes ok.
% The following two let us mark a word as 'do not link' or
\include{dataobject} \emptypage
\include{typeentries} \emptypage
\include{otherdebugginginformation} \emptypage
-\include{datarepresentation} \emptypage
+\include{datarepresentation} %\emptypage
% The \appendix toggles us into appendix chapters
\appendix
-\include{attributesbytag}
+\include{attributesbytag} %\emptypage
\include{debugsectionrelationships} \emptypage
\include{encodingdecoding} \emptypage
\include{examples} %\emptypage
\newcommand{\dotdebugaranges}[1][]{\addtoindex{\texttt{.debug\_aranges}}}
\newcommand{\dotdebugframe}[1][]{\addtoindex{\texttt{.debug\_frame}}}
\newcommand{\dotdebuginfo}[1][]{\addtoindex{\texttt{.debug\_info}}}
+\newcommand{\dotdebugline}[1][]{\addtoindex{\texttt{.debug\_line}}}
\newcommand{\dotdebugloc}[1][]{\addtoindex{\texttt{.debug\_loc}}}
\newcommand{\dotdebugmacinfo}[1][]{\addtoindex{\texttt{.debug\_mac\_info}}}
-\newcommand{\dotdebugline}[1][]{\addtoindex{\texttt{.debug\_line}}}
\newcommand{\dotdebugpubnames}[1][]{\addtoindex{\texttt{.debug\_pubnames}}}
\newcommand{\dotdebugpubtypes}[1][]{\addtoindex{\texttt{.debug\_pubtypes}}}
\newcommand{\dotdebugranges}[1][]{\addtoindex{\texttt{.debug\_ranges}}}
Figure \refersec{fig:compilationunitsandabbreviationstable}
depicts the relationship of the abbreviations tables contained
\addtoindexx{abbreviations table!example}
-\addtoindexx{.debug\_abbrev example}
-\addtoindexx{.debug\_info example}
-in the \addtoindex{.debug\_abbrev}
+\addtoindexx{\texttt{.debug\_abbrev}!example}
+\addtoindexx{\texttt{.debug\_info}!example}
+in the \dotdebugabbrev{}
section to the information contained in
-the \addtoindex{.debug\_info}
+the \dotdebuginfo{}
section. Values are given in symbolic form,
where possible.
%
\begin{minipage}[t]{0.38\linewidth}
\centering
-Compilation Unit \#1: \addtoindex{.debug\_info}
+Compilation Unit \#1: \dotdebuginfo{}
\begin{framed}
\scriptsize
\begin{alltt}
%
%
\end{framed}
-Compilation Unit \#2: \addtoindex{.debug\_info}
+Compilation Unit \#2: \dotdebuginfo{}
\begin{framed}
\scriptsize
\begin{alltt}
%
\begin{minipage}[t]{0.41\linewidth}
\centering
-Abbreviation Table: \addtoindex{.debug\_abbrev}
+Abbreviation Table: \dotdebugabbrev{}
\begin{framed}
\scriptsize
\begin{alltt}\vspace{0.06cm}
real :: myvar
real, dimension (:), pointer :: ap
end type array_ptr
-type(array_ptr), allocatable, dimension(:) :: arrays
-allocate(arrays(20))
+type(array_ptr), allocatable, dimension(:) :: arrayvar
+allocate(arrayvar(20))
do i = 1, 20
-allocate(arrays(i)%ap(i+10))
+allocate(arrayvar(i)%ap(i+10))
end do
\end{lstlisting}
\caption{Fortran 90 example: source fragment} \label{fig:fortran90examplesourcefragment}
\livelink{chap:DWATdatalocation}{DW\_AT\_data\_location} attribute. In
that case the object doubles as its own descriptor.)
-The \addtoindex{Fortran 90} derived type array\_ptr can now be redescribed
+The \addtoindex{Fortran 90} derived type \texttt{array\_ptr} can now be redescribed
in C\dash like terms that expose some of the representation as in
\begin{lstlisting}[numbers=none]
};
\end{lstlisting}
-Similarly for variable arrays:
+Similarly for variable \texttt{arrayvar}:
\begin{lstlisting}[numbers=none]
-desc<1> arrays;
+desc<1> arrayvar;
\end{lstlisting}
(Recall that \texttt{desc\textless 1\textgreater}
\livelink{chap:DWOPplus}{DW\_OP\_plus}
\livelink{chap:DWOPderef}{DW\_OP\_deref})
8\$: \livelink{chap:DWTAGvariable}{DW\_TAG\_variable}
- \livelink{chap:DWATname}{DW\_AT\_name}("arrays")
+ \livelink{chap:DWATname}{DW\_AT\_name}("arrayvar")
\livelink{chap:DWATtype}{DW\_AT\_type}(reference to 6\$)
\livelink{chap:DWATlocation}{DW\_AT\_location}(expression=
...as appropriate...) ! Assume static allocation
following debug command:
\begin{lstlisting}[numbers=none]
-debug> print arrays(5)%ap(2)
+debug> print arrayvar(5)%ap(2)
\end{lstlisting}
Interpretation of this expression proceeds as follows:
\begin{enumerate}[1. ]
-\item Lookup name arrays. We find that it is a variable,
+\item Lookup name \texttt{arrayvar}. We find that it is a variable,
whose type is given by the unnamed type at 6\$. Notice that
the type is an array type.
\end{enumerate}
-For a), check for a \livelink{chap:DWATdatalocation}{DW\_AT\_data\_location} attribute. Since
-there is one, go execute the expression, whose result is
+For a), check for a
+\livelink{chap:DWATdatalocation}{DW\_AT\_data\_location} attribute.
+Since there is one, go execute the expression, whose result is
the address needed. The object address used in this case
is the object we are working on, namely the variable named
-arrays, whose address was found in step 1. (Had there been
+\texttt{arrayvar}, whose address was found in step 1. (Had there been
no \livelink{chap:DWATdatalocation}{DW\_AT\_data\_location} attribute, the desired address would
be the same as the address from step 1.)
in this case), go interpret the usual lower bound
attribute. Again this is an expression, which again begins
with \livelink{chap:DWOPpushobjectaddress}{DW\_OP\_push\_object\_address}. This object is
-\textbf{still} arrays,
+\textbf{still} \texttt{arrayvar},
from step 1, because we have not begun to actually perform
any indexing yet.
For c), the default stride applies. Since there is no
\livelink{chap:DWATbytestride}{DW\_AT\_byte\_stride} attribute, use the size of the array element
-type, which is the size of type array\_ptr (at 3\$).
+type, which is the size of type \texttt{array\_ptr} (at 3\$).
\clearpage
the actual values used in the indexing step.
The result is an object within the memory that was dynamically
-allocated for arrays.
+allocated for \texttt{arrayvar}.
-\item Find the ap component of the object just identified,
-whose type is array\_ptr.
+\item Find the \texttt{ap} component of the object just identified,
+whose type is \texttt{array\_ptr}.
This is a conventional record component lookup and
-interpretation. It happens that the ap component in this case
+interpretation. It happens that the \texttt{ap} component in this case
begins at offset 4 from the beginning of the containing object.
-Component ap has the unnamed array type defined at 1\$ in the
+Component \texttt{ap} has the unnamed array type defined at 1\$ in the
symbol table.
\item Find the second element of the array object found in step 3. To do array indexing requires
\label{fig:adaexamplesourcefragment}
\end{figure}
-VEC1 illustrates an (unnamed) array type where the upper bound
+\texttt{VEC1} illustrates an (unnamed) array type where the upper bound
of the first and only dimension is determined at runtime.
\addtoindex{Ada}
semantics require that the value of an array bound is fixed at
-the time the array type is elaborated (where elaboration refers
+the time the array type is elaborated (where \textit{elaboration} refers
to the runtime executable aspects of type processing). For
the purposes of this example, we assume that there are no
-other assignments to M so that it safe for the REC1 type
+other assignments to \texttt{M} so that it safe for the \texttt{REC1} type
description to refer directly to that variable (rather than
-a compiler generated copy).
+a compiler-generated copy).
-REC2 illustrates another array type (the unnamed type of
-component VEC2) where the upper bound of the first and only
+\texttt{REC2} illustrates another array type (the unnamed type of
+component \texttt{VEC2}) where the upper bound of the first and only
bound is also determined at runtime. In this case, the upper
bound is contained in a discriminant of the containing record
type. (A \textit{discriminant} is a component of a record whose value
Interesting aspects about this example are:
\begin{enumerate}[1. ]
-\item The array VEC2 is ``immediately'' contained within structure
-REC2 (there is no intermediate descriptor or indirection),
+\item The array \texttt{VEC2} is \doublequote{immediately} contained within structure
+\texttt{REC2} (there is no intermediate descriptor or indirection),
which is reflected in the absence of a \livelink{chap:DWATdatalocation}{DW\_AT\_data\_location}
attribute on the array type at 28\$.
-\item One of the bounds of VEC2 is nonetheless dynamic and part of
+\item One of the bounds of \texttt{VEC2} is nonetheless dynamic and part of
the same containing record. It is described as a reference to
a member, and the location of the upper bound is determined
as for any member. That is, the location is determined using
\item The lack of a subtype concept in DWARF means that DWARF types
serve the role of subtypes and must replicate information from
what should be the parent type. For this reason, DWARF for
-the unconstrained array type ARR is not needed for the purposes
+the unconstrained array type \texttt{ARR} is not needed for the purposes
of this example and therefore is not shown.
\end{enumerate}
by adding the contents of the
source register with the constant.
-\item There are 8 4\dash byte registers:
-\begin{alltt}
- R0 always 0
- R1 holds return address on call
- R2-R3 temp registers (not preserved on call)
- R4-R6 preserved on call
- R7 stack pointer.
-\end{alltt}
+\item There are eight 4\dash byte registers:
+\newline
+\begin{tabular}{p{5mm}l}
+ & R0 always 0 \\
+ & R1 holds return address on call \\
+ & R2-R3 temp registers (not preserved on call) \\
+ & R4-R6 preserved on call \\
+ & R7 stack pointer \\
+\end{tabular}
\item The stack grows in the negative direction.
\begin{figure}[here]
\begin{lstlisting}
;; start prologue
-foo sub R7, R7, <fs> ; Allocate frame
-foo+4 store R1, R7, (<fs>-4) ; Save the return address
-foo+8 store R6, R7, (<fs>-8) ; Save R6
-foo+12 add R6, R7, 0 ; R6 is now the Frame ptr
-foo+16 store R4, R6, (<fs>-12) ; Save a preserved reg
+foo sub R7, R7, <fs> ; Allocate frame
+foo+4 store R1, R7, (<fs>-4) ; Save the return address
+foo+8 store R6, R7, (<fs>-8) ; Save R6
+foo+12 add R6, R7, 0 ; R6 is now the Frame ptr
+foo+16 store R4, R6, (<fs>-12) ; Save a preserved reg
;; This subroutine does not change R5
...
;; Start epilogue (R7 is returned to entry value)
-foo+64 load R4, R6, (<fs>-12) ; Restore R4
-foo+68 load R6, R7, (<fs>-8) ; Restore R6
-foo+72 load R1, R7, (<fs>-4) ; Restore return address
-foo+76 add R7, R7, <fs> ; Deallocate frame
-foo+80 jump R1 ; Return
+foo+64 load R4, R6, (<fs>-12) ; Restore R4
+foo+68 load R6, R7, (<fs>-8) ; Restore R6
+foo+72 load R1, R7, (<fs>-4) ; Restore return address
+foo+76 add R7, R7, <fs> ; Deallocate frame
+foo+80 jump R1 ; Return
foo+84
\end{lstlisting}
\caption{Call frame information example: machine code fragments}
for the foo subroutine is shown in
Table \referfol{tab:callframeinformationexampleconceptualmatrix}.
Corresponding fragments from the
-\addtoindex{.debug\_frame} section are shown in
+\dotdebugframe{} section are shown in
Table \refersec{tab:callframeinformationexamplecommoninformationentryencoding}.
The following notations apply in
Table \refersec{tab:callframeinformationexampleconceptualmatrix}:
-
-\begin{alltt}
-1. R8 is the return address
-2. s = same\_value rule
-3. u = undefined rule
-4. rN = register(N) rule
-5. cN = offset(N) rule
-6. a = architectural rule
-\end{alltt}
+\newline
+\begin{tabular}{p{5mm}l}
+&1. R8 is the return address \\
+&2. s = same\_value rule \\
+&3. u = undefined rule \\
+&4. rN = register(N) rule \\
+&5. cN = offset(N) rule \\
+&6. a = architectural rule \\
+\end{tabular}
\begin{centering}
\setlength{\extrarowheight}{0.1cm}
The following notations apply in
Table \refersec{tab:callframeinformationexampleframedescriptionentryencoding}:
-
-\begin{alltt}
-1. <fs> = frame size
-2. <caf> = code alignment factor
-3. <daf> = data alignment factor
-\end{alltt}
+\newline
+\begin{tabular}{p{5mm}l}
+&\texttt{<fs> =} frame size \\
+&\texttt{<caf> =} code alignment factor \\
+&\texttt{<daf> =} data alignment factor \\
+\end{tabular}
\begin{centering}
is used to illustrate the
\addtoindexx{inlined subprogram call!examples}
use of DWARF to describe inlined subroutine calls. This
-example involves a nested subprogram INNER that makes uplevel
+example involves a nested subprogram \texttt{INNER} that makes uplevel
references to the formal parameter and local variable of the
-containing subprogram OUTER.
+containing subprogram \texttt{OUTER}.
\begin{figure}[here]
\begin{lstlisting}
There are several approaches that a compiler might take to
inlining for this sort of example. This presentation considers
three such approaches, all of which involve inline expansion
-of subprogram OUTER. (If OUTER is not inlined, the inlining
+of subprogram \texttt{OUTER}. (If \texttt{OUTER} is not inlined, the inlining
reduces to a simpler single level subset of the two level
approaches considered here.)
The approaches are:
\begin{enumerate}[1. ]
-\item Inline both OUTER and INNER in all cases
+\item Inline both \texttt{OUTER} and \texttt{INNER} in all cases
-\item Inline OUTER, multiple INNERs \\
-Treat INNER as a non\dash inlinable part of OUTER, compile and
-call a distinct normal version of INNER defined within each
-inlining of OUTER.
+\item Inline \texttt{OUTER}, multiple \texttt{INNER}s \\
+Treat \texttt{INNER} as a non\dash inlinable part of \texttt{OUTER}, compile and
+call a distinct normal version of \texttt{INNER} defined within each
+inlining of \texttt{OUTER}.
-\item Inline OUTER, one INNER \\
-Compile INNER as a single normal subprogram which is called
-from every inlining of OUTER.
+\item Inline \texttt{OUTER}, one \texttt{INNER} \\
+Compile \texttt{INNER} as a single normal subprogram which is called
+from every inlining of \texttt{OUTER}.
\end{enumerate}
This discussion does not consider why a compiler might choose
where
\begin{description}
\item[\textless io\textgreater]
-is either INNER or OUTER to indicate to which
+is either \texttt{INNER} or \texttt{OUTER} to indicate to which
subprogram the debugging information entry applies,
\item[\textless ac\textgreater]
is either AI or CI to indicate ``abstract instance'' or
\label{app:inlinebothouterandinner}
A suitable abstract instance for an alternative where both
-OUTER and INNER are always inlined is shown in
+\texttt{OUTER} and \texttt{INNER} are always inlined is shown in
Figure \refersec{fig:inliningexample1abstractinstance}.
Notice in
-Figure \refersec{fig:inliningexample1abstractinstance}
+Figure \ref{fig:inliningexample1abstractinstance}
that the debugging information entry for
-INNER (labelled INNER.AI.1.1) is nested in (is a child of)
-that for OUTER (labelled OUTER.AI.1.1). Nonetheless, the
-abstract instance tree for INNER is considered to be separate
-and distinct from that for OUTER.
+\texttt{INNER} (labelled \texttt{INNER.AI.1.1}) is nested in (is a child of)
+that for \texttt{OUTER} (labelled \texttt{OUTER.AI.1.1}). Nonetheless, the
+abstract instance tree for \texttt{INNER} is considered to be separate
+and distinct from that for \texttt{OUTER}.
-The call of OUTER shown in
+The call of \texttt{OUTER} shown in
Figure \refersec{fig:inliningexamplespseudosourcefragment}
might be described as
shown in
\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin}(reference to INNER.AI.1.2)
\livelink{chap:DWATlocation}{DW\_AT\_location}(...)
INNER.CI.1.3:
- \livelink{chap:DWTAGvariable}{DW\_TAG\_variable}
+ \livelink{chap:DWTAGvariable}{DW\_TAG\_variable}
! No name
\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin}(reference to INNER.AI.1.3)
\livelink{chap:DWATlocation}{DW\_AT\_location}(...)
\label{app:inlineoutermultiipleinners}
-In the second alternative we assume that subprogram INNER
-is not inlinable for some reason, but subprogram OUTER is
+In the second alternative we assume that subprogram \texttt{INNER}
+is not inlinable for some reason, but subprogram \texttt{OUTER} is
inlinable.
\addtoindexx{concrete instance!example}
-Each concrete inlined instance of OUTER has its
-own normal instance of INNER.
-The abstract instance for OUTER,
+Each concrete inlined instance of \texttt{OUTER} has its
+own normal instance of \texttt{INNER}.
+The abstract instance for \texttt{OUTER},
\addtoindexx{abstract instance!example}
-which includes INNER, is shown in
+which includes \texttt{INNER}, is shown in
Figure \refersec{fig:inliningexample2abstractinstance}.
-Note that the debugging information in this Figure differs from
-that in
+Note that the debugging information in
+Figure \ref{fig:inliningexample2abstractinstance}
+differs from that in
Figure \refersec{fig:inliningexample1abstractinstance}
-in that INNER lacks a
+in that \texttt{INNER} lacks a
\livelink{chap:DWATinline}{DW\_AT\_inline} attribute
-and therefore is not a distinct abstract instance. INNER
-is merely an out\dash of\dash line routine that is part of OUTER\textquoteright s
+and therefore is not a distinct abstract instance. \texttt{INNER}
+is merely an out\dash of\dash line routine that is part of \texttt{OUTER}\textquoteright s
abstract instance. This is reflected in the Figure by
\addtoindexx{abstract instance!example}
-the fact that the labels for INNER use the substring OUTER
-instead of INNER.
+the fact that the labels for \texttt{INNER} use the substring \texttt{OUTER}
+instead of \texttt{INNER}.
A resulting
\addtoindexx{concrete instance!example}
-concrete inlined instance of OUTER is shown in
+concrete inlined instance of \texttt{OUTER} is shown in
Figure \refersec{fig:inliningexample2concreteinstance}.
Notice in
-Figure \refersec{fig:inliningexample2concreteinstance}.
-that OUTER is expanded as a concrete
+Figure \ref{fig:inliningexample2concreteinstance}
+that \texttt{OUTER} is expanded as a concrete
\addtoindexx{concrete instance!example}
-inlined instance, and that INNER is nested within it as a
-concrete out\dash of\dash line subprogram. Because INNER is cloned
-for each inline expansion of OUTER, only the invariant
-attributes of INNER
+inlined instance, and that \texttt{INNER} is nested within it as a
+concrete out\dash of\dash line subprogram. Because \texttt{INNER} is cloned
+for each inline expansion of \texttt{OUTER}, only the invariant
+attributes of \texttt{INNER}
(for example, \livelink{chap:DWATname}{DW\_AT\_name}) are specified
-in the abstract instance of OUTER, and the low\dash level,
+in the abstract instance of \texttt{OUTER}, and the low\dash level,
\addtoindexx{abstract instance!example}
-instance\dash specific attributes of INNER (for example,
+instance\dash specific attributes of \texttt{INNER} (for example,
\livelink{chap:DWATlowpc}{DW\_AT\_low\_pc}) are specified in
-each concrete instance of OUTER.
+each concrete instance of \texttt{OUTER}.
\addtoindexx{concrete instance!example}
-The several calls of INNER within OUTER are compiled as normal
-calls to the instance of INNER that is specific to the same
-instance of OUTER that contains the calls.
+
+The several calls of \texttt{INNER} within \texttt{OUTER} are compiled as normal
+calls to the instance of \texttt{INNER} that is specific to the same
+instance of \texttt{OUTER} that contains the calls.
\begin{figure}[t]
\begin{dwflisting}
\subsection{Alternative \#3: inline OUTER, one normal INNER}
\label{app:inlineouteronenormalinner}
-In the third approach, one normal subprogram for INNER is
+In the third approach, one normal subprogram for \texttt{INNER} is
compiled which is called from all concrete inlined instances of
\addtoindexx{concrete instance!example}
\addtoindexx{abstract instance!example}
-OUTER. The abstract instance for OUTER is shown in
+\texttt{OUTER}. The abstract instance for \texttt{OUTER} is shown in
Figure \refersec{fig:inliningexample3abstractinstance}.
The most distinctive aspect of that Figure is that subprogram
-INNER exists only within the abstract instance of OUTER,
-and not in OUTER\textquoteright s concrete instance. In the abstract
+\texttt{INNER} exists only within the abstract instance of \texttt{OUTER},
+and not in \texttt{OUTER}\textquoteright s concrete instance. In the abstract
\addtoindexx{concrete instance!example}
\addtoindexx{abstract instance!example}
-instance of OUTER, the description of INNER has the full
+instance of \texttt{OUTER}, the description of \texttt{INNER} has the full
complement of attributes that would be expected for a
normal subprogram.
While attributes such as
abstract instance because they are not invariant across
instances of the containing abstract instance, in this case
those same attributes are included precisely because they are
-invariant -- there is only one subprogram INNER to be described
+invariant -- there is only one subprogram \texttt{INNER} to be described
and every description is the same.
-A concrete inlined instance of OUTER is illustrated in
+A concrete inlined instance of \texttt{OUTER} is illustrated in
Figure \refersec{fig:inliningexample3concreteinstance}.
Notice in
-Figure \refersec{fig:inliningexample3abstractinstance}
+Figure \ref{fig:inliningexample3concreteinstance}
that there is no DWARF representation for
-INNER at all; the representation of INNER does not vary across
-instances of OUTER and the abstract instance of OUTER includes
-the complete description of INNER, so that the description of
-INNER may be (and for reasons of space efficiency, should be)
+\texttt{INNER} at all; the representation of \texttt{INNER} does not vary across
+instances of \texttt{OUTER} and the abstract instance of \texttt{OUTER} includes
+the complete description of \texttt{INNER}, so that the description of
+\texttt{INNER} may be (and for reasons of space efficiency, should be)
omitted from each
\addtoindexx{concrete instance!example}
-concrete instance of OUTER.
+concrete instance of \texttt{OUTER}.
There is one aspect of this approach that is problematical from
-the DWARF perspective. The single compiled instance of INNER
-is assumed to access up\dash level variables of OUTER; however,
+the DWARF perspective. The single compiled instance of \texttt{INNER}
+is assumed to access up\dash level variables of \texttt{OUTER}; however,
those variables may well occur at varying positions within
the frames that contain the
\addtoindexx{concrete instance!example}
concrete inlined instances. A
compiler might implement this in several ways, including the
-use of additional compiler generated parameters that provide
-reference parameters for the up\dash level variables, or a compiler
-generated static link like parameter that points to the group
+use of additional compiler-generated parameters that provide
+reference parameters for the up\dash level variables, or a
+compiler-generated static link like parameter that points to the group
of up\dash level entities, among other possibilities. In either of
these cases, the DWARF description for the location attribute
of each uplevel variable needs to be different if accessed
-from within INNER compared to when accessed from within the
-instances of OUTER. An implementation is likely to require
+from within \texttt{INNER} compared to when accessed from within the
+instances of \texttt{OUTER}. An implementation is likely to require
vendor\dash specific DWARF attributes and/or debugging information
entries to describe such cases.
Note that in C++, a member function of a class defined within
a function definition does not require any vendor\dash specific
extensions because the C++ language disallows access to
-entities that would give rise to this problem. (Neither extern
-variables nor static members require any form of static link
+entities that would give rise to this problem. (Neither \texttt{extern}
+variables nor \texttt{static} members require any form of static link
for accessing purposes.)
\begin{figure}[t]
\livelink{chap:DWATname}{DW\_AT\_name}("square")
\livelink{chap:DWATtype}{DW\_AT\_type}(reference to "int")
\livelink{chap:DWATinline}{DW\_AT\_inline}(\livelink{chap:DWINLinlined}{DW\_INL\_inlined})
-11\$: \livelink{chap:DWTAGformalparameter}{DW\_TAG\_formal\_parameter}
- \livelink{chap:DWATname}{DW\_AT\_name}("x")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "int")
+11\$: \livelink{chap:DWTAGformalparameter}{DW\_TAG\_formal\_parameter}
+ \livelink{chap:DWATname}{DW\_AT\_name}("x")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "int")
! Concrete instance for square(9)
! \addtoindexx{concrete instance!example}
20\$: \livelink{chap:DWTAGinlinedsubroutine}{DW\_TAG\_inlined\_subroutine}
\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin}(reference to 10\$)
\livelink{chap:DWATconstexpr}{DW\_AT\_const\_expr}(present)
\livelink{chap:DWATconstvalue}{DW\_AT\_const\_value}(81)
- \livelink{chap:DWTAGformalparameter}{DW\_TAG\_formal\_parameter}
- \livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin}(reference to 11\$)
- \livelink{chap:DWATconstvalue}{DW\_AT\_const\_value}(9)
+ \livelink{chap:DWTAGformalparameter}{DW\_TAG\_formal\_parameter}
+ \livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin}(reference to 11\$)
+ \livelink{chap:DWATconstvalue}{DW\_AT\_const\_value}(9)
! Anonymous array type for arr
!
30\$: \livelink{chap:DWTAGarraytype}{DW\_TAG\_array\_type}
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "float")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "float")
\livelink{chap:DWATbytesize}{DW\_AT\_byte\_size}(324) ! 81*4
- \livelink{chap:DWTAGsubrangetype}{DW\_TAG\_subrange\_type}
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "int")
- \livelink{chap:DWATupperbound}{DW\_AT\_upper\_bound}(reference to 20\$)
+ \livelink{chap:DWTAGsubrangetype}{DW\_TAG\_subrange\_type}
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "int")
+ \livelink{chap:DWATupperbound}{DW\_AT\_upper\_bound}(reference to 20\$)
! Variable arr
!
40\$: \livelink{chap:DWTAGvariable}{DW\_TAG\_variable}
can be described in DWARF as illustrated in
Figure \refersec{fig:ctypesafeenumerationexampledwarf}.
+\clearpage % Get following source and DWARF on same page
+
\begin{figure}[H]
\begin{lstlisting}[numbers=none]
// C++ source
\begin{alltt}
! DWARF description
!
-11\$: \livelink{chap:DWTAGenumerationtype}{DW\_TAG\_enumeration\_type}
- \livelink{chap:DWATname}{DW\_AT\_name}("E")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "int")
- \livelink{chap:DWATenumclass}{DW\_AT\_enum\_class}(present)
-12\$: \livelink{chap:DWTAGenumerator}{DW\_TAG\_enumerator}
- \livelink{chap:DWATname}{DW\_AT\_name}("E1")
- \livelink{chap:DWATconstvalue}{DW\_AT\_const\_value}(0)
-13\$:
- \livelink{chap:DWTAGenumerator}{DW\_TAG\_enumerator}
- \livelink{chap:DWATname}{DW\_AT\_name}("E2")
- \livelink{chap:DWATconstvalue}{DW\_AT\_const\_value}(100)
-14\$: \livelink{chap:DWTAGvariable}{DW\_TAG\_variable}
- \livelink{chap:DWATname}{DW\_AT\_name}("e1")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 11\$)
+11\$: \livelink{chap:DWTAGenumerationtype}{DW\_TAG\_enumeration\_type}
+ \livelink{chap:DWATname}{DW\_AT\_name}("E")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "int")
+ \livelink{chap:DWATenumclass}{DW\_AT\_enum\_class}(present)
+12\$: \livelink{chap:DWTAGenumerator}{DW\_TAG\_enumerator}
+ \livelink{chap:DWATname}{DW\_AT\_name}("E1")
+ \livelink{chap:DWATconstvalue}{DW\_AT\_const\_value}(0)
+13\$: \livelink{chap:DWTAGenumerator}{DW\_TAG\_enumerator}
+ \livelink{chap:DWATname}{DW\_AT\_name}("E2")
+ \livelink{chap:DWATconstvalue}{DW\_AT\_const\_value}(100)
+14\$: \livelink{chap:DWTAGvariable}{DW\_TAG\_variable}
+ \livelink{chap:DWATname}{DW\_AT\_name}("e1")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 11\$)
\end{alltt}
\end{dwflisting}
\caption{Type-safe enumeration example: DWARF description}
!
11\$: \livelink{chap:DWTAGstructuretype}{DW\_TAG\_structure\_type}
\livelink{chap:DWATname}{DW\_AT\_name}("wrapper")
-12\$: \livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
- \livelink{chap:DWATname}{DW\_AT\_name}("T")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "int")
-13\$ \livelink{chap:DWTAGmember}{DW\_TAG\_member}
- \livelink{chap:DWATname}{DW\_AT\_name}("comp")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 12\$)
+12\$: \livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
+ \livelink{chap:DWATname}{DW\_AT\_name}("T")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "int")
+13\$: \livelink{chap:DWTAGmember}{DW\_TAG\_member}
+ \livelink{chap:DWATname}{DW\_AT\_name}("comp")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 12\$)
14\$: \livelink{chap:DWTAGvariable}{DW\_TAG\_variable}
\livelink{chap:DWATname}{DW\_AT\_name}("obj")
\livelink{chap:DWATtype}{DW\_AT\_type}(reference to 11\$)
\label{fig:ctemplateexample1dwarf}
\end{figure}
-The actual type of the component comp is int, but in the DWARF
+The actual type of the component \texttt{comp} is \texttt{int}, but in the DWARF
the type references the
\livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
-for T, which in turn references int. This implies that in the
-original template comp was of type T and that was replaced
-with int in the instance. There exist situations where it is
-not possible for the DWARF to imply anything about the nature
-of the original template.
+for \texttt{T}, which in turn references \texttt{int}. This implies that in the
+original template comp was of type \texttt{T} and that was replaced
+with \texttt{int} in the instance.
\needlines{10}
+There exist situations where it is
+not possible for the DWARF to imply anything about the nature
+of the original template.
Consider the C++ template source in
Figure \refersec{fig:ctemplateexample2source}
and the DWARF that can describe it in
\begin{alltt}
! DWARF description
!
-11\$: \livelink{chap:DWTAGstructuretype}{DW\_TAG\_structure\_type}
- \livelink{chap:DWATname}{DW\_AT\_name}("wrapper")
-12\$: \livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
- \livelink{chap:DWATname}{DW\_AT\_name}("T")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "int")
-13\$ \livelink{chap:DWTAGmember}{DW\_TAG\_member}
- \livelink{chap:DWATname}{DW\_AT\_name}("comp")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 12\$)
-14\$: \livelink{chap:DWTAGvariable}{DW\_TAG\_variable}
- \livelink{chap:DWATname}{DW\_AT\_name}("obj")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 11\$)
-21\$: \livelink{chap:DWTAGsubprogram}{DW\_TAG\_subprogram}
- \livelink{chap:DWATname}{DW\_AT\_name}("consume")
-22\$: \livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
- \livelink{chap:DWATname}{DW\_AT\_name}("U")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "int")
-23\$: \livelink{chap:DWTAGformalparameter}{DW\_TAG\_formal\_parameter}
- \livelink{chap:DWATname}{DW\_AT\_name}("formal")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 11\$)
+11\$: \livelink{chap:DWTAGstructuretype}{DW\_TAG\_structure\_type}
+ \livelink{chap:DWATname}{DW\_AT\_name}("wrapper")
+12\$: \livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
+ \livelink{chap:DWATname}{DW\_AT\_name}("T")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "int")
+13\$: \livelink{chap:DWTAGmember}{DW\_TAG\_member}
+ \livelink{chap:DWATname}{DW\_AT\_name}("comp")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 12\$)
+14\$: \livelink{chap:DWTAGvariable}{DW\_TAG\_variable}
+ \livelink{chap:DWATname}{DW\_AT\_name}("obj")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 11\$)
+21\$: \livelink{chap:DWTAGsubprogram}{DW\_TAG\_subprogram}
+ \livelink{chap:DWATname}{DW\_AT\_name}("consume")
+22\$: \livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
+ \livelink{chap:DWATname}{DW\_AT\_name}("U")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "int")
+23\$: \livelink{chap:DWTAGformalparameter}{DW\_TAG\_formal\_parameter}
+ \livelink{chap:DWATname}{DW\_AT\_name}("formal")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 11\$)
\end{alltt}
\end{dwflisting}
\caption{C++ template example \#2: DWARF description}
\end{figure}
In the \livelink{chap:DWTAGsubprogram}{DW\_TAG\_subprogram}
-entry for the instance of consume, U is described as int.
+entry for the instance of consume, \texttt{U} is described as \texttt{int}.
The type of formal is \texttt{wrapper\textless U\textgreater} in
the source. DWARF only represents instantiations of templates;
there is no entry which represents \texttt{wrapper\textless U\textgreater}
23\$.
There is no
description of the relationship between template type parameter
-T at 12\$ and U at 22\$ which was used to instantiate
+\texttt{T} at 12\$ and \texttt{U} at 22\$ which was used to instantiate
\texttt{wrapper\textless U\textgreater}.
A consequence of this is that the DWARF information would
not distinguish between the existing example and one where
-the formal of consume were declared in the source to be
+the formal parameter of \texttt{consume} were declared in the source to be
\texttt{wrapper\textless int\textgreater}.
\begin{alltt}
! DWARF representation for variable 'b'
!
-20\$: \livelink{chap:DWTAGstructuretype}{DW\_TAG\_structure\_type}
- \livelink{chap:DWATname}{DW\_AT\_name}("Alpha")
-21\$: \livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
- \livelink{chap:DWATname}{DW\_AT\_name}("T")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "long")
-22\$: \livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
- \livelink{chap:DWATname}{DW\_AT\_name}("U")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "long")
-23\$: \livelink{chap:DWTAGmember}{DW\_TAG\_member}
- \livelink{chap:DWATname}{DW\_AT\_name}("tango")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 21\$)
-24\$: \livelink{chap:DWTAGmember}{DW\_TAG\_member}
- \livelink{chap:DWATname}{DW\_AT\_name}("uniform")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 22\$)
-25\$: \livelink{chap:DWTAGtemplatealias}{DW\_TAG\_template\_alias}
- \livelink{chap:DWATname}{DW\_AT\_name}("Beta")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 20\$)
-26\$: \livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
- \livelink{chap:DWATname}{DW\_AT\_name}("V")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "long")
-27\$: \livelink{chap:DWTAGvariable}{DW\_TAG\_variable}
- \livelink{chap:DWATname}{DW\_AT\_name}("b")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 25\$)
+20\$: \livelink{chap:DWTAGstructuretype}{DW\_TAG\_structure\_type}
+ \livelink{chap:DWATname}{DW\_AT\_name}("Alpha")
+21\$: \livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
+ \livelink{chap:DWATname}{DW\_AT\_name}("T")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "long")
+22\$: \livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
+ \livelink{chap:DWATname}{DW\_AT\_name}("U")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "long")
+23\$: \livelink{chap:DWTAGmember}{DW\_TAG\_member}
+ \livelink{chap:DWATname}{DW\_AT\_name}("tango")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 21\$)
+24\$: \livelink{chap:DWTAGmember}{DW\_TAG\_member}
+ \livelink{chap:DWATname}{DW\_AT\_name}("uniform")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 22\$)
+25\$: \livelink{chap:DWTAGtemplatealias}{DW\_TAG\_template\_alias}
+ \livelink{chap:DWATname}{DW\_AT\_name}("Beta")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 20\$)
+26\$: \livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
+ \livelink{chap:DWATname}{DW\_AT\_name}("V")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "long")
+27\$: \livelink{chap:DWTAGvariable}{DW\_TAG\_variable}
+ \livelink{chap:DWATname}{DW\_AT\_name}("b")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 25\$)
\end{alltt}
\end{dwflisting}
\caption{C++ template alias example \#1: DWARF description}
\begin{alltt}
! DWARF representation for X<Y<int>>
!
-30\$: \livelink{chap:DWTAGstructuretype}{DW\_TAG\_structure\_type}
- \livelink{chap:DWATname}{DW\_AT\_name}("Y")
-31\$: \livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
- \livelink{chap:DWATname}{DW\_AT\_name}("TY")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "int")
-32\$: \livelink{chap:DWTAGstructuretype}{DW\_TAG\_structure\_type}
- \livelink{chap:DWATname}{DW\_AT\_name}("X")
-33\$: \livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
- \livelink{chap:DWATname}{DW\_AT\_name}("TX")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 30\$)
-
+30\$: \livelink{chap:DWTAGstructuretype}{DW\_TAG\_structure\_type}
+ \livelink{chap:DWATname}{DW\_AT\_name}("Y")
+31\$: \livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
+ \livelink{chap:DWATname}{DW\_AT\_name}("TY")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "int")
+32\$: \livelink{chap:DWTAGstructuretype}{DW\_TAG\_structure\_type}
+ \livelink{chap:DWATname}{DW\_AT\_name}("X")
+33\$: \livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
+ \livelink{chap:DWATname}{DW\_AT\_name}("TX")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 30\$)
+!
! DWARF representation for X<Z<int>>
!
-40\$: \livelink{chap:DWTAGtemplatealias}{DW\_TAG\_template\_alias}
-using Z = Y<int>;
- \livelink{chap:DWATname}{DW\_AT\_name}("Z")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 30\$)
-41\$: \livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
- \livelink{chap:DWATname}{DW\_AT\_name}("T")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "int")
-42\$: \livelink{chap:DWTAGstructuretype}{DW\_TAG\_structure\_type}
- \livelink{chap:DWATname}{DW\_AT\_name}("X")
-43\$: \livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
- \livelink{chap:DWATname}{DW\_AT\_name}("TX")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 40\$)
+40\$: \livelink{chap:DWTAGtemplatealias}{DW\_TAG\_template\_alias}
+ \livelink{chap:DWATname}{DW\_AT\_name}("Z")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 30\$)
+41\$: \livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
+ \livelink{chap:DWATname}{DW\_AT\_name}("T")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to "int")
+42\$: \livelink{chap:DWTAGstructuretype}{DW\_TAG\_structure\_type}
+ \livelink{chap:DWATname}{DW\_AT\_name}("X")
+43\$: \livelink{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}
+ \livelink{chap:DWATname}{DW\_AT\_name}("TX")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to 40\$)
+!
! Note that 32\$ and 42\$ are actually the same type
!
-50\$: \livelink{chap:DWTAGvariable}{DW\_TAG\_variable}
- \livelink{chap:DWATname}{DW\_AT\_name}("y")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to \$32)
-51\$: \livelink{chap:DWTAGvariable}{DW\_TAG\_variable}
- \livelink{chap:DWATname}{DW\_AT\_name}("z")
- \livelink{chap:DWATtype}{DW\_AT\_type}(reference to \$42)
+50\$: \livelink{chap:DWTAGvariable}{DW\_TAG\_variable}
+ \livelink{chap:DWATname}{DW\_AT\_name}("y")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to \$32)
+51\$: \livelink{chap:DWTAGvariable}{DW\_TAG\_variable}
+ \livelink{chap:DWATname}{DW\_AT\_name}("z")
+ \livelink{chap:DWATtype}{DW\_AT\_type}(reference to \$42)
\end{alltt}
\end{dwflisting}
\caption{C++ template alias example \#2: DWARF description}
are pushed on the stack.
\begin{enumerate}[1. ]
\itembfnl{\livetarg{chap:DWOPlit0}{DW\_OP\_lit0}, \livetarg{chap:DWOPlit1}{DW\_OP\_lit1}, \dots, \livetarg{chap:DWOPlit31}{DW\_OP\_lit31}}
-The \livetarg{chap:DWOPlit}{DW\_OP\_lit}n operations encode the unsigned literal values
+The \livetarg{chap:DWOPlit}{DW\_OP\_lit}\textit{n} operations encode the unsigned literal values
from 0 through 31, inclusive.
\itembfnl{\livetarg{chap:DWOPaddr}{DW\_OP\_addr}}
The single operand of a \livetarg{chap:DWOPconstnu}{DW\_OP\_constnu} operation provides a 1,
2, 4, or 8\dash byte unsigned integer constant, respectively.
-\itembfnl{\livetarg{chap:DWOPconst1s}{DW\_OP\_const1s} , \livetarg{chap:DWOPconst2s}{DW\_OP\_const2s}, \livetarg{chap:DWOPconst4s}{DW\_OP\_const4s}, \livetarg{chap:DWOPconst8s}{DW\_OP\_const8s}}
+\itembfnl{\livetarg{chap:DWOPconst1s}{DW\_OP\_const1s}, \livetarg{chap:DWOPconst2s}{DW\_OP\_const2s}, \livetarg{chap:DWOPconst4s}{DW\_OP\_const4s}, \livetarg{chap:DWOPconst8s}{DW\_OP\_const8s}}
The single operand of a \livetarg{chap:DWOPconstns}{DW\_OP\_constns} operation provides a 1,
2, 4, or 8\dash byte signed integer constant, respectively.
\itembfnl{\livetarg{chap:DWOPconstu}{DW\_OP\_constu}}
-The single operand of the \livelink{chap:DWOPconstu}{DW\_OP\_constu} operation provides
+The single operand of the \livetarg{chap:DWOPconstu}{DW\_OP\_constu} operation provides
an unsigned LEB128 integer constant.
\itembfnl{\livetarg{chap:DWOPconsts}{DW\_OP\_consts}}
-The single operand of the \livelink{chap:DWOPconsts}{DW\_OP\_consts} operation provides
+The single operand of the \livetarg{chap:DWOPconsts}{DW\_OP\_consts} operation provides
a signed LEB128 integer constant.
\end{enumerate}
signed offset.
\begin{enumerate}[1. ]
\itembfnl{\livetarg{chap:DWOPfbreg}{DW\_OP\_fbreg}}
-The \livelink{chap:DWOPfbreg}{DW\_OP\_fbreg} operation provides a signed LEB128 offset
+The \livetarg{chap:DWOPfbreg}{DW\_OP\_fbreg} operation provides a signed LEB128 offset
from the address specified by the location description in the
\livelink{chap:DWATframebase}{DW\_AT\_frame\_base} attribute of the current function. (This
is typically a \doublequote{stack pointer} register plus or minus
the specified register.
\itembfnl{\livetarg{chap:DWOPbregx}{DW\_OP\_bregx} }
-The \livelink{chap:DWOPbregx}{DW\_OP\_bregx} operation has two operands: a register
+The \livetarg{chap:DWOPbregx}{DW\_OP\_bregx} operation has two operands: a register
which is specified by an unsigned LEB128 number, followed by
a signed LEB128 offset.
recently added entry) has index 0.
\begin{enumerate}[1. ]
\itembfnl{\livetarg{chap:DWOPdup}{DW\_OP\_dup}}
-The \livelink{chap:DWOPdup}{DW\_OP\_dup} operation duplicates the value at the top of the stack.
+The \livetarg{chap:DWOPdup}{DW\_OP\_dup} operation duplicates the value at the top of the stack.
\itembfnl{\livetarg{chap:DWOPdrop}{DW\_OP\_drop}}
-The \livelink{chap:DWOPdrop}{DW\_OP\_drop} operation pops the value at the top of the stack.
+The \livetarg{chap:DWOPdrop}{DW\_OP\_drop} operation pops the value at the top of the stack.
\itembfnl{\livetarg{chap:DWOPpick}{DW\_OP\_pick}}
-The single operand of the \livelink{chap:DWOPpick}{DW\_OP\_pick} operation provides a
+The single operand of the \livetarg{chap:DWOPpick}{DW\_OP\_pick} operation provides a
1\dash byte index. A copy of the stack entry with the specified
index (0 through 255, inclusive) is pushed onto the stack.
\itembfnl{\livetarg{chap:DWOPover}{DW\_OP\_over}}
-The \livelink{chap:DWOPover}{DW\_OP\_over} operation duplicates the entry currently second
+The \livetarg{chap:DWOPover}{DW\_OP\_over} operation duplicates the entry currently second
in the stack at the top of the stack.
This is equivalent to
a \livelink{chap:DWOPpick}{DW\_OP\_pick} operation, with index 1.
\itembfnl{\livetarg{chap:DWOPswap}{DW\_OP\_swap}}
-The \livelink{chap:DWOPswap}{DW\_OP\_swap} operation swaps the top two stack entries.
+The \livetarg{chap:DWOPswap}{DW\_OP\_swap} operation swaps the top two stack entries.
The entry at the top of the
stack becomes the second stack entry,
and the second entry becomes the top of the stack.
\itembfnl{\livetarg{chap:DWOProt}{DW\_OP\_rot}}
-The \livelink{chap:DWOProt}{DW\_OP\_rot} operation rotates the first three stack
+The \livetarg{chap:DWOProt}{DW\_OP\_rot} operation rotates the first three stack
entries. The entry at the top of the stack becomes the third
stack entry, the second entry becomes the top of the stack,
and the third entry becomes the second entry.
\itembfnl{\livetarg{chap:DWOPderef}{DW\_OP\_deref}}
-The \livelink{chap:DWOPderef}{DW\_OP\_deref}
+The \livetarg{chap:DWOPderef}{DW\_OP\_deref}
operation pops the top stack entry and
treats it as an address. The value
retrieved from that address is pushed.
address is the \addtoindex{size of an address} on the target machine.
\itembfnl{\livetarg{chap:DWOPderefsize}{DW\_OP\_deref\_size}}
-The \livelink{chap:DWOPderefsize}{DW\_OP\_deref\_size} operation behaves like the \livelink{chap:DWOPderef}{DW\_OP\_deref}
+The \livetarg{chap:DWOPderefsize}{DW\_OP\_deref\_size} operation behaves like the
+\livelink{chap:DWOPderef}{DW\_OP\_deref}
operation: it pops the top stack entry and treats it as an
address. The value retrieved from that address is pushed. In
-the \livelink{chap:DWOPderefsize}{DW\_OP\_deref\_size} operation, however, the size in bytes
+the \addtoindex{DW\_OP\_deref\_size} operation, however, the size in bytes
of the data retrieved from the dereferenced address is
specified by the single operand. This operand is a 1\dash byte
unsigned integral constant whose value may not be larger
target machine before being pushed onto the expression stack.
\itembfnl{\livetarg{chap:DWOPxderef}{DW\_OP\_xderef}}
-The \livelink{chap:DWOPxderef}{DW\_OP\_xderef} operation provides an extended dereference
+The \livetarg{chap:DWOPxderef}{DW\_OP\_xderef} operation provides an extended dereference
mechanism. The entry at the top of the stack is treated as an
address. The second stack entry is treated as an \doublequote{address
space identifier} for those architectures that support
\addtoindex{size of an address} on the target machine.
\itembfnl{\livetarg{chap:DWOPxderefsize}{DW\_OP\_xderef\_size}}
-The \livelink{chap:DWOPxderefsize}{DW\_OP\_xderef\_size} operation behaves like the
-\livelink{chap:DWOPxderef}{DW\_OP\_xderef} operation.The entry at the top of the stack is
+The \livetarg{chap:DWOPxderefsize}{DW\_OP\_xderef\_size} operation behaves like the
+\livelink{chap:DWOPxderef}{DW\_OP\_xderef} operation. The entry at the top of the stack is
treated as an address. The second stack entry is treated as
an \doublequote{address space identifier} for those architectures
that support
address spaces. The top two stack
elements are popped, and a data item is retrieved through an
implementation\dash defined address calculation and pushed as the
-new stack top. In the \livelink{chap:DWOPxderefsize}{DW\_OP\_xderef\_size} operation, however,
+new stack top. In the \addtoindex{DW\_OP\_xderef\_size} operation, however,
the size in bytes of the data retrieved from the
\addtoindexi{dereferenced}{address!dereference operator}
address is specified by the single operand. This operand is a
target machine before being pushed onto the expression stack.
\itembfnl{\livetarg{chap:DWOPpushobjectaddress}{DW\_OP\_push\_object\_address}}
-The \livelink{chap:DWOPpushobjectaddress}{DW\_OP\_push\_object\_address}
+The \livetarg{chap:DWOPpushobjectaddress}{DW\_OP\_push\_object\_address}
operation pushes the address
of the object currently being evaluated as part of evaluation
of a user presented expression. This object may correspond
(especially for arrays involving descriptors) that is analogous
to the implicit push of the base
\addtoindexi{address}{address!implicit push of base}
-of a structure prior
-to evaluation of a \livelink{chap:DWATdatamemberlocation}{DW\_AT\_data\_member\_location} to access a
-data member of a structure. For an example, see
+of a structure prior to evaluation of a
+\livelink{chap:DWATdatamemberlocation}{DW\_AT\_data\_member\_location}
+to access a data member of a structure. For an example, see
Appendix \refersec{app:aggregateexamples}.}
\needlines{4}
\itembfnl{\livetarg{chap:DWOPformtlsaddress}{DW\_OP\_form\_tls\_address}}
-The \livelink{chap:DWOPformtlsaddress}{DW\_OP\_form\_tls\_address} operation pops a value from the
+The \livetarg{chap:DWOPformtlsaddress}{DW\_OP\_form\_tls\_address}
+operation pops a value from the
stack, translates it into an address in the current thread's
\addtoindexx{thread-local storage}
thread\dash local storage \nolink{block}, and pushes the address. If the
DWARF expression containing
-the \livelink{chap:DWOPformtlsaddress}{DW\_OP\_form\_tls\_address}
+the \addtoindex{DW\_OP\_form\_tls\_address}
operation belongs to the main executable's DWARF info, the
operation uses the main executable's thread\dash local storage
\nolink{block}; if the expression belongs to a shared library's
the appropriate \nolink{block} can be complex (in some cases, the
compiler emits a function call to do it), and difficult
to describe using ordinary DWARF location descriptions.
-\livelink{chap:DWOPformtlsaddress}{DW\_OP\_form\_tls\_address} leaves the computation to the
+\addtoindex{DW\_OP\_form\_tls\_address} leaves the computation to the
consumer.}
\itembfnl{\livetarg{chap:DWOPcallframecfa}{DW\_OP\_call\_frame\_cfa}}
-The \livelink{chap:DWOPcallframecfa}{DW\_OP\_call\_frame\_cfa} operation pushes the value of the
+The \livetarg{chap:DWOPcallframecfa}{DW\_OP\_call\_frame\_cfa}
+operation pushes the value of the
CFA, obtained from the Call Frame Information
(see Section \refersec{chap:callframeinformation}).
-\textit{Although the value of \livelink{chap:DWATframebase}{DW\_AT\_frame\_base}
+\textit{Although the value of \addtoindex{DW\_AT\_frame\_base}
can be computed using other DWARF expression operators,
in some cases this would require an extensive location list
because the values of the registers used in computing the
Such operations do not cause an exception on overflow.
\begin{enumerate}[1. ]
\itembfnl{\livetarg{chap:DWOPabs}{DW\_OP\_abs}}
-The \livelink{chap:DWOPabs}{DW\_OP\_abs} operation pops the top stack entry, interprets
+The \livetarg{chap:DWOPabs}{DW\_OP\_abs} operation pops the top stack entry, interprets
it as a signed value and pushes its absolute value. If the
absolute value cannot be represented, the result is undefined.
\itembfnl{\livetarg{chap:DWOPand}{DW\_OP\_and}}
-The \livelink{chap:DWOPand}{DW\_OP\_and} operation pops the top two stack values, performs
+The \livetarg{chap:DWOPand}{DW\_OP\_and} operation pops the top two stack values, performs
a bitwise and operation on the two, and pushes the result.
\itembfnl{\livetarg{chap:DWOPdiv}{DW\_OP\_div}}
-The \livelink{chap:DWOPdiv}{DW\_OP\_div} operation pops the top two stack values, divides the former second entry by
+The \livetarg{chap:DWOPdiv}{DW\_OP\_div} operation pops the top two stack values, divides the former second entry by
the former top of the stack using signed division, and pushes the result.
\itembfnl{\livetarg{chap:DWOPminus}{DW\_OP\_minus}}
-The \livelink{chap:DWOPminus}{DW\_OP\_minus} operation pops the top two stack values, subtracts the former top of the
+The \livetarg{chap:DWOPminus}{DW\_OP\_minus} operation pops the top two stack values, subtracts the former top of the
stack from the former second entry, and pushes the result.
\itembfnl{\livetarg{chap:DWOPmod}{DW\_OP\_mod}}
-The \livelink{chap:DWOPmod}{DW\_OP\_mod} operation pops the top two stack values and pushes the result of the
+The \livetarg{chap:DWOPmod}{DW\_OP\_mod} operation pops the top two stack values and pushes the result of the
calculation: former second stack entry modulo the former top of the stack.
\itembfnl{\livetarg{chap:DWOPmul}{DW\_OP\_mul}}
-The \livelink{chap:DWOPmul}{DW\_OP\_mul} operation pops the top two stack entries, multiplies them together, and
+The \livetarg{chap:DWOPmul}{DW\_OP\_mul} operation pops the top two stack entries, multiplies them together, and
pushes the result.
\itembfnl{\livetarg{chap:DWOPneg}{DW\_OP\_neg}}
-The \livelink{chap:DWOPneg}{DW\_OP\_neg} operation pops the top stack entry, interprets
+The \livetarg{chap:DWOPneg}{DW\_OP\_neg} operation pops the top stack entry, interprets
it as a signed value and pushes its negation. If the negation
cannot be represented, the result is undefined.
\itembfnl{\livetarg{chap:DWOPnot}{DW\_OP\_not}}
-The \livelink{chap:DWOPnot}{DW\_OP\_not} operation pops the top stack entry, and pushes
+The \livetarg{chap:DWOPnot}{DW\_OP\_not} operation pops the top stack entry, and pushes
its bitwise complement.
\itembfnl{\livetarg{chap:DWOPor}{DW\_OP\_or}}
-The \livelink{chap:DWOPor}{DW\_OP\_or} operation pops the top two stack entries, performs
+The \livetarg{chap:DWOPor}{DW\_OP\_or} operation pops the top two stack entries, performs
a bitwise or operation on the two, and pushes the result.
\itembfnl{\livetarg{chap:DWOPplus}{DW\_OP\_plus}}
-The \livelink{chap:DWOPplus}{DW\_OP\_plus} operation pops the top two stack entries,
+The \livetarg{chap:DWOPplus}{DW\_OP\_plus} operation pops the top two stack entries,
adds them together, and pushes the result.
\itembfnl{\livetarg{chap:DWOPplusuconst}{DW\_OP\_plus\_uconst}}
-The \livelink{chap:DWOPplusuconst}{DW\_OP\_plus\_uconst} operation pops the top stack entry,
+The \livetarg{chap:DWOPplusuconst}{DW\_OP\_plus\_uconst} operation pops the top stack entry,
adds it to the unsigned LEB128 constant operand and pushes
the result.
\needlines{3}
\itembfnl{\livetarg{chap:DWOPshl}{DW\_OP\_shl}}
-The \livelink{chap:DWOPshl}{DW\_OP\_shl} operation pops the top two stack entries,
+The \livetarg{chap:DWOPshl}{DW\_OP\_shl} operation pops the top two stack entries,
shifts the former second entry left (filling with zero bits)
by the number of bits specified by the former top of the stack,
and pushes the result.
\itembfnl{\livetarg{chap:DWOPshr}{DW\_OP\_shr}}
-The \livelink{chap:DWOPshr}{DW\_OP\_shr} operation pops the top two stack entries,
+The \livetarg{chap:DWOPshr}{DW\_OP\_shr} operation pops the top two stack entries,
shifts the former second entry right logically (filling with
zero bits) by the number of bits specified by the former top
of the stack, and pushes the result.
\needlines{6}
\itembfnl{\livetarg{chap:DWOPshra}{DW\_OP\_shra}}
-The \livelink{chap:DWOPshra}{DW\_OP\_shra} operation pops the top two stack entries,
+The \livetarg{chap:DWOPshra}{DW\_OP\_shra} operation pops the top two stack entries,
shifts the former second entry right arithmetically (divide
the magnitude by 2, keep the same sign for the result) by
the number of bits specified by the former top of the stack,
and pushes the result.
\itembfnl{\livetarg{chap:DWOPxor}{DW\_OP\_xor}}
-The \livelink{chap:DWOPxor}{DW\_OP\_xor} operation pops the top two stack entries,
+The \livetarg{chap:DWOPxor}{DW\_OP\_xor} operation pops the top two stack entries,
performs a bitwise exclusive\dash or operation on the two, and
pushes the result.
\end{itemize}
Comparisons are performed as signed operations. The six
-operators are \livelink{chap:DWOPle}{DW\_OP\_le} (less than or equal to), \livelink{chap:DWOPge}{DW\_OP\_ge}
-(greater than or equal to), \livelink{chap:DWOPeq}{DW\_OP\_eq} (equal to), \livelink{chap:DWOPlt}{DW\_OP\_lt} (less
-than), \livelink{chap:DWOPgt}{DW\_OP\_gt} (greater than) and \livelink{chap:DWOPne}{DW\_OP\_ne} (not equal to).
+operators are \addtoindex{DW\_OP\_le} (less than or equal to), \addtoindex{DW\_OP\_ge}
+(greater than or equal to), \addtoindex{DW\_OP\_eq} (equal to), \addtoindex{DW\_OP\_lt} (less
+than), \addtoindex{DW\_OP\_gt} (greater than) and \addtoindex{DW\_OP\_ne} (not equal to).
\needlines{6}
\itembfnl{\livetarg{chap:DWOPskip}{DW\_OP\_skip}}
-\livelink{chap:DWOPskip}{DW\_OP\_skip} is an unconditional branch. Its single operand
+\livetarg{chap:DWOPskip}{DW\_OP\_skip} is an unconditional branch. Its single operand
is a 2\dash byte signed integer constant. The 2\dash byte constant is
the number of bytes of the DWARF expression to skip forward
or backward from the current operation, beginning after the
2\dash byte constant.
\itembfnl{\livetarg{chap:DWOPbra}{DW\_OP\_bra}}
-\livelink{chap:DWOPbra}{DW\_OP\_bra} is a conditional branch. Its single operand is a
+\livetarg{chap:DWOPbra}{DW\_OP\_bra} is a conditional branch. Its single operand is a
2\dash byte signed integer constant. This operation pops the
top of stack. If the value popped is not the constant 0,
the 2\dash byte constant operand is the number of bytes of the
% to an overfull hbox and a visible artifact.
% So we use \- to suggest hyphenation in this rare situation.
\itembfnl{\livetarg{chap:DWOPcall2}{DW\_OP\_call2}, \livetarg{chap:DWOPcall4}{DW\_OP\_call4}, \livetarg{chap:DWOPcallref}{DW\_OP\_call\_ref}}
-\livelink{chap:DWOPcall2}{DW\_OP\_call2},
-\livelink{chap:DWOPcall4}{DW\_OP\_call4},
-and \livelink{chap:DWOPcallref}{DW\_OP\_call\_ref} perform
+\addtoindex{DW\_OP\_call2},
+\addtoindex{DW\_OP\_call4},
+and \addtoindex{DW\_OP\_call\_ref} perform
subroutine calls during evaluation of a DWARF expression or
location description.
-For \livelink{chap:DWOPcall2}{DW\_OP\_call2} and
-\livelink{chap:DWOPcall4}{DW\_OP\_call4},
-the
-operand is the 2\dash~ or 4\dash byte
-unsigned offset, respectively,
+For \addtoindex{DW\_OP\_call2} and \addtoindex{DW\_OP\_call4},
+the operand is the 2\dash~ or 4\dash byte unsigned offset, respectively,
of a debugging information entry in the current compilation
-unit. The \livelink{chap:DWOPcallref}{DW\_OP\_call\_ref} operator has a single operand. In the
-32\dash bit DWARF format, the operand is a 4\dash byte unsigned value;
-in the 64\dash bit DWARF format, it is an 8\dash byte unsigned value
+unit. The \addtoindex{DW\_OP\_call\_ref} operator has a single operand. In the
+\thirtytwobitdwarfformat,
+the operand is a 4\dash byte unsigned value;
+in the \sixtyfourbitdwarfformat, it is an 8\dash byte unsigned value
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
The operand is used as the offset of a
debugging information entry in a
-\addtoindex{.debug\_info}
+\dotdebuginfo{}
or
-\addtoindex{.debug\_types}
+\dotdebugtypes{}
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{Operand interpretation of
-\livelink{chap:DWOPcall2}{DW\_OP\_call2}, \livelink{chap:DWOPcall4}{DW\_OP\_call4} and \livelink{chap:DWOPcallref}{DW\_OP\_call\_ref} is exactly like
+\addtoindex{DW\_OP\_call2}, \addtoindex{DW\_OP\_call4} and \addtoindex{DW\_OP\_call\_ref} is exactly like
that for \livelink{chap:DWFORMref2}{DW\_FORM\_ref2}, \livelink{chap:DWFORMref4}{DW\_FORM\_ref4} and \livelink{chap:DWFORMrefaddr}{DW\_FORM\_ref\_addr},
respectively
(see Section \refersec{datarep:attributeencodings}).
is one special operation currently defined:
\begin{enumerate}[1. ]
\itembfnl{\livetarg{chap:DWOPnop}{DW\_OP\_nop}}
-The \livelink{chap:DWOPnop}{DW\_OP\_nop} operation is a place holder. It has no effect
+The \livetarg{chap:DWOPnop}{DW\_OP\_nop} operation is a place holder. It has no effect
on the location stack or any of its values.
\end{enumerate}
addressed is in register \textit{n}.
\itembfnl{\livetarg{chap:DWOPregx}{DW\_OP\_regx}}
-The \livelink{chap:DWOPregx}{DW\_OP\_regx} operation has a single unsigned LEB128 literal
+The \livetarg{chap:DWOPregx}{DW\_OP\_regx} operation has a single unsigned LEB128 literal
operand that encodes the name of a register.
\end{enumerate}
or is computed from other locations and values in the program.
\begin{enumerate}[1. ]
\itembfnl{\livetarg{chap:DWOPimplicitvalue}{DW\_OP\_implicit\_value}}
-The \livelink{chap:DWOPimplicitvalue}{DW\_OP\_implicit\_value} operation specifies an immediate value
+The \livetarg{chap:DWOPimplicitvalue}{DW\_OP\_implicit\_value}
+operation specifies an immediate value
using two operands: an unsigned LEB128 length, followed by
%FIXME: should this block be a reference? To what?
a \nolink{block} representing the value in the memory representation
in bytes of the \nolink{block}.
\itembfnl{\livetarg{chap:DWOPstackvalue}{DW\_OP\_stack\_value}}
-The \livelink{chap:DWOPstackvalue}{DW\_OP\_stack\_value} operation specifies that the object
+The \livetarg{chap:DWOPstackvalue}{DW\_OP\_stack\_value}
+operation specifies that the object
does not exist in memory but its value is nonetheless known
and is at the top of the DWARF expression stack. In this form
of location description, the DWARF expression represents the
actual value of the object, rather than its location. The
-\livelink{chap:DWOPstackvalue}{DW\_OP\_stack\_value} operation terminates the expression.
+\addtoindex{DW\_OP\_stack\_value} operation terminates the expression.
\end{enumerate}
of the resultant value is contained.
\begin{enumerate}[1. ]
\itembfnl{\livetarg{chap:DWOPpiece}{DW\_OP\_piece}}
-The \livelink{chap:DWOPpiece}{DW\_OP\_piece} operation takes a
+The \livetarg{chap:DWOPpiece}{DW\_OP\_piece} operation takes a
single operand, which is an
unsigned LEB128 number. The number describes the size in bytes
of the piece of the object referenced by the preceding simple
\textit{Many compilers store a single variable in sets of registers,
or store a variable partially in memory and partially in
-registers. \livelink{chap:DWOPpiece}{DW\_OP\_piece} provides a way of describing how large
+registers. \addtoindex{DW\_OP\_piece} provides a way of describing how large
a part of a variable a particular DWARF location description
refers to. }
\itembfnl{\livetarg{chap:DWOPbitpiece}{DW\_OP\_bit\_piece}}
-The \livelink{chap:DWOPbitpiece}{DW\_OP\_bit\_piece} operation takes two operands. The first
+The \livetarg{chap:DWOPbitpiece}{DW\_OP\_bit\_piece}
+operation takes two operands. The first
is an unsigned LEB128 number that gives the size in bits
of the piece. The second is an unsigned LEB128 number that
gives the offset in bits from the location defined by the
Interpretation of the
offset depends on the kind of location description. If the
location description is empty, the offset doesn\textquoteright t matter and
-the \livelink{chap:DWOPbitpiece}{DW\_OP\_bit\_piece} operation describes a piece consisting
+the \addtoindex{DW\_OP\_bit\_piece} operation describes a piece consisting
of the given number of bits whose values are undefined. If
the location is a register, the offset is from the least
significant bit end of the register. If the location is a
-memory address, the \livelink{chap:DWOPbitpiece}{DW\_OP\_bit\_piece} operation describes a
+memory address, the \addtoindex{DW\_OP\_bit\_piece} operation describes a
sequence of bits relative to the location whose address is
on the top of the DWARF stack using the bit numbering and
direction conventions that are appropriate to the current
language on the target system. If the location is any implicit
-value or stack value, the \livelink{chap:DWOPbitpiece}{DW\_OP\_bit\_piece} operation describes
+value or stack value, the \addtoindex{DW\_OP\_bit\_piece} operation describes
a sequence of bits using the least significant bits of that
value.
\end{enumerate}
-\textit{\livelink{chap:DWOPbitpiece}{DW\_OP\_bit\_piece} is
-used instead of \livelink{chap:DWOPpiece}{DW\_OP\_piece} when
+\textit{\addtoindex{DW\_OP\_bit\_piece} is
+used instead of \addtoindex{DW\_OP\_piece} when
the piece to be assembled into a value or assigned to is not
byte-sized or is not at the start of a register or addressable
unit of memory.}
\doublequote{contents} of an otherwise anonymous location.
\descriptionitemnl{\livelink{chap:DWOPlit1}{DW\_OP\_lit1} \livelink{chap:DWOPstackvalue}{DW\_OP\_stack\_value} \livelink{chap:DWOPpiece}{DW\_OP\_piece} 4 }
+\vspace{-\parsep}
\descriptionitemnl{\livelink{chap:DWOPbreg}{DW\_OP\_breg3} 0 \livelink{chap:DWOPbreg}{DW\_OP\_breg4} 0 \livelink{chap:DWOPplus}{DW\_OP\_plus} \livelink{chap:DWOPstackvalue}{DW\_OP\_stack\_value} \livelink{chap:DWOPpiece}{DW\_OP\_piece} 4}
The object value is found in an anonymous (virtual) location whose
value consists of two parts, given in memory address order: the 4 byte
Location lists
\addtoindexx{location list}
are contained in a separate object file section called
-\addtoindex{.debug\_loc}. A location list is indicated by a location
+\dotdebugloc{}. A location list is indicated by a location
attribute whose value is an offset from the beginning of
-the \addtoindex{.debug\_loc} section to the first byte of the list for the
+the \dotdebugloc{} section to the first byte of the list for the
object in question.
Each entry in a location list is either a location
Range lists are contained
in a separate object file section called
-\addtoindex{.debug\_ranges}. A
+\dotdebugranges{}. A
\addtoindex{range list} is indicated by a
\livelink{chap:DWATranges}{DW\_AT\_ranges} attribute whose
\addtoindexx{ranges attribute}
value is represented as an offset from the beginning of the
-\addtoindex{.debug\_ranges} section to the beginning of the
+\dotdebugranges{} section to the beginning of the
\addtoindex{range list}.
Each entry in a \addtoindex{range list} is either a
Version 1 information. To make it easier for consumers to
support both Version 1 and Version 2 DWARF information, the
Version 2 information has been moved to a different object
-file section, \addtoindex{.debug\_info}.
+file section, \dotdebuginfo{}.
\textit{
A summary of the major changes made in
% references to chapter 7 look like {datarep:...}
This section describes debugging information that is not
represented in the form of debugging information entries and
-is not contained within a \addtoindex{.debug\_info} or
-\addtoindex{.debug\_types} section.
+is not contained within a \dotdebuginfo{} or
+\dotdebugtypes{} section.
In the descriptions that follow, these terms are used to
specify the representation of DWARF sections:
-
+\begin{itemize}
+\item
Initial length, section offset and
\addtoindex{section length}, which are
defined in
Sections \refersec{datarep:locationdescriptions} and
\refersec{datarep:32bitand64bitdwarfformats}.
-
+\item
Sbyte,
\addtoindex{ubyte},
\addtoindex{uhalf}, and
\addtoindexx{sbyte}
are defined in
Section \refersec{datarep:integerrepresentationnames}.
+\end{itemize}
\section{Accelerated Access}
\label{chap:acceleratedaccess}
two tables are maintained in separate
\addtoindexx{accelerated access!by name}
object file sections named
-\addtoindex{.debug\_pubnames} for objects and
+\dotdebugpubnames{} for objects and
functions, and
-\addtoindex{.debug\_pubtypes}
+\dotdebugpubtypes{}
for types. Each table consists
of sets of variable length entries. Each set describes the
names of global objects and functions, or global types,
are definitions in every compilation unit containing the
class declaration, but if there is no concrete out\dash of\dash line
instance there is no need to have a
-\addtoindex{.debug\_pubnames} entry
+\dotdebugpubnames{} entry
for the member function.}
Each set begins with a header containing four values:
\begin{enumerate}[1. ]
-\item unit\_length (initial length) \\
+\item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
\addtoindexx{unit\_length}
The total length of the all of the entries for that set,
not including the length field itself
offset
\addtoindexx{section offset!in .debug\_pubtypes header}
from the beginning of the
-\addtoindex{.debug\_info} section of
+\dotdebuginfo{} section of
the compilation unit header referenced by the set.
\item debug\_info\_length (section length) \\
The
\addtoindexx{section length!in .debug\_pubtypes header}
size in bytes of the contents of the
-\addtoindex{.debug\_info} section
+\dotdebuginfo{} section
generated to represent that compilation unit.
\end{enumerate}
In the case of the name of a function member or static data
member of a C++ structure, class or union, the name presented
in the
-\addtoindex{.debug\_pubnames}
+\dotdebugpubnames{}
section is not the simple name given
by the \livelink{chap:DWATname}{DW\_AT\_name} attribute of the referenced debugging
information entry, but rather the fully qualified name of
lookup by address, a table is maintained in a separate
\addtoindexx{accelerated access!by address}
object file section called
-\addtoindex{.debug\_aranges}. The table consists
+\dotdebugaranges{}. The table consists
of sets of variable length entries, each set describing the
portion of the program\textquoteright s address space that is covered by
a single compilation unit.
Each set begins with a header containing five values:
\begin{enumerate}[1. ]
-\item unit\_length (initial length) \\
-\addtoindexx{unit\_length}
+\item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
+\addtoindexx{\texttt{unit\_length}}
The total length of all of the
entries for that set, not including the length field itself
(see Section \refersec{datarep:initiallengthvalues}).
\item debug\_info\_offset (section offset) \\
The offset from the
\addtoindexx{section offset!in .debug\_pubnames header}
-beginning of the \addtoindex{.debug\_info} or
-\addtoindex{.debug\_types} section of the
+beginning of the \dotdebuginfo{} or
+\dotdebugtypes{} section of the
compilation unit header referenced by the set.
\item address\_size (\addtoindex{ubyte}) \\
Line number information generated for a compilation unit is
represented in the
-\addtoindex{.debug\_line} section of an object file and
+\dotdebugline{} section of an object file and
is referenced by a corresponding compilation unit debugging
information entry
(see Section \refersec{chap:normalandpartialcompilationunitentries})
-in the \addtoindex{.debug\_info}
+in the \dotdebuginfo{}
section.
\textit{Some computer architectures employ more than one instruction
a 32\dash bit as well as a 16\dash bit instruction set). Because the
instruction set is a function of the program counter, it is
convenient to encode the applicable instruction set in the
-\addtoindex{.debug\_line} section as well.}
+\dotdebugline{} section as well.}
\textit{If space were not a consideration, the information provided
-in the \addtoindex{.debug\_line}
+in the \dotdebugline{}
section could be represented as a large
matrix, with one row for each instruction in the emitted
object code. The matrix would have columns for:}
\endfoot
\hline
\endlastfoot
-\addtoindexi{address}{address register!in line number machine}&
+\addtoindexi{\texttt{address}}{address register!in line number machine}&
The program\dash counter value corresponding to a machine instruction
generated by the compiler. \\
-\addtoindex{op\_index} &
+\addtoindex{\texttt{op\_index}} &
An unsigned integer representing the index of an operation within a VLIW
instruction. The index of the first operation is 0. For non\dash VLIW
architectures, this register will always be 0.
-The address and \addtoindex{op\_index} registers,
+The \texttt{address} and \addtoindex{\texttt{op\_index}} registers,
taken together, form an operation
-pointer that can reference any individual operation with the instruction
+pointer that can reference any individual operation within the instruction
stream. \\
-\addtoindex{file} &
+\addtoindex{\texttt{file}} &
An unsigned integer indicating the identity of the source file
corresponding to a machine instruction. \\
-\addtoindex{line} &
+\addtoindex{\texttt{line}} &
An unsigned integer indicating a source line number. Lines are numbered
beginning at 1. The compiler may emit the value 0 in cases where an
instruction cannot be attributed to any source line. \\
-\addtoindex{column} &
+\addtoindex{\texttt{column}} &
An unsigned integer indicating a column number within a source line.
Columns are numbered beginning at 1. The value 0 is reserved to indicate
that a statement begins at the ``left edge'' of the line. \\
-\addtoindex{is\_stmt} &
+\addtoindex{\texttt{is\_stmt}} &
A boolean indicating that the current instruction is a recommended
breakpoint location. A recommended breakpoint location
-is intended to ``represent'' a line, a
+is intended to \doublequote{represent} a line, a
statement and/or a semantically distinct subpart of a
statement. \\
-\addtoindex{basic\_block} &
+\addtoindex{\texttt{basic\_block}} &
A boolean indicating that the current instruction is the beginning of a
\addtoindex{basic block}. \\
-\addtoindex{end\_sequence} &
+\addtoindex{\texttt{end\_sequence}} &
A boolean indicating that the current address is that of the first byte after
the end of a sequence of target machine instructions.
-\addtoindex{end\_sequence}
+\addtoindex{\texttt{end\_sequence}}
terminates a sequence of lines; therefore other information in the same
row is not meaningful. \\
-\addtoindex{prologue\_end} &
+\addtoindex{\texttt{prologue\_end}} &
A boolean indicating that the current address is one (of possibly many)
where execution should be suspended for an entry breakpoint of a
function. \\
-\addtoindex{epilogue\_begin} &
+\addtoindex{\texttt{epilogue\_begin}} &
A boolean indicating that the current address is one (of possibly many)
where execution should be suspended for an exit breakpoint of a function. \\
-\addtoindex{isa} &
+\addtoindex{\texttt{isa}} &
An unsigned integer whose value encodes the applicable
instruction set architecture for the current instruction.
encoding be defined by the ABI authoring committee for each
architecture.} \\
-\addtoindex{discriminator} &
+\addtoindex{\texttt{discriminator}} &
An unsigned integer identifying the block to which the
current instruction belongs. Discriminator values are assigned
arbitrarily by the DWARF producer and serve to distinguish
\clearpage % Keep this sentence with the following table
At the beginning of each sequence within a line number
program, the state of the registers is:
-
-\begin{tabular}{lp{9cm}}
-address & 0 \\
-\addtoindex{op\_index} & 0 \\
-file & 1 \\
-line & 1 \\
-column & 0 \\
-\addtoindex{is\_stmt} & determined by \addtoindex{default\_is\_stmt} in the line number program header \\
-\addtoindex{basic\_block} & \doublequote{false} \addtoindexx{basic block} \\
-\addtoindex{end\_sequence} & \doublequote{false} \\
-\addtoindex{prologue\_end} & \doublequote{false} \\
-\addtoindex{epilogue\_begin} & \doublequote{false} \\
-\addtoindex{isa} & 0 \\
-discriminator & 0 \\
+\begin{center}
+\begin{tabular}{lp{9.5cm}}
+\texttt{address} & 0 \\
+\addtoindex{\texttt{op\_index}} & 0 \\
+\texttt{file} & 1 \\
+\texttt{line} & 1 \\
+\texttt{column} & 0 \\
+\addtoindex{\texttt{is\_stmt}} & determined by \addtoindex{\texttt{default\_is\_stmt}}
+ in the line number program header \\
+\addtoindex{\texttt{basic\_block}} & \doublequote{false} \addtoindexx{basic block} \\
+\addtoindex{\texttt{end\_sequence}} & \doublequote{false} \\
+\addtoindex{\texttt{prologue\_end}} & \doublequote{false} \\
+\addtoindex{\texttt{epilogue\_begin}} & \doublequote{false} \\
+\addtoindex{\texttt{isa}} & 0 \\
+\addtoindex{\texttt{discriminator}} & 0 \\
\end{tabular}
+\end{center}
\textit{The
-\addtoindex{isa} value 0 specifies that the instruction set is the
+\addtoindex{\texttt{isa}} value 0 specifies that the instruction set is the
architecturally determined default instruction set. This may
be fixed by the ABI, or it may be specified by other means,
for example, by the object file description.}
a header containing the following fields in order:
\begin{enumerate}[1. ]
-\item unit\_length (initial length) \\
-\addtoindexx{unit\_length}
+\item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
+\addtoindexx{\texttt{unit\_length}}
The size in bytes of the line number information for this
-compilation unit, not including the unit\_length field itself
+compilation unit, not including the length field itself
(see Section \refersec{datarep:initiallengthvalues}).
-\item version (\addtoindex{uhalf}) \\
+\item \texttt{version} (\addtoindex{uhalf}) \\
A version number\addtoindexx{version number!line number information}
(see Appendix \refersec{datarep:linenumberinformation}).
This number is specific to
the line number information and is independent of the DWARF
version number.
-\item header\_length \\
-The number of bytes following the \addtoindex{header\_length} field to the
+\item \texttt{header\_length} \\
+The number of bytes following the \addtoindex{\texttt{header\_length}} field to the
beginning of the first byte of the line number program itself.
-In the 32\dash bit DWARF format, this is a 4\dash byte unsigned
-length; in the 64\dash bit DWARF format, this field is an
+In the \thirtytwobitdwarfformat, this is a 4\dash byte unsigned
+length; in the \sixtyfourbitdwarfformat, this field is an
8\dash byte unsigned length
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
-\item minimum\_instruction\_length (\addtoindex{ubyte}) \\
-\addtoindexx{minimum\_instruction\_length}
+\item \texttt{minimum\_instruction\_length} (\addtoindex{ubyte}) \\
+\addtoindexx{\texttt{minimum\_instruction\_length}}
The size in bytes of the smallest target machine
instruction. Line number program opcodes that alter
-the address and \addtoindex{op\_index} registers use this and
-\addtoindexx{maximum\_operations\_per\_instruction}
-maximum\-\_operations\-\_per\-\_instruction in their calculations.
+the \texttt{address} and \addtoindex{\texttt{op\_index}}
+registers use this and
+\addtoindex{\texttt{maximum\_operations\_per\_instruction}}
+(see following) in their calculations.
\needlines{9}
-\item maximum\_operations\_per\_instruction (\addtoindex{ubyte}) \\
+\item \texttt{maximum\_operations\_per\_instruction} (\addtoindex{ubyte}) \\
The
-\addtoindexx{maximum\_operations\_per\_instruction}
+\addtoindexx{\texttt{maximum\_operations\_per\_instruction}}
maximum number of individual operations that may be
encoded in an instruction. Line number program opcodes
-that alter the address and
-\addtoindex{op\_index} registers use this and
-\addtoindex{minimum\_instruction\_length}
+that alter the \texttt{address} and
+\addtoindex{\texttt{op\_index}} registers use this and
+\addtoindex{\texttt{minimum\_instruction\_length}} (see preceeding)
in their calculations.
For non-VLIW
-architectures, this field is 1, the \addtoindex{op\_index} register is always
-0, and the operation pointer is simply the address register.
+architectures, this field is 1, the \addtoindex{\texttt{op\_index}} register is always
+0, and the operation pointer is simply the \texttt{address} register.
\needlines{4}
-\item default\_is\_stmt (\addtoindex{ubyte}) \\
-\addtoindexx{default\_is\_stmt}
-The initial value of the \addtoindex{is\_stmt} register.
+\item \texttt{default\_is\_stmt} (\addtoindex{ubyte}) \\
+\addtoindexx{\texttt{default\_is\_stmt}}
+The initial value of the \addtoindex{\texttt{is\_stmt}} register.
\textit{A simple approach
to building line number information when machine instructions
are emitted in an order corresponding to the source program
-is to set \addtoindex{default\_is\_stmt}
+is to set \addtoindex{\texttt{default\_is\_stmt}}
to ``true'' and to not change the
-value of the \addtoindex{is\_stmt} register
+value of the \addtoindex{\texttt{is\_stmt}} register
within the line number program.
One matrix entry is produced for each line that has code
generated for it. The effect is that every entry in the
breakpoint location for the line number. \livelink{chap:DWLNSnegatestmt}{DW\_LNS\_negate\_stmt}
opcodes in the line number program control which matrix entries
constitute such a recommendation and
-\addtoindex{default\_is\_stmt} might
+\addtoindex{\texttt{default\_is\_stmt}} might
be either ``true'' or ``false''. This approach might be
used as part of support for debugging optimized code.}
-\item line\_base (\addtoindex{sbyte}) \\
-\addtoindexx{line\_base}
+\item \texttt{line\_base} (\addtoindex{sbyte}) \\
+\addtoindexx{\texttt{line\_base}}
This parameter affects the meaning of the special opcodes. See below.
-\item line\_range (\addtoindex{ubyte}) \\
-\addtoindexx{line\_range}
+\item \texttt{line\_range} (\addtoindex{ubyte}) \\
+\addtoindexx{\texttt{line\_range}}
This parameter affects the meaning of the special opcodes. See below.
-\item opcode\_base (\addtoindex{ubyte}) \\
+\item \texttt{opcode\_base} (\addtoindex{ubyte}) \\
The
-\addtoindexx{opcode\_base}
+\addtoindexx{\texttt{opcode\_base}}
number assigned to the first special opcode.
\textit{Opcode base is typically one greater than the highest-numbered
-\addtoindexx{opcode\_base}
+\addtoindexx{\texttt{opcode\_base}}
standard opcode defined for the specified version of the line
number information (12 in
\addtoindex{DWARF Version 3} and
\addtoindexx{DWARF Version 2}
Version 2).
If opcode\_base is less than the typical value,
-\addtoindexx{opcode\_base}
+\addtoindexx{\texttt{opcode\_base}}
then standard opcode numbers greater than or equal to the
opcode base are not used in the line number table of this unit
-(and the codes are treated as special opcodes). If opcode\_base
+(and the codes are treated as special opcodes). If \texttt{opcode\_base}
is greater than the typical value, then the numbers between
that of the highest standard opcode and the first special
opcode (not inclusive) are used for vendor specific extensions.}
-\item standard\_opcode\_lengths (array of \addtoindex{ubyte}) \\
-\addtoindexx{standard\_opcode\_lengths}
+\item \texttt{standard\_opcode\_lengths} (array of \addtoindex{ubyte}) \\
+\addtoindexx{\texttt{standard\_opcode\_lengths}}
This array specifies the number of \addtoindex{LEB128} operands for each
of the standard opcodes. The first element of the array
corresponds to the opcode whose value is 1, and the last
element corresponds to the opcode whose value
-is opcode\_base - 1.
+is \texttt{opcode\_base - 1}.
-\textit{By increasing opcode\_base, and adding elements to this array,
-\addtoindexx{opcode\_base}
+\textit{By increasing \texttt{opcode\_base}, and adding elements to this array,
+\addtoindexx{\texttt{opcode\_base}}
new standard opcodes can be added, while allowing consumers who
do not know about these new opcodes to be able to skip them.}
just like standard opcodes.}
\needlines{3}
-\item include\_directories (sequence of path names) \\
+\item \texttt{include\_directories} (sequence of path names) \\
Entries
-\addtoindexx{include\_directories}
+\addtoindexx{\texttt{include\_directories}}
in this sequence describe each path that was searched
for included source files in this compilation. (The paths
include those directories specified explicitly by the user for
the compilation is understood to be the zeroth entry and is
not explicitly represented.
-\item file\_names (sequence of file entries) \\
+\item \texttt{file\_names} (sequence of file entries) \\
Entries
\addtoindexx{file names}
in
-\addtoindexx{file\_names}
+\addtoindexx{\texttt{file\_names}}
this sequence describe source files that contribute
to the line number information for this compilation unit or is
used in other contexts, such as in a declaration coordinate or
\livelink{chap:DWATcompdir}{DW\_AT\_comp\_dir}
attribute given in the compilation unit) or one
of the directories listed in the
-\addtoindex{include\_directories} section.
+\addtoindex{\texttt{include\_directories}} section.
\item An unsigned LEB128\addtoindexx{LEB128!unsigned}
number representing the directory
index of a directory in the
-\addtoindex{include\_directories} section.
+\addtoindex{\texttt{include\_directories}} section.
\item An unsigned LEB128\addtoindexx{LEB128!unsigned}
The last entry is followed by a single null byte.
The directory index represents an entry in the
-\addtoindex{include\_directories} section.
+\addtoindex{\texttt{include\_directories}} section.
The index is 0 if the file was
found in the current directory of the compilation, 1 if it
was found in the first directory in the
-\addtoindex{include\_directories}
+\addtoindex{\texttt{include\_directories}}
section, and so on. The directory index is ignored for file
names that represent full path names.
\begin{enumerate}[1. ]
-\item Add a signed integer to the line register.
+\item Add a signed integer to the \texttt{line} register.
\item Modify the \addtoindex{operation pointer} by incrementing the
-address and \addtoindex{op\_index} registers as described below.
+\texttt{address} and \addtoindex{\texttt{op\_index|}} registers as described below.
\item Append a row to the matrix using the current values
of the state machine registers.
-\item Set the \addtoindex{basic\_block} register to ``false.'' \addtoindexx{basic block}
-\item Set the \addtoindex{prologue\_end} register to ``false.''
-\item Set the \addtoindex{epilogue\_begin} register to ``false.''
-\item Set the \addtoindex{discriminator} register to 0.
+\item Set the \addtoindex{\texttt{basic\_block}} register to \doublequote{false.} \addtoindexx{basic block}
+\item Set the \addtoindex{\texttt{prologue\_end}} register to \doublequote{false.}
+\item Set the \addtoindex{\texttt{epilogue\_begin}} register to \doublequote{false.}
+\item Set the \addtoindex{\texttt{discriminator}} register to 0.
\end{enumerate}
All of the special opcodes do those same seven things; they
differ from one another only in what values they add to the
-line, address and \addtoindex{op\_index} registers.
+\texttt{line}, \texttt{address} and \addtoindex{\texttt{op\_index}} registers.
\textit{Instead of assigning a fixed meaning to each special opcode,
for this. First, although the opcode space available for
special opcodes now ranges from 13 through 255, the lower
bound may increase if one adds new standard opcodes. Thus, the
-opcode\_base field of the line number program header gives the
+\texttt{opcode\_base} field of the line number program header gives the
value of the first special opcode. Second, the best choice of
special\dash opcode meanings depends on the target architecture. For
example, for a RISC machine where the compiler\dash generated code
interleaves instructions from different lines to schedule
the pipeline, it is important to be able to add a negative
-value to the line register to express the fact that a later
+value to the \texttt{line} register to express the fact that a later
instruction may have been emitted for an earlier source
line. For a machine where pipeline scheduling never occurs,
it is advantageous to trade away the ability to decrease
-the line register (a standard opcode provides an alternate
+the \texttt{line} register (a standard opcode provides an alternate
way to decrease the line number) in return for the ability
-to add larger positive values to the address register. To
+to add larger positive values to the \texttt{address} register. To
permit this variety of strategies, the line number program
header defines a
-\addtoindex{line\_base}
+\addtoindex{\texttt{line\_base}}
field that specifies the minimum
value which a special opcode can add to the line register
and a
-\addtoindex{line\_range}
+\addtoindex{\texttt{line\_range}}
field that defines the range of values it
can add to the line register.}
A special opcode value is chosen based on the amount that needs
-to be added to the line, address and \addtoindex{op\_index} registers.
-The
-maximum line increment for a special opcode is the value
+to be added to the \texttt{line}, \texttt{address} and \addtoindex{\texttt{op\_index}} registers.
+The maximum line increment for a special opcode is the value
of the
-\addtoindex{line\_base}
+\addtoindex{\texttt{line\_base}}
field in the header, plus the value of the
-\addtoindex{line\_range} field, minus 1 (line base +
+\addtoindex{\texttt{line\_range}} field, minus 1 (line base +
line range - 1).
If the desired line increment is greater than the maximum
line increment, a standard opcode must be used instead of a
If the resulting opcode is greater than 255, a standard opcode
must be used instead.
-\textit{When \addtoindex{maximum\_operations\_per\_instruction} is 1, the operation
-advance is simply the address increment divided by the
-\addtoindex{minimum\_instruction\_length}.}
+\textit{When \addtoindex{\texttt{maximum\_operations\_per\_instruction}} is 1,
+the operation advance is simply the address increment divided by the
+\addtoindex{\texttt{minimum\_instruction\_length}}.}
\needlines{6}
-To decode a special opcode, subtract the opcode\_base from
+To decode a special opcode, subtract the \addtoindex{\texttt{opcode\_base}} from
the opcode itself to give the \textit{adjusted opcode}.
The \textit{operation advance}
is the result of the adjusted opcode divided by the
-line\_range. The new address and \addtoindex{op\_index} values
-are given by
+\texttt{line\_range}. The new \texttt{address} and
+\addtoindex{\texttt{op\_index}} values are given by
\begin{alltt}
\textit{adjusted opcode} = opcode \dash opcode\_base
\textit{operation advance} = \textit{adjusted opcode} / line\_range
(\addtoindex{op\_index} + \addtoindex{operation advance}) \% \addtoindex{maximum\_operations\_per\_instruction}
\end{alltt}
-\textit{When the \addtoindex{maximum\_operations\_per\_instruction} field is 1,
-op\_index is always 0 and these calculations simplify to those
+\textit{When the \addtoindex{\texttt{maximum\_operations\_per\_instruction}} field is 1,
+\texttt{op\_index} is always 0 and these calculations simplify to those
given for addresses in
\addtoindex{DWARF Version 3}.}
The amount to increment the line register is the
-\addtoindex{line\_base} plus
+\addtoindex{\texttt{line\_base}} plus
the result of the
-\addtoindex{adjusted opcode} modulo the
-\addtoindex{line\_range}. That
+\textit{\addtoindex{adjusted opcode}} modulo the
+\addtoindex{\texttt{line\_range}}. That
is,
\begin{alltt}
\end{alltt}
\textit{As an example, suppose that the opcode\_base is 13,
-\addtoindex{line\_base}
-is -3, \addtoindex{line\_range} is 12,
-\addtoindex{minimum\_instruction\_length} is 1
+\addtoindex{\texttt{line\_base}} is -3,
+\addtoindex{\texttt{line\_range}} is 12,
+\addtoindex{\texttt{minimum\_instruction\_length}} is 1
and
-\addtoindex{maximum\_operations\_per\_instruction} is 1.
+\addtoindex{\texttt{maximum\_operations\_per\_instruction}} is 1.
This means that
we can use a special opcode whenever two successive rows in
the matrix have source line numbers differing by any value
\end{figure}
\textit{There is no requirement that the expression
-255 - \addtoindex{line\_base} + 1 be an integral multiple of
-\addtoindex{line\_range}. }
+255 - \addtoindex{\texttt{line\_base}} + 1 be an integral multiple of
+\addtoindex{\texttt{line\_range}}. }
\subsubsection{Standard Opcodes}
\label{chap:standardopcodes}
The \livetarg{chap:DWLNScopy}{DW\_LNS\_copy}
opcode takes no operands. It appends a row
to the matrix using the current values of the state machine
-registers. Then it sets the \addtoindex{discriminator} register to 0,
-and sets the \addtoindex{basic\_block},
-\addtoindex{prologue\_end} and
-\addtoindex{epilogue\_begin}
+registers. Then it sets the \addtoindex{\texttt{discriminator}} register to 0,
+and sets the \addtoindex{\texttt{basic\_block}},
+\addtoindex{\texttt{prologue\_end}} and
+\addtoindex{\texttt{epilogue\_begin}}
registers to ``false.''
\item \textbf{DW\_LNS\_advance\_pc} \\
The \livetarg{chap:DWLNSadvancepc}{DW\_LNS\_advance\_pc}
opcode takes a single unsigned LEB128\addtoindexx{LEB128!unsigned}
-operand as the \addtoindex{operation advance} and modifies the address
-and \addtoindex{op\_index} registers as specified in
+operand as the \addtoindex{operation advance} and modifies the \texttt{address}
+and \addtoindex{\texttt{op\_index}} registers as specified in
Section \refersec{chap:specialopcodes}.
\item \textbf{DW\_LNS\_advance\_line} \\
The \livetarg{chap:DWLNSadvanceline}{DW\_LNS\_advance\_line}
opcode takes a single signed LEB128\addtoindexx{LEB128!signed}
-operand and adds that value to the line register of the
+operand and adds that value to the \texttt{line} register of the
state machine.
\needlines{4}
\item \textbf{DW\_LNS\_set\_file} \\
The \livetarg{chap:DWLNSsetfile}{DW\_LNS\_set\_file} opcode takes a single
unsigned LEB128\addtoindexx{LEB128!unsigned}
-operand and stores it in the file register
+operand and stores it in the \texttt{file} register
of the state machine.
\item \textbf{DW\_LNS\_set\_column} \\
The \livetarg{chap:DWLNSsetcolumn}{DW\_LNS\_set\_column} opcode takes a
-single unsigned LEB128\addtoindexx{LEB128!unsigned} operand and stores it in the column
+single unsigned LEB128\addtoindexx{LEB128!unsigned} operand
+and stores it in the \texttt{column}
register of the state machine.
\needlines{4}
\item \textbf{DW\_LNS\_negate\_stmt} \\
The \livetarg{chap:DWLNSnegatestmt}{DW\_LNS\_negate\_stmt} opcode takes no
-operands. It sets the \addtoindex{is\_stmt} register of the state machine
+operands. It sets the \addtoindex{\texttt{is\_stmt}} register of the state machine
to the logical negation of its current value.
\needlines{4}
opcode
\addtoindexx{basic block}
takes no operands.
-It sets the basic\_block register of the
+It sets the \texttt{basic\_block} register of the
state machine to ``true.''
\item \textbf{DW\_LNS\_const\_add\_pc} \\
The \livetarg{chap:DWLNSconstaddpc}{DW\_LNS\_const\_add\_pc} opcode takes
-no operands. It advances the address and op\_index registers
+no operands. It advances the \texttt{address} and \texttt{op\_index} registers
by the increments corresponding to special opcode 255.
-\textit{When the line number program needs to advance the address
+\textit{When the line number program needs to advance the \texttt{address}
by a small amount, it can use a single special opcode,
which occupies a single byte. When it needs to advance the
-address by up to twice the range of the last special opcode,
+\texttt{address} by up to twice the range of the last special opcode,
it can use \livelink{chap:DWLNSconstaddpc}{DW\_LNS\_const\_add\_pc} followed by a special opcode,
for a total of two bytes. Only if it needs to advance the
address by more than twice that range will it need to use
\item \textbf{DW\_LNS\_fixed\_advance\_pc} \\
The \livetarg{chap:DWLNSfixedadvancepc}{DW\_LNS\_fixed\_advance\_pc} opcode
takes a single \addtoindex{uhalf} (unencoded) operand and adds it to the
-address register of the state machine and sets the op\_index
+\texttt{address} register of the state machine and sets the \texttt{op\_index}
register to 0. This is the only standard opcode whose operand
is \textbf{not} a variable length number. It also does
\textbf{not} multiply the
-operand by the \addtoindex{minimum\_instruction\_length} field of the header.
+operand by the \addtoindex{\texttt{minimum\_instruction\_length}}
+field of the header.
\textit{Existing assemblers cannot emit
\livelink{chap:DWLNSadvancepc}{DW\_LNS\_advance\_pc} or special
\item \textbf{DW\_LNS\_set\_prologue\_end} \\
The \livetarg{chap:DWLNSsetprologueend}{DW\_LNS\_set\_prologue\_end}
opcode takes no operands. It sets the
-\addtoindex{prologue\_end} register
-to ``true''.
+\addtoindex{\texttt{prologue\_end}} register
+to \doublequote{true}.
\textit{When a breakpoint is set on entry to a function, it is
generally desirable for execution to be suspended, not on the
\item \textbf{DW\_LNS\_set\_epilogue\_begin} \\
The \livetarg{chap:DWLNSsetepiloguebegin}{DW\_LNS\_set\_epilogue\_begin} opcode takes no operands. It
-sets the \addtoindex{epilogue\_begin} register to ``true''.
+sets the \addtoindex{\texttt{epilogue\_begin}} register to \doublequote{true}.
\textit{When a breakpoint is set on the exit of a function or execution
steps over the last executable statement of a function, it is
\item \textbf{DW\_LNS\_set\_isa} \\
The \livetarg{chap:DWLNSsetisa}{DW\_LNS\_set\_isa} opcode takes a single
unsigned LEB128\addtoindexx{LEB128!unsigned} operand and stores that value in the
-\addtoindex{isa}
+\addtoindex{\texttt{isa}}
register of the state machine.
\end{enumerate}
\item \textbf{DW\_LNE\_end\_sequence} \\
The \livetarg{chap:DWLNEendsequence}{DW\_LNE\_end\_sequence} opcode takes no operands. It sets the
-\addtoindex{end\_sequence}
+\addtoindex{\texttt{end\_sequence}}
register of the state machine to \doublequote{true} and
appends a row to the matrix using the current values of the
state-machine registers. Then it resets the registers to the
\item \textbf{DW\_LNE\_set\_address} \\
The \livetarg{chap:DWLNEsetaddress}{DW\_LNE\_set\_address} opcode takes a single relocatable
address as an operand. The size of the operand is the size
-of an address on the target machine. It sets the address
+of an address on the target machine. It sets the \texttt{address}
register to the value given by the relocatable address and
-sets the op\_index register to 0.
+sets the \texttt{op\_index} register to 0.
\textit{All of the other line number program opcodes that
-affect the address register add a delta to it. This instruction
+affect the \texttt{address} register add a delta to it. This instruction
stores a relocatable value into it instead.}
\needlines{4}
to either the compilation directory (as specified by the
\livelink{chap:DWATcompdir}{DW\_AT\_comp\_dir} attribute given in the compilation unit)
or one of the directories in the
-\addtoindex{include\_directories} section.
+\addtoindex{\texttt{include\_directories}} section.
\item An unsigned LEB128\addtoindexx{LEB128!unsigned}
number representing the directory index
\end{enumerate}
The directory index represents an entry in the
-\addtoindex{include\_directories} section of the line number program
+\addtoindex{\texttt{include\_directories}} section of the line number program
header. The index is 0 if the file was found in the current
directory of the compilation, 1 if it was found in the first
-directory in the \addtoindex{include\_directories} section,
+directory in the \addtoindex{\texttt{include\_directories}} section,
and so on. The
directory index is ignored for file names that represent full
path names.
opcode takes a single
parameter, an unsigned LEB128\addtoindexx{LEB128!unsigned}
integer. It sets the
-\addtoindex{discriminator} register to the new value.
+\addtoindex{\texttt{discriminator}} register to the new value.
\end{enumerate}
Section \refersec{chap:normalandpartialcompilationunitentries},
the macro information for a
given compilation unit is represented in the
-\addtoindex{.debug\_macinfo}
+\dotdebugmacinfo{}
section of an object file. The macro information for each
compilation unit is represented as a series of \doublequote{macinfo}
entries. Each macinfo entry consists of a \doublequote{type code} and
\subsection{General rules and restrictions}
\label{chap:generalrulesandrestrictions}
-All macinfo entries within a \addtoindex{.debug\_macinfo}
+All macinfo entries within a \dotdebugmacinfo{}
section for a
given compilation unit appear in the same order in which the
directives were processed by the compiler.
The virtual unwind information is encoded in a self-contained
section called
-\addtoindex{.debug\_frame}. Entries in a
-\addtoindex{.debug\_frame} section
+\dotdebugframe{}. Entries in a
+\dotdebugframe{} section
are aligned on a multiple of the address size relative to
the start of the section and come in two forms: a Common
\addtoindexx{common information entry}
A Common Information Entry holds information that is shared
among many Frame Description Entries. There is at least one
-CIE in every non-empty \addtoindex{.debug\_frame} section. A CIE contains
+CIE in every non-empty \dotdebugframe{} section. A CIE contains
the following fields, in order:
\begin{enumerate}[1. ]
-\item length (initial length) \\
+\item \texttt{length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
A constant that gives the number of bytes of the CIE structure,
not including the length field itself
(see Section \refersec{datarep:initiallengthvalues}).
The
-size of the length field plus the value of length must be an
+size of the \texttt{length} field plus the value of \texttt{length} must be an
integral multiple of the address size.
-\item CIE\_id (4 or 8 bytes, see Section \refersec{datarep:32bitand64bitdwarfformats}) \\
+\item \texttt{CIE\_id} (4 or 8 bytes, see Section \refersec{datarep:32bitand64bitdwarfformats}) \\
A constant that is used to distinguish CIEs from FDEs.
-\item version (\addtoindex{ubyte}) \\
+\item \texttt{version} (\addtoindex{ubyte}) \\
A version number\addtoindexx{version number!call frame information}
(see Section \refersec{datarep:callframeinformation}).
This number is specific to the call frame information
and is independent of the DWARF version number.
\needlines{8}
-\item augmentation (\addtoindex{UTF\dash 8} string) \\
+\item \texttt{augmentation} (\addtoindex{UTF\dash 8} string) \\
A null\dash terminated UTF\dash 8 string that identifies the augmentation
to this CIE or to the FDEs that use it. If a reader encounters
an augmentation string that is unexpected, then only the
\begin{itemize}
-\item CIE: length, CIE\_id, version, augmentation
+\item CIE: \texttt{length, CIE\_id, version, augmentation}
-\item FDE: length, CIE\_pointer, initial\_location, address\_range
+\item FDE: \texttt{length, CIE\_pointer, initial\_location, address\_range}
\end{itemize}
If there is no augmentation, this value is a zero byte.
might be information about dynamically allocated data which
needs to be freed on exit from the routine.}
-\textit{Because the \addtoindex{.debug\_frame} section is useful independently of
-any \addtoindex{.debug\_info} section, the augmentation string always uses
+\textit{Because the \dotdebugframe{} section is useful independently of
+any \dotdebuginfo{} section, the augmentation string always uses
UTF\dash 8 encoding.}
-\item address\_size (\addtoindex{ubyte}) \\
+\item \texttt{address\_size} (\addtoindex{ubyte}) \\
The size of a target address
-\addtoindexx{address\_size}
+\addtoindexx{\texttt{address\_size}}
in this CIE and any FDEs that
use it, in bytes. If a compilation unit exists for this frame,
its address size must match the address size here.
-\item segment\_size (\addtoindex{ubyte}) \\
-The \addtoindexx{segment\_size}
+\item \texttt{segment\_size} (\addtoindex{ubyte}) \\
+The \addtoindexx{\texttt{segment\_size}}
size of a segment selector in this CIE and any FDEs that
use it, in bytes.
-\item \addtoindex{code\_alignment\_factor} (unsigned LEB128)
+\item \addtoindex{\texttt{code\_alignment\_factor}} (unsigned LEB128)
\addtoindexx{LEB128!unsigned}\addtoindexx{unsigned LEB128|see{LEB128, unsigned}}
-\addtoindexx{code alignment factor} \\
+\addtoindexx{\texttt{code alignment factor}} \\
A
-\addtoindexx{\textless caf\textgreater|see{code alignment factor}}
+\addtoindexx{\texttt{\textless caf\textgreater}|see{code alignment factor}}
constant that is factored out of all advance location
instructions (see
Section \refersec{chap:rowcreationinstructions}).
-\item \addtoindex{data\_alignment\_factor} (signed LEB128)
+\item \addtoindex{\texttt{data\_alignment\_factor}} (signed LEB128)
\addtoindexx{LEB128!signed}\addtoindexx{signed LEB128|see{LEB128, signed}} \\
\addtoindexx{data alignment factor}
A
-\addtoindexx{\textless daf\textgreater|see{data alignment factor}}
+\addtoindexx{\texttt{\textless daf\textgreater}|see{data alignment factor}}
constant that is factored out of certain offset instructions
-(see below). The resulting value is \textit{(operand *
-data\_alignment\_factor)}.
+(see below). The resulting value is \textit{(operand} *
+\texttt{data\_alignment\_factor}).
-\item return\_address\_register (unsigned LEB128)\addtoindexx{LEB128!unsigned} \\
+\item \texttt{return\_address\_register} (unsigned LEB128)\addtoindexx{LEB128!unsigned} \\
An unsigned LEB128 constant that indicates which column in the
rule table represents the return address of the function. Note
that this column might not correspond to an actual machine
register.
-\item initial\_instructions (array of \addtoindex{ubyte}) \\
+\item \texttt{initial\_instructions} (array of \addtoindex{ubyte}) \\
A sequence of rules that are interpreted to create the initial
setting of each column in the table.
compilation system authoring body may specify an alternate
default value for any or all columns.
-\item padding (array of \addtoindex{ubyte}) \\
+\item \texttt{padding} (array of \addtoindex{ubyte}) \\
Enough \livelink{chap:DWCFAnop}{DW\_CFA\_nop} instructions to make the size of this entry
match the length value above.
\end{enumerate}
\needlines{5}
An FDE contains the following fields, in order:
\begin{enumerate}[1. ]
-\item length (initial length) \\
+\item \texttt{length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
A constant that gives the number of bytes of the header and
instruction stream for this function, not including the length
field itself
(see Section \refersec{datarep:initiallengthvalues}).
-The size of the length field
+The size of the \texttt{length} field
plus the value of length must be an integral multiple of the
address size.
\item CIE\_pointer (4 or 8 bytes, see Section \refersec{datarep:32bitand64bitdwarfformats}) \\
A constant
\addtoindexx{section offset!in FDE header}
-offset into the \addtoindex{.debug\_frame}
+offset into the \dotdebugframe{}
section that denotes
the CIE that is associated with this FDE.
-\item initial\_location (segment selector and target address) \\
+\item \texttt{initial\_location} (segment selector and target address) \\
The
-\addtoindexx{initial\_location}
+\addtoindexx{\texttt{initial\_location}}
address of the first location associated with this table
entry.
-If the \addtoindex{segment\_size} field of this FDE's CIE is non-zero,
+If the \addtoindex{\texttt{segment\_size}} field of this FDE's CIE is non-zero,
the initial location is preceded by a segment selector of
the given length.
-\item address\_range (target address) \\
+\item \texttt{address\_range} (target address) \\
The
-\addtoindexx{address\_range}
+\addtoindexx{\texttt{address\_range}}
number
\addtoindexx{target address}
of bytes of program instructions described by this entry.
-\item instructions (array of \addtoindex{ubyte}) \\
+\item \texttt{instructions} (array of \addtoindex{ubyte}) \\
A sequence of table defining instructions that are described below.
-\item padding (array of \addtoindex{ubyte}) \\
+\item \texttt{padding} (array of \addtoindex{ubyte}) \\
Enough \livelink{chap:DWCFAnop}{DW\_CFA\_nop} instructions
to make the size of this entry match the length value above.
\end{enumerate}
other values in the new row are initially identical to the
current row. The new location value is always greater than
the current one.
-If the \addtoindex{segment\_size} field of this FDE's
+If the \addtoindex{\texttt{segment\_size}} field of this FDE's
\addtoindex{CIE}
-is non- zero, the initial location is preceded by a segment
+is non\dash zero, the initial location is preceded by a segment
selector of the given length.
action is to create a new table row with a location value that
is computed by taking the current entry\textquoteright s location value
and adding the value of
-\textit{delta * \addtoindex{code\_alignment\_factor}}.
-All
-other values in the new row are initially identical to the
+\textit{delta} * \addtoindex{\texttt{code\_alignment\_factor}}.
+All other values in the new row are initially identical to the
current row
\item \textbf{DW\_CFA\_advance\_loc1} \\
representing a register number and a
signed LEB128\addtoindexx{LEB128!signed} factored offset. This instruction is identical
to \livelink{chap:DWCFAdefcfa}{DW\_CFA\_def\_cfa} except that the second operand is signed
-and factored. The resulting offset is factored\_offset *
-\addtoindex{data\_alignment\_factor}.
+and factored. The resulting offset is \textit{factored\_offset} *
+\addtoindex{\texttt{data\_alignment\_factor}}.
\item \textbf{DW\_CFA\_def\_cfa\_register} \\
LEB128\addtoindexx{LEB128!signed} operand representing a factored offset. This instruction
is identical to \livelink{chap:DWCFAdefcfaoffset}{DW\_CFA\_def\_cfa\_offset} except that the
operand is signed and factored. The resulting offset is
-factored\_offset * \addtoindex{data\_alignment\_factor}.
+\textit{factored\_offset} * \addtoindex{\texttt{data\_alignment\_factor}}.
This operation
is valid only if the current CFA rule is defined to use a
register and offset.
The \livetarg{chap:DWCFAundefined}{DW\_CFA\_undefined} instruction takes a single unsigned
LEB128\addtoindexx{LEB128!unsigned} operand that represents a register number. The required
action is to set the rule for the specified register to
-``undefined.''
+\doublequote{undefined.}
\item \textbf{DW\_CFA\_same\_value} \\
The \livetarg{chap:DWCFAsamevalue}{DW\_CFA\_same\_value} instruction takes a single unsigned
LEB128 operand\addtoindexx{LEB128!unsigned} that represents a register number. The required
action is to set the rule for the specified register to
-``same value.''
+\doublequote{same value.}
\item \textbf{DW\_CFA\_offset} \\
The \livetarg{chap:DWCFAoffset}{DW\_CFA\_offset} instruction takes two operands: a register
is to change the rule for the register indicated by the
register number to be an offset(N) rule where the value of
N is
-\textit{factored offset * \addtoindex{data\_alignment\_factor}}.
+\textit{factored offset} * \addtoindex{\texttt{data\_alignment\_factor}}.
\item \textbf{DW\_CFA\_offset\_extended} \\
The \livetarg{chap:DWCFAoffsetextended}{DW\_CFA\_offset\_extended}
to \livelink{chap:DWCFAoffsetextended}{DW\_CFA\_offset\_extended}
except that the second operand is
signed and factored. The resulting offset is
-\textit{factored\_offset * \addtoindex{data\_alignment\_factor}}.
+\textit{factored\_offset} * \addtoindex{\texttt{data\_alignment\_factor}}.
\item \textbf{DW\_CFA\_val\_offset} \\
The \livetarg{chap:DWCFAvaloffset}{DW\_CFA\_val\_offset}
factored offset. The required action is to change the rule
for the register indicated by the register number to be a
val\_offset(N) rule where the value of N is
-\textit{factored\_offset * \addtoindex{data\_alignment\_factor}}.
+\textit{factored\_offset} * \addtoindex{\texttt{data\_alignment\_factor}}.
\item \textbf{DW\_CFA\_val\_offset\_sf} \\
The \livetarg{chap:DWCFAvaloffsetsf}{DW\_CFA\_val\_offset\_sf} instruction takes two operands: an
signed LEB128\addtoindexx{LEB128!signed} factored offset. This instruction is identical
to \livelink{chap:DWCFAvaloffset}{DW\_CFA\_val\_offset} except that the second operand is signed
and factored. The resulting offset is
-\textit{factored\_offset * \addtoindex{data\_alignment\_factor}}.
+\textit{factored\_offset} * \addtoindex{\texttt{data\_alignment\_factor}}.
\item \textbf{DW\_CFA\_register} \\
The \livetarg{chap:DWCFAregister}{DW\_CFA\_register}
The \livetarg{chap:DWCFArestore}{DW\_CFA\_restore} instruction takes a single operand (encoded
with the opcode) that represents a register number. The
required action is to change the rule for the indicated
-register to the rule assigned it by the initial\_instructions
+register to the rule assigned it by the \texttt{initial\_instructions}
in the CIE.
\item \textbf{DW\_CFA\_restore\_extended} \\
\textit{To determine the virtual unwind rule set for a given location
(L1), one searches through the FDE headers looking at the
-initial\_location and address\_range values to see if L1 is
+\texttt{initial\_location} and \texttt{address\_range} values to see if L1 is
contained in the FDE. If so, then:}
\begin{enumerate}[1. ]
\item \textit{Initialize a register set by reading the
-initial\_instructions field of the associated CIE.}
+\texttt{initial\_instructions} field of the associated CIE.}
\item \textit{Read and process the FDE\textquoteright s instruction
sequence until a \livelink{chap:DWCFAadvanceloc}{DW\_CFA\_advance\_loc},
\livelink{chap:DWCFAsetloc}{DW\_CFA\_set\_loc}, or the
end of the instruction stream is encountered.}
-\item \textit{ If a \livelink{chap:DWCFAadvanceloc}{DW\_CFA\_advance\_loc} or \livelink{chap:DWCFAsetloc}{DW\_CFA\_set\_loc}
+\item \textit{ If a \livelink{chap:DWCFAadvanceloc}{DW\_CFA\_advance\_loc} or
+\livelink{chap:DWCFAsetloc}{DW\_CFA\_set\_loc}
instruction is encountered, then compute a new location value
(L2). If L1 $\geq$ L2 then process the instruction and go back
to step 2.}
\item \textit{ The end of the instruction stream can be thought
-of as a \livelink{chap:DWCFAsetloc}{DW\_CFA\_set\_loc} (initial\_location + address\_range)
+of as a \livelink{chap:DWCFAsetloc}{DW\_CFA\_set\_loc} (\texttt{initial\_location + address\_range})
instruction. Note that the FDE is ill-formed if L2 is less
than L1.}
This information is placed in a separate object file
section from the debugging information entries themselves. The
value of the statement list attribute is the offset in the
-\addtoindex{.debug\_line} section of the first byte of the line number
+\dotdebugline{} section of the first byte of the line number
information for this compilation unit
(see Section \refersec{chap:linenumberinformation}).
This information is placed in a separate object file section
from the debugging information entries themselves. The
value of the macro information attribute is the offset in
-the \addtoindex{.debug\_macinfo} section of the first byte of the macro
+the \dotdebugmacinfo{} section of the first byte of the macro
information for this compilation unit
(see Section \refersec{chap:macroinformation}).
a \livelink{chap:flag}{flag}.
\textit{The \addtoindex{Fortran}
-language allows the keywords elemental, pure
-and recursive to be included as part of the declaration of
+language allows the keywords \texttt{elemental}, \texttt{pure}
+and \texttt{recursive} to be included as part of the declaration of
a subroutine; these attributes reflect that usage. These
attributes are not relevant for languages that do not support
similar keywords or syntax. In particular, the \livelink{chap:DWATrecursive}{DW\_AT\_recursive}
\end{table}
\textit{In \addtoindex{C++}, a function or a constructor declared with
-constexpr is implicitly declared inline. The abstract inline
+\addtoindex{\texttt{constexpr}} is implicitly declared inline. The abstract inline
instance (see below) is represented by a debugging information
entry with the tag \livelink{chap:DWTAGsubprogram}{DW\_TAG\_subprogram}. Such an entry has a
\livelink{chap:DWATinline}{DW\_AT\_inline} attribute whose value is \livelink{chap:DWINLinlined}{DW\_INL\_inlined}.}
this attribute is the actual return value of the subroutine,
represented as it would be on the target architecture.
-\textit{In \addtoindex{C++}, if a function or a constructor declared with constexpr
+\textit{In \addtoindex{C++}, if a function or a constructor declared with
+\addtoindex{\texttt{constexpr}}
is called with constant expressions, then the corresponding
concrete inlined instance has a
\livelink{chap:DWATconstexpr}{DW\_AT\_const\_expr} attribute,
There are sections with no version number encoded in them;
they are only accessed via the
-\addtoindex{.debug\_info} and
-\addtoindex{.debug\_types}
+\dotdebuginfo{} and
+\dotdebugtypes{}
sections and so an incompatible change in those sections'
format would be represented by a change in the
-and \addtoindex{.debug\_types} section version number.
+and \dotdebugtypes{} section version number.
\clearpage
\begin{centering}
\endfoot
\hline
\endlastfoot
-\addtoindex{.debug\_abbrev}& - & - & - \\
-\addtoindex{.debug\_aranges}&2&2&2 \\
-\addtoindex{.debug\_frame}&1&3&4 \\
-\addtoindex{.debug\_info}&2&3&4 \\
-\addtoindex{.debug\_line}&2&3&4 \\
-\addtoindex{.debug\_loc}& - & - & - \\
-\addtoindex{.debug\_macinfo}& - & - & - \\
-\addtoindex{.debug\_pubnames}&2&2&2 \\
-\addtoindex{.debug\_pubtypes}&x&2&2 \\
-\addtoindex{.debug\_ranges}&x& - & - \\
-\addtoindex{.debug\_str}& - & - & - \\
-\addtoindex{.debug\_types}&x&x&4 \\
+\dotdebugabbrev{}& - & - & - \\
+\dotdebugaranges{}&2&2&2 \\
+\dotdebugframe{}&1&3&4 \\
+\dotdebuginfo{}&2&3&4 \\
+\dotdebugline{}&2&3&4 \\
+\dotdebugloc{}& - & - & - \\
+\dotdebugmacinfo{}& - & - & - \\
+\dotdebugpubnames{}&2&2&2 \\
+\dotdebugpubtypes{}&x&2&2 \\
+\dotdebugranges{}&x& - & - \\
+\dotdebugstr{}& - & - & - \\
+\dotdebugtypes{}&x&x&4 \\
\end{longtable}
\end{centering}
\item ``x'' means that the section was not defined in that
version of the DWARF standard.
-\item The version numbers for the \addtoindex{.debug\_info} and \addtoindex{.debug\_types}
+\item The version numbers for the \dotdebuginfo{} and \dotdebugtypes{}
sections must be the same.
\end{itemize}
-\textit{For \addtoindex{.debug\_frame}, section version 2 is unused.}
+\textit{For \dotdebugframe{}, section version 2 is unused.}
Higher numbers are reserved for future use.
a \livelink{chap:flag}{flag}.
Each debugging information entry owned by a subroutine
-type entry has a tag whose value has one of two possible
-interpretations:
+type entry correspond to either a formal parameter or the sequence of
+unspecified parameters of the subprogram type:
\begin{enumerate}[1. ]
-\item The formal parameters of a parameter list (that have a
-specific type) are represented by a debugging information entry
+\item A formal parameter of a parameter list (that has a
+specific type) is represented by a debugging information entry
with the tag \livelink{chap:DWTAGformalparameter}{DW\_TAG\_formal\_parameter}.
Each formal parameter
entry has
\item The unspecified parameters of a variable parameter list
\addtoindexx{unspecified parameters entry}
are
-\addtoindexx{... parameters|see{unspecified parameters entry}}
+\addtoindexx{\texttt{...} parameters|see{unspecified parameters entry}}
represented by a debugging information entry with the
tag \livelink{chap:DWTAGunspecifiedparameters}{DW\_TAG\_unspecified\_parameters}.
\end{enumerate}
\textit{unknown}.\addtoindexx{upper bound attribute!default unknown}
If the subrange entry has no type attribute describing the
-basis type, the basis type is assumed to be the same as
-the object described by the lower bound attribute (if it
-references an object). If there is no lower bound attribute,
-or that attribute does not reference an object, the basis type
-is the type of the upper bound or \addtoindex{count attribute}
-(if either
-of them references an object). If there is no upper bound or
-count attribute, or neither references an object, the type is
+basis type, the basis type is determined as follows:
+\begin{enumerate}[1. ]
+\item
+If there is a lower bound attribute that references an object,
+the basis type is assumed to be the same as the type of that object.
+\item
+Otherwise, if there is an upper bound or count attribute that references
+an object, the basis type is assumed to be the same as the type of that object.
+\item
+Otherwise, the type is
assumed to be the same type, in the source language of the
compilation unit containing the subrange entry, as a signed
integer with the same size as an address on the target machine.
+\end{enumerate}
If the subrange type occurs as the description of a dimension
of an array type, and the stride for that dimension is
information entry for the class or structure to whose members
objects of this type may point.
-The
+The \addtoindex{pointer to member entry}
\hypertarget{chap:DWATuselocationmemberlocationforpointertomembertype}
-has
-\addtoindex{pointer to member entry}
-a
+has a
\livelink{chap:DWATuselocation}{DW\_AT\_use\_location} attribute
\addtoindexx{use location attribute}
whose value is a
entire structure or union instance containing the member
whose address is being calculated.
+\needlines{6}
\textit{For an expression such as}
\begin{lstlisting}[numbers=none]