\DWLANGlouserMARK{}\DWLANGhiuserMARK{}DW\_LANG,
\DWLNCTlouserMARK{}\DWLNCThiuserMARK{}DW\_LNCT,
\DWLNElouserMARK{}\DWLNEhiuserMARK{}DW\_LNE,
-\DWMACROlouserMARK{}\DWMACROhiuserMARK{}DW\_MACRO,
-\DWOPlouserMARK{}\DWOPhiuserMARK{}DW\_OP or
-\DWTAGlouserMARK{}\DWTAGhiuserMARK{}DW\_TAG)
+\DWMACROlouserMARK{}\DWMACROhiuserMARK{}DW\_MACRO,
+\bb
+\DWOPlouserMARK{}\DWOPhiuserMARK{}DW\_OP,
+\DWTAGlouserMARK{}\DWTAGhiuserMARK{}DW\_TAG,
+\DWUTlouserMARK{}\DWUThiuserMARK{}DW\_UT)
+\eb
followed by \_lo\_user or \_hi\_user.
Values in the range between \textit{prefix}\_lo\_user
and \textit{prefix}\_hi\_user inclusive,
(\dotdebugaranges{},
\dotdebuginfo{},
\dotdebugline{},
-\bb
\dotdebugloclists{},
\dotdebugnames{} and
\dotdebugrnglists)
-\eb
or the length field
that occurs at the beginning of the CIE and FDE structures
in the \dotdebugframe{} section.
debugging information in other debugging information sections within
the object file, and must be relocated during the linking process.
-\bbpareb
-
\item Debugging information entries may have attributes with the form
\DWFORMrefaddr{} (see Section \refersec{datarep:attributeencodings}).
These attributes refer to
These attributes refer to strings in
the \dotdebugstr{} section. These values require relocation.
-\item Entries in the \dotdebugaddr{}
-\bbeb
-and \dotdebugaranges{}
+\item Entries in the \dotdebugaddr{} and \dotdebugaranges{}
sections may contain references to locations within the virtual address
space of the program, and thus require relocation.
-\bb
\item Entries in the \dotdebugloclists{} and \dotdebugrnglists{} sections may
contain references to locations within the virtual address space of the
program depending on whether certain kinds of location or range
list entries are used, and thus require relocation.
-\eb
\item In the \dotdebugline{} section, the operand of the \DWLNEsetaddress{}
opcode is a reference to a location within the virtual address space
and includes the following:
\begin{itemize}
\item
-The line number tables,
-\bbeb
-frame tables, and
+The line number tables, frame tables, and
accelerated access tables, in the usual sections:
\dotdebugline, \dotdebuglinestr,
\dotdebugframe, \dotdebugnames{} and \dotdebugaranges,
contains all addresses and constants that require
link-time relocation, and items in the table can be
referenced indirectly from the debugging information via
-the \DWFORMaddrx{} form,
-\bb
+the \DWFORMaddrxXNand{} forms,
by the \DWOPaddrx{} and \DWOPconstx{} operators, and
by certain of the \texttt{DW\_LLE\_*} location list
and \texttt{DW\_RLE\_*} range list entries.
-\eb
\item
A skeleton compilation unit, as described in Section
\refersec{chap:skeletoncompilationunitentries},
\item
An abbreviations table for the skeleton compilation unit,
in the \dotdebugabbrev{} section
-\bb
used by the \dotdebuginfo{} section.
-\eb
\item
A string table, in the \dotdebugstr{} section. The string
table is necessary only if the skeleton compilation unit
-uses either indirect string form, \DWFORMstrp{} or
-\DWFORMstrx.
+\bb
+uses one of the indirect string forms (\DWFORMstrp{},
+\DWFORMstrxXNor).
+\eb
+\needlines{4}
\item
A string offsets table, in the \dotdebugstroffsets{}
-section
+section for strings in the \dotdebugstr{} section.
+The string offsets table is necessary only if
+the skeleton compilation unit uses
\bb
-for strings in the \dotdebugstr{} section.
+one of the indexed string forms
\eb
-The string offsets table is necessary only if
-the skeleton compilation unit uses the \DWFORMstrx{} form.
+(\DWFORMstrxXN).
\end{itemize}
The attributes contained in the skeleton compilation
unit can be used by a DWARF consumer to find the
The full compilation unit, in the \dotdebuginfodwo{} section.
Attributes contained in the full compilation unit
-may refer to machine addresses indirectly using the \DWFORMaddrx{}
-form, which accesses the table of addresses specified by the
+may refer to machine addresses indirectly using
+\bb
+one of the
+\eb
+\DWFORMaddrxXNor{}
+forms, which access the table of addresses specified by the
\DWATaddrbase{} attribute in the associated skeleton unit.
Location descriptions may similarly do so using the \DWOPaddrx{} and
\DWOPconstx{} operations.
-\bbpareb
-
\item Separate type units, in the \dotdebuginfodwo{} section.
\item
Abbreviations table(s) for the compilation unit and type
units, in the \dotdebugabbrevdwo{} section
-\bb
used by the \dotdebuginfodwo{} section.
-\eb
\item Location lists, in the
-\bb
\dotdebugloclistsdwo{} section.
-\eb
-\bb
\item Range lists, in the \dotdebugrnglistsdwo{} section.
-\eb
\item
A \addtoindex{specialized line number table} (for the type units),
\item A string offsets table, in the \dotdebugstroffsetsdwo{}
section
-\bb
for the strings in the \dotdebugstrdwo{} section.
-\eb
\end{itemize}
Except where noted otherwise, all references in this document
header, a section table, a number of DWARF debug information
sections, and two index sections.
-\needlines{10}
+%\needlines{8}
Each DWARF package file contains no more than one of each of the
following sections, copied from a set of object or DWARF object
files, and combined, section by section:
\end{alltt}
The string table section in \dotdebugstrdwo{} contains all the
-strings referenced from DWARF attributes using the form
-\DWFORMstrx. Any attribute in a compilation unit or a type
+strings referenced from DWARF attributes using
+\bb
+any of the forms
+\eb
+\DWFORMstrxXNor. Any attribute in a compilation unit or a type
unit using this form refers to an entry in that unit's
contribution to the \dotdebugstroffsetsdwo{} section, which in turn
provides the offset of a string in the \dotdebugstrdwo{}
\needlines{4}
The table of offsets begins immediately following the parallel
table (at offset \mbox{$16 + 12 * S$} from the beginning of the section).
-\bb
This table consists of a single header row containing $N$ fields,
each a 4-byte unsigned integer, followed by $U$ data rows, each
also containing $N$ fields of 4-byte unsigned integers. The fields
an offset to the debug section whose identifier appears in the
corresponding field of the header row. The data rows are indexed
starting at 1.
-\eb
\textit{Not all sections listed in the table need be included.}
\textit{Reserved} & 2 & \\
\DWSECTABBREVTARG & 3 & \dotdebugabbrevdwo \\
\DWSECTLINETARG & 4 & \dotdebuglinedwo \\
-\bb
-\DWSECTLOCLISTSTARG & 5 & \dotdebugloclistsdwo
-\eb \\
+\DWSECTLOCLISTSTARG & 5 & \dotdebugloclistsdwo \\
\DWSECTSTROFFSETSTARG & 6 & \dotdebugstroffsetsdwo \\
\DWSECTMACROTARG & 7 & \dotdebugmacrodwo \\
-\bb
-\DWSECTRNGLISTSTARG & 8 & \dotdebugrnglistsdwo
-\eb \\
+\DWSECTRNGLISTSTARG & 8 & \dotdebugrnglistsdwo \\
\end{longtable}
\end{centering}
The table of sizes begins immediately following the table of
offsets, and provides the sizes of the contributions made by each
CU or TU to the corresponding section in the package file.
-\bb
-This
-table consists of U data rows, each with N fields of 4-byte
+This table consists of U data rows, each with N fields of 4-byte
unsigned integers. Each data row corresponds to the same CU or TU
as the corresponding data row in the table of offsets described
above. Within each data row, the N fields also correspond
table of offsets. Each field provides the size of the
contribution made by a CU or TU to the corresponding section in
the package file.
-\eb
For an example, see Figure \refersec{fig:examplecuindexsection}.
\subsection{DWARF Supplementary Object Files}
\label{datarep:dwarfsupplemetaryobjectfiles}
-\bb
-\textit{In contrast to split DWARF object files, which allow the compiler to
-split the debugging information between to files in order to reduce
-link time and executable size, a supplementary object file permits a
-post-link utility to analyze many executable and shared object files,
-and collect any duplicate debugging information into a single file
-that can be referenced by each of the original files. This facility
-can be useful for building integrated operating system packages
-and distributions.}
-\eb
+\textit{A supplementary object file permits a post-link utility to analyze executable and
+shared object files and collect duplicate debugging information into a single file that
+can be referenced by each of the original files. This is in contrast to split DWARF
+object files, which allow the compiler to split the debugging information between
+multiple files in order to reduce link time and executable size.}
\needlines{4}
A DWARF \addtoindex{supplementary object file} is itself an object file,
form attributes must not be moved to a \addtoindex{supplementary object file}.
Executable or shared object file compilation units can use
-\DWTAGimportedunit{} with \DWFORMrefsup{} form \DWATimport{} attribute
-to import entries from the \addtoindex{supplementary object file}, other \DWFORMrefsup{}
+\DWTAGimportedunit{} with
+\bb
+an \DWATimport{} attribute that uses \DWFORMrefsupfour{} or \DWFORMrefsupeight{}
+\eb
+to import entries from the \addtoindex{supplementary object file}, other
+\bb
+\DWFORMrefsupfour{} or \DWFORMrefsupeight{}
+\eb
attributes to refer to them and \DWFORMstrpsup{} form attributes to
refer to strings that are used by debug information of multiple
executables or shared object files. Within the \addtoindex{supplementary object file}'s
-debugging sections, form \DWFORMrefsup{} or \DWFORMstrpsup{} are
+debugging sections, form
+\bb
+\DWFORMrefsupfour{}, \DWFORMrefsupeight{}
+\eb
+or \DWFORMstrpsup{} are
not used, and all reference forms referring to some other sections
refer to the local sections in the \addtoindex{supplementary object file}.
are 4-byte unsigned integer values; in the 64-bit DWARF format,
they are 8-byte unsigned integer values.
+\begin{nolinenumbersenv}
\begin{center}
\begin{tabular}{lll}
Section &Name & Role \\ \hline
& or local TUs & \\
\end{tabular}
\end{center}
+\end{nolinenumbersenv}
\needlines{4}
The \texttt{CIE\_id} field in a CIE structure must be 64 bits because
of DWARF format as follows. For the 32-bit DWARF format,
the value is a 4-byte unsigned integer; for the 64-bit DWARF
format, the value is an 8-byte unsigned integer.
+
\begin{center}
+\begin{nolinenumbersenv}
\begin{tabular}{lp{6cm}}
Form & Role \\ \hline
\DWFORMlinestrp & offset in \dotdebuglinestr \\
\DWFORMrefaddr & offset in \dotdebuginfo{} \\
-\DWFORMrefsup & offset in \dotdebuginfo{} section of a \mbox{supplementary} object file \\
- \addtoindexx{supplementary object file}
+\bbeb
\DWFORMsecoffset & offset in a section other than \\
& \dotdebuginfo{} or \dotdebugstr{} \\
\DWFORMstrp & offset in \dotdebugstr{} \\
\DWFORMstrpsup & offset in \dotdebugstr{} section of a \mbox{supplementary} object file \\
\DWOPcallref & offset in \dotdebuginfo{} \\
\end{tabular}
+\end{nolinenumbersenv}
\end{center}
\needlines{5}
description depend on the choice of DWARF format as follows: for the
32-bit DWARF format, the value is a 4-byte unsigned integer; for the
64-bit DWARF format, the value is a 8-byte unsigned integer.
+
\begin{center}
+\begin{nolinenumbersenv}
\begin{tabular}{lp{6cm}}
Form & Role \\ \hline
\DWFORMlinestrp & offset in \dotdebuglinestr
\end{tabular}
+\end{nolinenumbersenv}
\end{center}
\item Within the body of the \dotdebugnames{}
unsigned integer values; in the 64-bit DWARF format, they are
8-byte unsigned integers.
-\item In the body of the \dotdebugaddr{}
-\bb
-section,
-\eb
-the contents of the address size fields depends on the
-DWARF format as follows: in the 32-bit DWARF format, these fields
-contain 4; in the 64-bit DWARF format these fields contain 8.
+%\bbpareb-delete bullet 7
-\bb
\item In the body of the \dotdebugloclists{} and \dotdebugrnglists{}
sections, the offsets the follow the header depend on the
DWARF format as follows: in the 32-bit DWARF format, offsets are 4-byte
unsigned integer values; in the 64-bit DWARF format, they are
8-byte unsigned integers.
-\eb
\end{enumerate}
addresses in the target program are not affected by these
rules.}
+\needlines{6}
A DWARF consumer that supports the 64-bit DWARF format must
support executables in which some compilation units use the
32-bit format and others use the 64-bit format provided that
interpretation of the information contained directly in the
\dotdebuginfo{} section.
-\needlines{4}
Multiple debugging information entries may share the same
abbreviation table entry. Each compilation unit is associated
with a particular abbreviation table, but multiple compilation
units may share the same table.
+\needlines{6}
\subsection{Unit Headers}
\label{datarep:unitheaders}
Unit headers contain a field, \addttindex{unit\_type}, whose value indicates the kind of
-compilation unit that follows. The encodings for the unit type
+compilation unit
+\bb
+(see Section \ref{chap:unitentries})
+\eb
+that follows. The encodings for the unit type
enumeration are shown in Table \refersec{tab:unitheaderunitkindencodings}.
\needlines{6}
\end{longtable}
\end{centering}
-\textit{All unit headers in a compilation have the same size.
-Some header types include padding bytes to achieve this.}
+\bb
+All unit headers have the same initial three fields: \HFNinitiallength, \HFNversion{} and \HFNunittype.
+\eb
\needlines{5}
-\subsubsection{Compilation and Partial Unit Headers}
+\bb
+\subsubsection{Full and Partial Compilation Unit Headers}
+\eb
\label{datarep:compilationunitheader}
\begin{enumerate}[1. ]
\addttindexx{unit\_type}
A 1-byte unsigned integer identifying this unit as a compilation unit.
The value of this field is
-\DWUTcompile{} for a full compilation unit or
-\DWUTpartial{} for a partial compilation unit
+\DWUTcompile{} for a
+\bb
+(non-split) full compilation unit or
+\DWUTpartial{} for a (non-split) partial compilation unit
+\eb
(see Section \refersec{chap:fullandpartialcompilationunitentries}).
+\textit{See
+\bb
+Section \ref{datarep:skeletonandfullcompilationunitheaders}
+regarding a split full compilation unit.
+\eb}
+
\textit{This field is new in \DWARFVersionV.}
\needlines{4}
in the \sixtyfourbitdwarfformat, this is an 8-byte unsigned length
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
-\item \HFNunitpaddingONE{} (8 bytes) \\
-Reserved to DWARF (must be zero).
-
-\needlines{4}
-\item \HFNunitpaddingTWO{} (4 or 8 bytes) \\
-Reserved to DWARF (must be zero). In the \thirtytwobitdwarfformat,
-this is 4 bytes in length; in the \sixtyfourbitdwarfformat, this
-is 8 bytes in length.
+\bbpareb
\end{enumerate}
\needlines{8}
A 1-byte unsigned integer identifying this unit as a compilation unit.
The value of this field is
\DWUTskeleton{} for a skeleton compilation unit or
-\DWUTsplitcompile{} for a split compilation unit
+\DWUTsplitcompile{} for a split
+\bb
+(full)
+\eb
+compilation unit
(see Section \refersec{chap:skeletoncompilationunitentries}).
+\textit{There
+\bb
+is no split analog to the partial compilation unit.
+\eb}
+
\textit{This field is new in \DWARFVersionV.}
\needlines{4}
the object file named in the \DWATdwoname{} attribute
of the skeleton compilation.
-\needlines{4}
-\item \HFNunitpaddingTWO{} (4 or 8 bytes) \\
-Reserved to DWARF (must be zero). In the \thirtytwobitdwarfformat,
-this is 4 bytes in length; in the \sixtyfourbitdwarfformat{}, this
-is 8 bytes in length.
+\bbpareb
\end{enumerate}
\needlines{8}
the primary type contained in this
\addtoindex{type unit} uses this value.}
-%\needlines{8}
+\needlines{8}
\item \texttt{type\_offset} (\livelink{datarep:sectionoffsetlength}{section offset}) \\
\addttindexx{type\_offset}
A 4-byte or 8-byte unsigned offset
\subsection{Abbreviations Tables}
\label{datarep:abbreviationstables}
-
The abbreviations tables for all compilation units
are contained in a separate object file section called
\dotdebugabbrev{}.
tag names are given in
Table \refersec{tab:tagencodings}.
-\needlines{6}
+\needlines{10}
\begin{centering}
\setlength{\extrarowheight}{0.1cm}
\begin{longtable}{l|c}
\DWTAGentrypoint&0x03 \\
\DWTAGenumerationtype&0x04 \\
\DWTAGformalparameter&0x05 \\
+\bbeb\textit{Reserved}&0x06 \\
+\bbeb\textit{Reserved}&0x07 \\
\DWTAGimporteddeclaration&0x08 \\
+\bbeb\textit{Reserved}&0x09 \\
\DWTAGlabel&0x0a \\
\DWTAGlexicalblock&0x0b \\
+\bbeb\textit{Reserved}&0x0c \\
\DWTAGmember&0x0d \\
+\bbeb\textit{Reserved}&0x0e \\
\DWTAGpointertype&0x0f \\
\DWTAGreferencetype&0x10 \\
\DWTAGcompileunit&0x11 \\
\DWTAGstringtype&0x12 \\
\DWTAGstructuretype&0x13 \\
+\bbeb\textit{Reserved}&0x14 \\
\DWTAGsubroutinetype&0x15 \\
\DWTAGtypedef&0x16 \\
\DWTAGuniontype&0x17 \\
\DWTAGcallsite~\ddag & 0x48 \\
\DWTAGcallsiteparameter~\ddag & 0x49 \\
\DWTAGskeletonunit~\ddag & 0x4a \\
-\bb
-\DWTAGimmutabletype~\ddag & 0x4b
-\eb
-\\
+\DWTAGimmutabletype~\ddag & 0x4b \\
\DWTAGlouser&0x4080 \\
\DWTAGhiuser&\xffff \\
\end{longtable}
\DWATsibling&0x01&\livelink{chap:classreference}{reference}
\addtoindexx{sibling attribute} \\
\DWATlocation&0x02&\livelink{chap:classexprloc}{exprloc},
-\bb
\CLASSloclist
-\eb
\addtoindexx{location attribute} \\
\DWATname&0x03&\livelink{chap:classstring}{string}
\addtoindexx{name attribute} \\
+\bbeb\textit{Reserved}&0x04&\textit{not applicable} \\
+\bbeb\textit{Reserved}&0x05&\textit{not applicable} \\
+\bbeb\textit{Reserved}&0x06&\textit{not applicable} \\
+\bbeb\textit{Reserved}&0x07&\textit{not applicable} \\
+\bbeb\textit{Reserved}&0x08&\textit{not applicable} \\
\DWATordering&0x09&\livelink{chap:classconstant}{constant}
\addtoindexx{ordering attribute} \\
+\bbeb\textit{Reserved}&0x0a&\textit{not applicable} \\
\DWATbytesize&0x0b&\livelink{chap:classconstant}{constant},
\livelink{chap:classexprloc}{exprloc},
\livelink{chap:classreference}{reference}
\livelink{chap:classexprloc}{exprloc},
\livelink{chap:classreference}{reference}
\addtoindexx{bit size attribute} \\
+\bbeb\textit{Reserved}&0x0e&\textit{not applicable} \\
+\bbeb\textit{Reserved}&0x0f&\textit{not applicable} \\
\DWATstmtlist&0x10&\livelink{chap:classlineptr}{lineptr}
\addtoindexx{statement list attribute} \\
\DWATlowpc&0x11&\livelink{chap:classaddress}{address}
\addtoindexx{high PC attribute} \\
\DWATlanguage&0x13&\livelink{chap:classconstant}{constant}
\addtoindexx{language attribute} \\
+\bbeb\textit{Reserved}&0x14&\textit{not applicable} \\
\DWATdiscr&0x15&\livelink{chap:classreference}{reference}
\addtoindexx{discriminant attribute} \\
\DWATdiscrvalue&0x16&\livelink{chap:classconstant}{constant}
\DWATimport&0x18&\livelink{chap:classreference}{reference}
\addtoindexx{import attribute} \\
\DWATstringlength&0x19&\livelink{chap:classexprloc}{exprloc},
-\bb
- \CLASSloclist
-\eb
- \addtoindexx{string length attribute} \\
+ \CLASSloclist,
+\bbeb \CLASSreference
+ \addtoindexx{string length attribute} \\
\DWATcommonreference&0x1a&\livelink{chap:classreference}{reference}
\addtoindexx{common reference attribute} \\
\DWATcompdir&0x1b&\livelink{chap:classstring}{string}
\livelink{chap:classreference}{reference},
\livelink{chap:classflag}{flag}
\addtoindexx{default value attribute} \\
+\bbeb\textit{Reserved}&0x1f&\textit{not applicable} \\
\DWATinline&0x20&\livelink{chap:classconstant}{constant}
\addtoindexx{inline attribute} \\
\DWATisoptional&0x21&\livelink{chap:classflag}{flag}
\livelink{chap:classexprloc}{exprloc},
\livelink{chap:classreference}{reference}
\addtoindexx{lower bound attribute} \\
+\bbeb\textit{Reserved}&0x23&\textit{not applicable} \\
+\bbeb\textit{Reserved}&0x24&\textit{not applicable} \\
\DWATproducer&0x25&\livelink{chap:classstring}{string}
\addtoindexx{producer attribute} \\
+\bbeb\textit{Reserved}&0x26&\textit{not applicable} \\
\DWATprototyped&0x27&\livelink{chap:classflag}{flag}
\addtoindexx{prototyped attribute} \\
+\bbeb\textit{Reserved}&0x28&\textit{not applicable} \\
+\bbeb\textit{Reserved}&0x29&\textit{not applicable} \\
\DWATreturnaddr&0x2a&\livelink{chap:classexprloc}{exprloc},
-\bb
\CLASSloclist
-\eb
\addtoindexx{return address attribute} \\
+\bbeb\textit{Reserved}&0x2b&\textit{not applicable} \\
\DWATstartscope&0x2c&
\livelink{chap:classconstant}{constant},
-\bb
\CLASSrnglist
-\eb
\addtoindexx{start scope attribute} \\
+\bbeb\textit{Reserved}&0x2d&\textit{not applicable} \\
\DWATbitstride&0x2e&\livelink{chap:classconstant}{constant},
\livelink{chap:classexprloc}{exprloc},
\livelink{chap:classreference}{reference}
\livelink{chap:classexprloc}{exprloc},
\livelink{chap:classreference}{reference}
\addtoindexx{upper bound attribute} \\
+\bbeb\textit{Reserved}&0x30&\textit{not applicable} \\
\DWATabstractorigin&0x31&\livelink{chap:classreference}{reference}
\addtoindexx{abstract origin attribute} \\
\DWATaccessibility&0x32&\livelink{chap:classconstant}{constant}
\addtoindexx{count attribute} \\
\DWATdatamemberlocation&0x38&\livelink{chap:classconstant}{constant},
\livelink{chap:classexprloc}{exprloc},
-\bb
\CLASSloclist
-\eb
\addtoindexx{data member attribute} \\
\DWATdeclcolumn&0x39&\livelink{chap:classconstant}{constant}
\addtoindexx{declaration column attribute} \\
\DWATexternal&\xiiif&\livelink{chap:classflag}{flag}
\addtoindexx{external attribute} \\
\DWATframebase&0x40&\livelink{chap:classexprloc}{exprloc},
-\bb
\CLASSloclist
-\eb
\addtoindexx{frame base attribute} \\
\DWATfriend&0x41&\livelink{chap:classreference}{reference}
\addtoindexx{friend attribute} \\
\DWATpriority&0x45&\livelink{chap:classreference}{reference}
\addtoindexx{priority attribute} \\
\DWATsegment&0x46&\livelink{chap:classexprloc}{exprloc},
-\bb
\CLASSloclist
-\eb
\addtoindexx{segment attribute} \\
\DWATspecification&0x47&\livelink{chap:classreference}{reference}
\addtoindexx{specification attribute} \\
\DWATstaticlink&0x48&\livelink{chap:classexprloc}{exprloc},
-\bb
\CLASSloclist
-\eb
\addtoindexx{static link attribute} \\
\DWATtype&0x49&\livelink{chap:classreference}{reference}
\addtoindexx{type attribute} \\
\DWATuselocation&0x4a&\livelink{chap:classexprloc}{exprloc},
-\bb
\CLASSloclist
-\eb
\addtoindexx{location list attribute} \\
\DWATvariableparameter&0x4b&\livelink{chap:classflag}{flag}
\addtoindexx{variable parameter attribute} \\
\DWATvirtuality&0x4c&\livelink{chap:classconstant}{constant}
\addtoindexx{virtuality attribute} \\
\DWATvtableelemlocation&0x4d&\livelink{chap:classexprloc}{exprloc},
-\bb
\CLASSloclist
-\eb
\addtoindexx{vtable element location attribute} \\
\DWATallocated&0x4e&\livelink{chap:classconstant}{constant},
\livelink{chap:classexprloc}{exprloc},
\DWATextension&0x54&\livelink{chap:classreference}{reference}
\addtoindexx{extension attribute} \\
\DWATranges&0x55&
-\bb
- \CLASSrnglist
-\eb
+ \CLASSrnglist
\addtoindexx{ranges attribute} \\
\DWATtrampoline&0x56&\livelink{chap:classaddress}{address},
\livelink{chap:classflag}{flag},
\DWATaddrbase~\ddag &0x73&
\livelinki{chap:classaddrptr}{addrptr}{addrptr class}
\addtoindexx{address table base!encoding} \\
-\bb
\DWATrnglistsbase~\ddag&0x74&
\CLASSrnglistsptr
- \addtoindexx{range list base!encoding}
-\eb \\
+ \addtoindexx{range list base!encoding} \\
\textit{Reserved} &0x75& \textit{Unused} \\
\DWATdwoname~\ddag &0x76&
\livelink{chap:classstring}{string}
\addtoindexx{export symbols attribute} \\
\DWATdeleted~\ddag &0x8a &\CLASSflag \addtoindexx{deleted attribute} \\
\DWATdefaulted~\ddag &0x8b &\CLASSconstant \addtoindexx{defaulted attribute} \\
-\bb
-\DWATloclistsbase~\ddag &0x8c &\CLASSloclistsptr \addtoindexx{location list base attribute}
-\eb
-\\
+\DWATloclistsbase~\ddag &0x8c &\CLASSloclistsptr \addtoindexx{location list base attribute} \\
\DWATlouser&0x2000 & --- \addtoindexx{low user attribute encoding} \\
\DWAThiuser&\xiiifff& --- \addtoindexx{high user attribute encoding} \\
\end{longtable}
\end{centering}
-\bb
\subsection{Classes and Forms}
-\eb
\label{datarep:classesandforms}
-\bb
Each class is a set of forms which have related representations
and which are given a common interpretation according to the
attribute in which the form is used.
The attribute form governs how the value of an attribute is
encoded.
The classes and the forms they include are listed below.
-\eb
Form \DWFORMsecoffsetTARG{}
is a member of more than one class, namely
\CLASSaddrptr,
\CLASSlineptr,
-\bb
\CLASSloclist, \CLASSloclistsptr,
-\eb
\CLASSmacptr,
-\bb
\CLASSrnglist{}, \CLASSrnglistsptr,
-\eb
and
\CLASSstroffsetsptr;
-\bb
as a result, it is not possible for an
attribute to allow more than one of these classes.
-\eb
The list of classes allowed by the applicable attribute in
Table \refersec{tab:attributeencodings}
determines the class of the form.
is relocated in an executable file or shared object file.
\item An indirect index into a table of addresses (as
-described in the previous bullet) in the
-\dotdebugaddr{} section (\DWFORMaddrxTARG).
+described in the previous bullet) in the \dotdebugaddr{} section
+\bb
+(\DWFORMaddrxTARG, \DWFORMaddrxoneTARG, \DWFORMaddrxtwoTARG,
+\DWFORMaddrxthreeTARG{} and \DWFORMaddrxfourTARG).
+\eb
The representation of a \DWFORMaddrxNAME{} value is an unsigned
\addtoindex{LEB128} value, which is interpreted as a zero-based
index into an array of addresses in the \dotdebugaddr{} section.
+\bb
+The representation of a \DWFORMaddrxoneNAME, \DWFORMaddrxtwoNAME,
+\DWFORMaddrxthreeNAME{} or \DWFORMaddrxfourNAME{} value is a
+1-, 2-, 3- or 4-byte unsigned integer value, respectively,
+which is similarly interpretated.
+\eb
The index is relative to the value of the \DWATaddrbase{} attribute
of the associated compilation unit.
or location description
(see Section \refersec{chap:locationdescriptions}).
-\needlines{4}
+\needlines{8}
\item \CLASSflag \\
\livetarg{datarep:classflag}{}
A flag \addtoindexx{flag class}
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
\needlines{10}
-\bb
\item \CLASSloclist \\
\livetarg{datarep:classloclist}{}
This is represented as either:
\end{itemize}
\textit{This class is new in \DWARFVersionV.}
-\eb
\item \CLASSloclistsptr \\
\livetarg{datarep:classloclistsptr}{}
The operand consists of a byte
offset\addtoindexx{section offset!in class loclistsptr}
from the beginning of the \dotdebugloclists{} section.
-\bbeb
It is relocatable in a relocatable object file, and
relocated in an executable or shared object file. In the
\thirtytwobitdwarfformat, this offset is a 4-byte unsigned value;
in the \sixtyfourbitdwarfformat, it is an 8-byte unsigned value
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
-\bb
\textit{This class is new in \DWARFVersionV.}
-\eb
\item \CLASSmacptr \\
\livetarg{datarep:classmacptr}{}
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
\needlines{8}
-\bb
\item \CLASSrnglist \\
\livetarg{datarep:classrnglist}{}
This is represented as either:
that location is then added to the base to determine the location of
the target range list of entries.
\item
-An offset into the \dotdebugloclists{} section (\DWFORMsecoffset).
+\bb
+An offset into the \dotdebugrnglists{} section (\DWFORMsecoffset).
The operand consists of a byte
-offset\addtoindexx{section offset!in class loclist value}
-from the beginning of the \dotdebugloclists{} section.
+offset\addtoindexx{section offset!in class rnglist value}
+\eb
+from the beginning of the \dotdebugrnglists{} section.
It is relocatable in a relocatable object file, and
relocated in an executable or shared object file. In the
\thirtytwobitdwarfformat, this offset is a 4-byte unsigned value;
\end{itemize}
\textit{This class is new in \DWARFVersionV.}
-\eb
\needlines{4}
\item \CLASSrnglistsptr \\
\dotdebugrnglists{} section.
It is relocatable in a relocatable object file, and relocated
in an executable or shared object file.
-\bbeb
In the \thirtytwobitdwarfformat, this offset
is a 4-byte unsigned value; in the 64-bit DWARF
format, it is an 8-byte unsigned value (see Section
\refersec{datarep:32bitand64bitdwarfformats}).
-\bb
\textit{This class is new in \DWARFVersionV.}
-\eb
-
-\bbpareb
-\needlines{4}
+\needlines{8}
\item \CLASSreference \\
\livetarg{datarep:classreference}{}
There are four types of reference.\addtoindexx{reference class}
\dotdebuginfo{} section of the executable or shared object file to
a debugging information entry in the \dotdebuginfo{} section of
a \addtoindex{supplementary object file}.
-This type of reference (\DWFORMrefsupTARG) is an offset from the
-beginning of the \dotdebuginfo{} section in the
+This type of reference (\DWFORMrefsupfourTARG{}
+\bb
+or \DWFORMrefsupeightTARG{}) is a 4- or 8-byte offset (respectively)
+\eb
+from the beginning of the \dotdebuginfo{} section in the
\addtoindex{supplementary object file}.
\textit{The use of compilation unit relative references will reduce the
A string may be represented:
\begin{itemize}
\setlength{\itemsep}{0em}
-\item immediately in the debugging information entry itself
+\item Immediately in the debugging information entry itself
(\DWFORMstringTARG),
-\item as an
+\item As an
\addtoindexx{section offset!in class string value}
offset into a string table contained in
the \dotdebugstr{} section of the object file (\DWFORMstrpTARG),
section of a \addtoindex{supplementary object file}
refer to the local \dotdebugstr{} section of that same file.
In the \thirtytwobitdwarfformat, the representation of a
-\DWFORMstrpNAME{}, \DWFORMstrpNAME{} or \DWFORMstrpsupNAME{}
+\DWFORMstrpNAME{},
+\bb
+\DWFORMlinestrpNAME{}
+\eb
+or \DWFORMstrpsupNAME{}
value is a 4-byte unsigned offset; in the \sixtyfourbitdwarfformat,
it is an 8-byte unsigned offset
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
\needlines{6}
-\item as an indirect offset into the string table using an
+\item As an indirect offset into the string table using an
index into a table of offsets contained in the
-\dotdebugstroffsets{} section of the object file (\DWFORMstrxTARG).
+\dotdebugstroffsets{} section of the object file
+\bb
+(\DWFORMstrxTARG, \DWFORMstrxoneTARG, \DWFORMstrxtwoTARG, \DWFORMstrxthreeTARG{} and \DWFORMstrxfourTARG).
+\eb
The representation of a \DWFORMstrxNAME{} value is an unsigned
\addtoindex{LEB128} value, which is interpreted as a zero-based
-index into an array of offsets in the \dotdebugstroffsets{} section.
+index into an array of offsets in the \dotdebugstroffsets{} section.
+\bb
+The representation of a \DWFORMstrxoneNAME, \DWFORMstrxtwoNAME,
+\DWFORMstrxthreeNAME{} or \DWFORMstrxfourNAME{} value is a
+1-, 2-, 3- or 4-byte unsigned integer value, respectively,
+which is similarly interpretated.
+\eb
The offset entries in the \dotdebugstroffsets{} section have the
same representation as \DWFORMstrp{} values.
\end{itemize}
to point into either the
\dotdebuginfo{} or \dotdebugstr{} section.
-\bb
\subsection{Form Encodings}
\label{datarep:formencodings}
-\eb
The form encodings are listed in
Table \referfol{tab:attributeformencodings}.
\DWFORMrefeight&0x14&\livelink{chap:classreference}{reference} \\
\DWFORMrefudata&0x15&\livelink{chap:classreference}{reference} \\
\DWFORMindirect&0x16&(see Section \refersec{datarep:abbreviationstables}) \\
-\bb
\DWFORMsecoffset{} &0x17& \CLASSaddrptr, \CLASSlineptr, \CLASSloclist, \CLASSloclistsptr, \\
- & & \CLASSmacptr, \CLASSrnglist, \CLASSrnglistsptr, \CLASSstroffsetsptr
- \eb
- \\
+ & & \CLASSmacptr, \CLASSrnglist, \CLASSrnglistsptr, \CLASSstroffsetsptr \\
\DWFORMexprloc{} &0x18&\livelink{chap:classexprloc}{exprloc} \\
\DWFORMflagpresent{} &0x19&\livelink{chap:classflag}{flag} \\
-\DWFORMstrx{} \ddag &0x1a&\livelink{chap:classstring}{string} \\
-\DWFORMaddrx{} \ddag &0x1b&\livelink{chap:classaddress}{address} \\
-\DWFORMrefsup{}~\ddag &0x1c &\livelink{chap:classreference}{reference} \\
-\DWFORMstrpsup{}~\ddag &0x1d &\livelink{chap:classstring}{string} \\
-\DWFORMdatasixteen~\ddag &0x1e &\CLASSconstant \\
-\DWFORMlinestrp~\ddag &0x1f &\CLASSstring \\
-\DWFORMrefsigeight &0x20 &\livelink{chap:classreference}{reference} \\
+\DWFORMstrx{} \ddag &0x1a &\CLASSstring \\
+\DWFORMaddrx{} \ddag &0x1b &\CLASSaddress \\
+\DWFORMrefsupfour{}~\ddag &0x1c &\CLASSreference \\
+\DWFORMstrpsup{}~\ddag &0x1d &\CLASSstring \\
+\DWFORMdatasixteen~\ddag &0x1e &\CLASSconstant \\
+\DWFORMlinestrp~\ddag &0x1f &\CLASSstring \\
+\DWFORMrefsigeight &0x20 &\CLASSreference \\
\DWFORMimplicitconst~\ddag &0x21 &\CLASSconstant \\
+\DWFORMloclistx~\ddag &0x22 &\CLASSloclist \\
+\DWFORMrnglistx~\ddag &0x23 &\CLASSrnglist \\
+\DWFORMrefsupeight{}~\ddag &0x24 &\CLASSreference \\
\bb
-\DWFORMloclistx~\ddag \eb &0x22 &\CLASSloclist \\
-\bb
-\DWFORMrnglistx~\ddag \eb &0x23 &\CLASSrnglist \\
+\DWFORMstrxone{}~\ddag &0x25 &\CLASSstring \\
+\DWFORMstrxtwo{}~\ddag &0x26 &\CLASSstring \\
+\DWFORMstrxthree{}~\ddag &0x27 &\CLASSstring \\
+\DWFORMstrxfour{}~\ddag &0x28 &\CLASSstring \\
+\DWFORMaddrxone{}~\ddag &0x29 &\CLASSaddress \\
+\DWFORMaddrxtwo{}~\ddag &0x2a &\CLASSaddress \\
+\DWFORMaddrxthree{}~\ddag &0x2b &\CLASSaddress \\
+\eb
+\DWFORMaddrxfour{}~\ddag &0x2c &\CLASSaddress \\
\end{longtable}
\end{centering}
\hline \ddag\ \textit{New in DWARF Version 5}
\endlastfoot
+\bbeb\textit{Reserved}&0x01&-& \\
+\bbeb\textit{Reserved}&0x02&-& \\
\DWOPaddr&0x03&1 & constant address \\
& & &(size is target specific) \\
-
+\bbeb\textit{Reserved}&0x04&-& \\
+\bbeb\textit{Reserved}&0x05&-& \\
\DWOPderef&0x06&0 & \\
-
+\bbeb\textit{Reserved}&0x07&-& \\
\DWOPconstoneu&0x08&1&1-byte constant \\
\DWOPconstones&0x09&1&1-byte constant \\
\DWOPconsttwou&0x0a&1&2-byte constant \\
\subsection{Location Lists}
\label{datarep:locationlists}
Each entry in a \addtoindex{location list} is either a location list entry,
-a base address
-\bb
-entry, a default location entry or an
-\eb
+a base address entry, a default location entry or an
\addtoindexx{end-of-list entry!in location list}
end-of-list entry.
-\bbpareb
-
Each entry begins with an unsigned 1-byte code that indicates the kind of entry
that follows. The encodings for these constants are given in
Table \ref{tab:locationlistentryencodingvalues}.
\hline
\ddag New in \DWARFVersionV
\endlastfoot
-\bb
\DWLLEendoflist~\ddag & 0x00 \\
\DWLLEbaseaddressx~\ddag & 0x01 \\
\DWLLEstartxendx~\ddag & 0x02 \\
\DWLLEdefaultlocation~\ddag & 0x05 \\
\DWLLEbaseaddress~\ddag & 0x06 \\
\DWLLEstartend~\ddag & 0x07 \\
-\DWLLEstartlength~\ddag & 0x08
-\eb \\
+\DWLLEstartlength~\ddag & 0x08 \\
\end{longtable}
\end{centering}
\DWLANGCplusplusfourteen{}~\ddag &0x0021 &0 \addtoindexx{C++14 (ISO)} \\
\DWLANGFortranzerothree{}~\ddag &0x0022 &1 \addtoindexx{Fortran:2004 (ISO)} \\
\DWLANGFortranzeroeight{}~\ddag &0x0023 &1 \addtoindexx{Fortran:2010 (ISO)} \\
-\DWLANGRenderScript{}~\ddag &0x0024 &0 \addtoindexx{RenderScript Kernel Language}
+\DWLANGRenderScript{}~\ddag &0x0024 &0 \addtoindexx{RenderScript Kernel Language} \\
+\bb
+\DWLANGBLISS{} \ddag &0x0025 &0 \addtoindexx{BLISS}
+\eb
\\
\DWLANGlouser{} &0x8000 & \\
\DWLANGhiuser{} &\xffff & \\
\end{longtable}
\end{centering}
+\needlines{8}
\section{Calling Convention Encodings}
\label{datarep:callingconventionencodings}
The encodings of the constants used in the
% this clearpage is ugly, but the following table came
% out oddly without it.
+\needlines{10}
\section{Array Ordering}
\label{datarep:arrayordering}
The \addtoindexi{version number}{version number!name index table}
in the name index table header is \versiondotdebugnames{}.
-The name index attributes and their encodings are listed in Table \referfol{datarep:indexattributeencodings}.
+The name index attributes and their encodings are listed in Table \refersec{datarep:indexattributeencodings}.
+\needlines{14}
\begin{centering}
\setlength{\extrarowheight}{0.1cm}
\begin{longtable}{l|c|l}
\end{longtable}
\end{centering}
-\bb
\section{Range List Entries for Non-contiguous Address Ranges}
\label{datarep:noncontiguousaddressranges}
-\eb
-
Each entry in a \addtoindex{range list}
(see Section \refersec{chap:noncontiguousaddressranges})
is either a
\addtoindexx{range list}
a base address selection entry, or an end-of-list entry.
-\bb
Each entry begins with an unsigned 1-byte code that indicates the kind of entry
that follows. The encodings for these constants are given in
Table \refersec{tab:rnglistsentryencodingvalues}.
-\eb
\needlines{10}
\begin{centering}
\hline
\ddag New in \DWARFVersionV
\endlastfoot
-\bb
\DWRLEendoflist~\ddag & 0x00 \\
\DWRLEbaseaddressx~\ddag & 0x01 \\
\DWRLEstartxendx~\ddag & 0x02 \\
\DWRLEoffsetpair~\ddag & 0x04 \\
\DWRLEbaseaddress~\ddag & 0x05 \\
\DWRLEstartend~\ddag & 0x06 \\
-\DWRLEstartlength~\ddag & 0x07
-\eb \\
+\DWRLEstartlength~\ddag & 0x07 \\
\end{longtable}
\end{centering}
\needlines{10}
\section{Range List Table}
\label{app:ranglisttable}
-\bb
Each \dotdebugrnglists{} and \dotdebugrnglistsdwo{} section
-\eb
begins with a header containing:
\begin{enumerate}[1. ]
\item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
A 1-byte unsigned integer containing the size in
bytes of a segment selector on the target system.
-\bb
\item \HFNoffsetentrycount{} (\HFTuword) \\
A 4-byte count of the number of offsets
that follow the header.
+\bb
+This count may be zero.
\eb
\end{enumerate}
-\bb
Immediately following the header is an array of offsets.
This array is followed by a series of range lists.
-
-There is one offset for each range list. The contents
-of the $i$\textsuperscript{th} offset is the offset from the
+
+\bb
+If the \HFNoffsetentrycount{} is non-zero, there
+\eb
+is one offset for each range list.
+The contents
+of the $i$\textsuperscript{th} offset is the offset
+\bb
+(an unsigned integer)
+\eb
+from the
beginning of the offset array to the location of the
-$i$\textsuperscript{th} range list. Range lists are
-described in Section \refersec{chap:noncontiguousaddressranges}.
+$i$\textsuperscript{th} range list.
+\bb
+In the 32-bit DWARF format, each offset is 4-bytes in size;
+in the 64-bit DWARF format, each offset is 8-bytes in size
+(see Section \refersec{datarep:32bitand64bitdwarfformats}).
\eb
-
+
+\textit{\bb
+If the \HFNoffsetentrycount{} is zero, then \DWFORMrnglistx{} cannot
+be used to access a range list; \DWFORMsecoffset{} must be used
+instead. If the \HFNoffsetentrycount{} is non-zero, then \DWFORMrnglistx{}
+may be used to access a range list; this is necessary in split units and
+otherwise may be more compact than using \DWFORMsecoffset.
+\eb
+}
+
+Range lists are
+described in Section \refersec{chap:noncontiguousaddressranges}.
+
+\needlines{4}
The segment size is given by the
\HFNsegmentselectorsize{} field of the header, and the address size is
given by the \addttindex{address\_size} field of the header. If the
\HFNsegmentselectorsize{} field in the header is zero, the segment
selector is omitted from the range list entries.
-\bb
The \DWATrnglistsbase{} attribute points to the first offset
following the header. The range lists are referenced
by the index of the position of their corresponding offset in the
array of offsets, which indirectly specifies the offset to the
target list.
-\eb
\needlines{12}
\section{Location List Table}
\label{datarep:locationlisttable}
-\bb
Each \dotdebugloclists{} or \dotdebugloclistsdwo{} section
-\eb
begins with a header containing:
\begin{enumerate}[1. ]
\item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
A 1-byte unsigned integer containing the size in
bytes of a segment selector on the target system.
-\bb
\item \HFNoffsetentrycount{} (\HFTuword) \\
A 4-byte count of the number of offsets
that follow the header.
+\bb
+This count may be zero.
\eb
\end{enumerate}
-\bb
Immediately following the header is an array of offsets.
This array is followed by a series of location lists.
-There is one offset for each location list. The contents
-of the $i$\textsuperscript{th} offset is the offset from the
+\bb
+If the \HFNoffsetentrycount{} is non-zero, there
+\eb
+is one offset for each location list. The contents
+of the $i$\textsuperscript{th} offset is the offset
+\bb
+(an unsigned integer)
+\eb
+from the
beginning of the offset array to the location of the
-$i$\textsuperscript{th} location list. Location lists are
-described in Section \refersec{chap:locationlists}.
+$i$\textsuperscript{th} location list.
+\bb
+In the 32-bit DWARF format, each offset is 4-bytes in size;
+in the 64-bit DWARF format, each offset is 8-bytes in size
+(see Section \refersec{datarep:32bitand64bitdwarfformats}).
\eb
+\textit{\bb
+If the \HFNoffsetentrycount{} is zero, then \DWFORMloclistx{} cannot
+be used to access a location list; \DWFORMsecoffset{} must be used
+instead. If the \HFNoffsetentrycount{} is non-zero, then \DWFORMloclistx{}
+may be used to access a location list; this is necessary in split units and
+otherwise may be more compact than using \DWFORMsecoffset.
+\eb
+}
+
+Location lists are
+described in Section \refersec{chap:locationlists}.
+
The segment size is given by the
\HFNsegmentselectorsize{} field of the header, and the address size is
given by the \HFNaddresssize{} field of the header. If the
\HFNsegmentselectorsize{} field in the header is zero, the segment
selector is omitted from location list entries.
-\bb
The \DWATloclistsbase{} attribute points to the first offset
following the header. The location lists are referenced
by the index of the position of their corresponding offset in the
array of offsets, which indirectly specifies the offset to the
target list.
-\eb
\needlines{6}
\section{Dependencies and Constraints}
\addtoindex{type unit}.}
\needlines{4}
-\bb
\textit{Where the DWARF producer may reasonably choose two or
more different forms for a given attribute, it should choose
the simplest possible form in computing the signature. (For
example, a constant value should be preferred to a location
expression when possible.)}
-\eb
Once the string S has been formed from the DWARF encoding,
an 16-byte \MDfive{} digest is computed for the string and the
\hrefself{http://stackoverflow.com/questions/10696223/reason-for-5381-number-in-djb-hash-function)}.}
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
uint32_t /* must be a 32-bit integer type */
hash(unsigned char *str)
return hash;
}
-\end{lstlisting}
+\end{nlnlisting}
\caption{Name Table Hash Function Definition}
\label{fig:nametablehashfunctiondefinition}
\end{figure}