index entries beginning with '.'.
The section-relationships page was missing .debug_types,
now that name is in its proper place (per the DW4 doc).
approach, not to be limiting.}
A traditional relocatable object output
-from a single compilation might contain sections named:
+from a single compilation might contain sections
+named:
\begin{alltt}
- .data
- .text
- .debug\_info
- .debug\_abbrev
- .debug\_line
- .debug\_aranges
+ \addtoindex{.data}
+ \addtoindex{.text}
+ \addtoindex{.debug\_info}
+ \addtoindex{.debug\_abbrev}
+ \addtoindex{.debug\_line}
+ \addtoindex{.debug\_aranges}
\end{alltt}
A relocatable object from a compilation system
attempting duplicate DWARF elimination might
contain sections as in:
\begin{alltt}
- .data
- .text
- .debug\_info
- .debug\_abbrev
- .debug\_line
- .debug\_aranges
+ \addtoindex{.data}
+ \addtoindex{.text}
+ \addtoindex{.debug\_info}
+ \addtoindex{.debug\_abbrev}
+ \addtoindex{.debug\_line}
+ \addtoindex{.debug\_aranges}
\end{alltt}
followed (or preceded, the order is not significant)
by a series of section groups:
\begin{alltt}
==== Section group 1
- .debug\_info
- .debug\_abbrev
- .debug\_line
+ \addtoindex{.debug\_info}
+ \addtoindex{.debug\_abbrev}
+ \addtoindex{.debug\_line}
==== ...
==== Section group N
- .debug\_info
- .debug\_abbrev
- .debug\_line
+ \addtoindex{.debug\_info}
+ \addtoindex{.debug\_abbrev}
+ \addtoindex{.debug\_line}
\end{alltt}
where each section group might or might not contain executable
\begin{enumerate}[1.]
-\item A means of referencing from inside one .debug\_info
-compilation unit to another .debug\_info compilation unit
+\item A means of referencing from inside one \addtoindex{.debug\_info}
+compilation unit to another
+\addtoindex{.debug\_info} compilation unit
(\livelink{chap:DWFORMrefaddr}{DW\-\_FORM\-\_ref\-\_addr} provides this).
\item A means of having multiple contributions to specific sections
-(for example, .debug\_info, and so on) in a single object file.
+(for example, \addtoindex{.debug\_info}, and so on) in a single object file.
\item A means of identifying a section group (giving it a name).
\end{itemize}
-In general, every point in the section group .debug\_info that
+In general, every point in the section group
+\addtoindex{.debug\_info} that
could be referenced from outside by any compilation unit must
normally have an external name generated for it in the linker
symbol table, whether the current compilation references all
unit's debugging information entries to those of another
compilation unit.
-When referencing into a removable section group .debug\_info
-from another .debug\_info (from anywhere), the
+When referencing into a removable section group
+\addtoindex{.debug\_info}
+from another \addtoindex{.debug\_info} (from anywhere), the
\begin{alltt}
<prefix>.<file-designator>.<gid-number>.<die-number>
\end{alltt}
name should be used for an external symbol and a relocation
generated based on that name.
-When referencing into a non-section group .debug\_info,
-from another .debug\_info (from anywhere)
+When referencing into a non-section group
+\addtoindex{.debug\_info},
+from another \addtoindex{.debug\_info} (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
concrete basis for discussion.
In these examples, the focus is on the arrangement of DWARF
-information into sections (specifically the .debug\_info
+information into sections (specifically the
+\addtoindex{.debug\_info}
section) and the naming conventions used to achieve references
into section groups. In practice, all of the examples that
-follow involve DWARF sections other than just .debug\_info
-(for example, .debug\_line, .debug\_aranges, or others);
-however, only the .debug\_info section is shown to keep the
+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}
+section is shown to keep the
examples compact and easier to read.
The grouping of sections into a named set is shown, but the means for achieving this in terms of
\begin{alltt}
==== Section group name:
my.compiler.company.cpp.wa.h.123456
-== section .debug\_info
+== section \addtoindex{.debug\_info}
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{alltt}
== section .text
[generated code for function f]
-== section .debug\_info
+== section \addtoindex{.debug\_info}
\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 .debug\_info
+== section \addtoindex{.debug\_info}
DW.myf90.CommonStuff.fh.654321.1: ! linker global symbol
\livelink{chap:DWTAGpartialunit}{DW\-\_TAG\-\_partial\-\_unit}
== section .text
[code for function Foo]
-== section .debug\_info
+== section \addtoindex{.debug\_info}
\livelink{chap:DWTAGcompileunit}{DW\-\_TAG\-\_compile\-\_unit}
\livelink{chap:DWTAGsubprogram}{DW\-\_TAG\-\_subprogram}
\livelink{chap:DWATname}{DW\-\_AT\-\_name}("Foo")
\label{app:duplicateeliminationexample2companiondwarf}
\begin{alltt}
-== section .debug\_info
+== section \addtoindex{.debug\_info}
\livelink{chap:DWTAGcompileunit}{DW\-\_TAG\-\_compile\-\_unit}
\livelink{chap:DWATname}{DW\-\_AT\-\_name}(F90\$main)
\livelink{chap:DWTAGbasetype}{DW\-\_TAG\-\_base\-\_type}
A large portion of debug information is type information, and
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 .debug\_types section
+is separating each type into a separate
+addtoindex{.debug\_types} section
and arranging for the linker to recognize and eliminate
duplicates at the individual type level.
of each of these debug sections:
\begin{alltt}
-.debug\_abbrev
-.debug\_info
-.debug\_line
+\addtoindex{.debug\_abbrev}
+\addtoindex{.debug\_info}
+\addtoindex{.debug\_line}
\end{alltt}
and any number of these additional sections:
\begin{alltt}
-.debug\_types
+\addtoindex{.debug\_types}
\end{alltt}
As discussed in the previous section
linkonce section. The general idea is that a ``key'' can be
attached to a section or a group of sections, and the linker
will include only one copy of a section group (or individual
-section) for any given key. For .debug\_types sections, the
+section) for any given key. For
+\addtoindex{.debug\_types} sections, the
key is the type signature formed from the algorithm given in
Section \refersec{datarep:typesignaturecomputation}.
All data instances and code instances (even if they came
from the header files above) are put into non-section group
-sections such as the base object file .debug\_info section.
+sections such as the base object file
+\addtoindex{.debug\_info} section.
\subsection{Eliminating function duplication}
\label{app:eliminatingfunctionduplication}
by the static linker are simply discarded.
-References to other .debug\_info sections follow the approach
+References to other
+\addtoindex{.debug\_info} sections follow the approach
suggested above, but the naming rule might be slightly
different in that the
\begin{alltt}
There will also be a compilation unit that has the file\dash level
declarations and definitions. Other per\dash function compilation
-unit DWARF information (.debug\_info) points to this common
+unit DWARF information (
+\addtoindex{.debug\_info}) 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
An initial length field is one of the length fields that occur
at the beginning of those DWARF sections that have a header
-(.debug\_aranges, .debug\_info, .debug\_types, .debug\_line,
-.debug\_pubnames, and .debug\_pubtypes) or the length field
+(\addtoindex{.debug\_aranges},
+\addtoindex{.debug\_info},
+\addtoindex{.debug\_types},
+\addtoindex{.debug\_line},
+\addtoindex{.debug\_pubnames}, and
+\addtoindex{.debug\_pubtypes}) or the length field
that occurs at the beginning of the CIE and FDE structures
-in the .debug\_frame section.
+in the \addtoindex{.debug\_frame} section.
In an initial length field, the values 0xfffffff0 through
0xffffffff are reserved by DWARF to indicate some form of
\begin{center}
\begin{tabular}{lll}
Section &Name & Role \\ \hline
-.debug\_ranges & debug\_info\_offset & offset in .debug\_info \\
-.debug\_frame/CIE & CIE\_id & CIE distinguished value \\
-.debug\_frame/FDE & CIE\_pointer & offset in .debug\_frame \\
-.debug\_info & debug\_abbrev\_offset & offset in .debug\_abbrev \\
-.debug\_line & header\_length & length of header itself \\
-.debug\_pubnames & debug\_info\_offset & offset in .debug\_info \\
- & debug\_info\_length & length of .debug\_info \\
+\addtoindex{.debug\_ranges} & debug\_info\_offset & offset in \addtoindex{.debug\_info} \\
+\addtoindex{.debug\_frame}/CIE & CIE\_id & CIE distinguished value \\
+\addtoindex{.debug\_frame}/FDE & CIE\_pointer & offset in \addtoindex{.debug\_frame} \\
+\addtoindex{.debug\_info} & debug\_abbrev\_offset & offset in \addtoindex{.debug\_abbrev} \\
+\addtoindex{.debug\_line} & header\_length & length of header itself \\
+\addtoindex{.debug\_pubnames} & debug\_info\_offset & offset in \addtoindex{.debug\_info} \\
+ & debug\_info\_length & length of \addtoindex{.debug\_info} \\
& & contribution \\
-.debug\_pubtypes & debug\_info\_offset & offset in .debug\_info \\
- & debug\_info\_length & length of .debug\_info \\
+\addtoindex{.debug\_pubtypes} & debug\_info\_offset & offset in \addtoindex{.debug\_info} \\
+ & debug\_info\_length & length of \addtoindex{.debug\_info} \\
& & contribution \\
-.debug\_types & debug\_abbrev\_offset & offset in .debug\_info \\
- & type\_offset & offset in of .debug\_types \\
+\addtoindex{.debug\_types} & debug\_abbrev\_offset & offset in \addtoindex{.debug\_info} \\
+ & type\_offset & offset in of \addtoindex{.debug\_types} \\
\end{tabular}
\end{center}
present, consequently, these two fields must exactly overlay
each other (both offset and size).}
-\item Within the body of the .debug\_info or .debug\_types
+\item Within the body of the \addtoindex{.debug\_info} or \addtoindex{.debug\_types}
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}{lll}
Form & Role \\ \hline
-\livelink{chap:DWFORMrefaddr}{DW\-\_FORM\-\_ref\-\_addr}& offset in .debug\_info \\
-\livetarg{chap:DWFORMsecoffset}{DW\-\_FORM\-\_sec\-\_offset}& offset in a section other than .debug\_info or .debug\_str \\
-\livelink{chap:DWFORMstrp}{DW\-\_FORM\-\_strp}&offset in .debug\_str \\
-\livelink{chap:DWOPcallref}{DW\-\_OP\-\_call\-\_ref}&offset in .debug\_info \\
+\livelink{chap:DWFORMrefaddr}{DW\-\_FORM\-\_ref\-\_addr}& offset in \addtoindex{.debug\_info} \\
+\livetarg{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} \\
\end{tabular}
\end{center}
-\item Within the body of the .debug\_pubnames and
-.debug\_pubtypes sections, the representation of the first field
-of each tuple (which represents an offset in the .debug\_info
+\item Within the body of the \addtoindex{.debug\_pubnames} and
+\addtoindex{.debug\_pubtypes}
+sections, the representation of the first field
+of each tuple (which represents an offset in the
+\addtoindex{.debug\_info}
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.
\label{datarep:formatofdebugginginformation}
For each compilation unit compiled with a DWARF producer,
-a contribution is made to the .debug\_info section of
+a contribution is made to the \addtoindex{.debug\_info} 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 .debug\_types section of the object file. Each
+be made to the \addtoindex{.debug\_types}
+section of the object file. Each
such contribution consists of a type unit header
(see Section \refersec{datarep:typeunitheader})
followed by a \livelink{chap:DWTAGtypeunit}{DW\-\_TAG\-\_type\-\_unit} entry, together with
The appropriate entry in the abbreviations table guides the
interpretation of the information contained directly in the
-.debug\_info or .debug\_types section.
+\addtoindex{.debug\_info} or
+\addtoindex{.debug\_types} section.
Multiple debugging information entries may share the same
abbreviation table entry. Each compilation unit is associated
\item unit\_length (initial length) \\
A 4\dash byte or 12\dash byte unsigned integer representing the length
-of the .debug\_info contribution for that compilation unit,
+of the \addtoindex{.debug\_info}
+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 0xfffffff0); in the 64\dash bit DWARF format, this consists
The value in this field is 4.
\item debug\_abbrev\_offset (section offset) \\
-A 4\dash byte or 8\dash byte unsigned offset into the .debug\_abbrev
+A 4\dash byte or 8\dash byte unsigned offset into the
+\addtoindex{.debug\_abbrev}
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;
The header for the series of debugging information entries
contributing to the description of a type that has been
-placed in its own type unit, within the .debug\_types section,
+placed in its own type unit, within the
+\addtoindex{.debug\_types} section,
consists of the following information:
\begin{enumerate}[1.]
\item unit\_length (initial length) \\
A 4\dash byte or 12\dash byte unsigned integer representing the length
-of the .debug\_types contribution for that compilation unit,
+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 0xfffffff0); in the 64\dash bit DWARF format, this
The value in this field is 4.
\item debug\_abbrev\_offset (section offset) \\
-A 4\dash byte or 8\dash byte unsigned offset into the .debug\_abbrev
+A 4\dash byte or 8\dash byte unsigned offset into the
+\addtoindex{.debug\_abbrev}
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;
The abbreviations tables for all compilation units
are contained in a separate object file section called
-.debug\_abbrev. As mentioned before, multiple compilation
+\addtoindex{.debug\_abbrev}.
+As mentioned before, multiple compilation
units may share the same abbreviations table.
The abbreviations table for a single compilation unit consists
debugging information entry. Each declaration begins with
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 .debug\_info or
-.debug\_types section. As described above, the abbreviation
+of a debugging information entry in the
+\addtoindex{.debug\_info} or
+\addtoindex{.debug\_types}
+section. As described above, the abbreviation
code 0 is reserved for null debugging information entries. The
abbreviation code is followed by another unsigned LEB128
number that encodes the entry’s tag. The encodings for the
The attribute form
\livetarg{chap:DWFORMindirect}{DW\-\_FORM\-\_indirect} is a special case. For
attributes with this form, the attribute value itself in the
-.debug\_info or .debug\_types section begins with an unsigned
+\addtoindex{.debug\_info} or
+\addtoindex{.debug\_types}
+section begins with an unsigned
LEB128 number that represents its form. This allows producers
to choose forms for particular attributes dynamically,
without having to add a new entry to the abbreviations table.
no value is encoded in the debugging information entry itself.
\item \livelink{chap:lineptr}{lineptr} \\
-This is an offset into the .debug\_line section
+This is an offset into the
+\addtoindex{.debug\_line} section
(\livelink{chap:DWFORMsecoffset}{DW\-\_FORM\-\_sec\-\_offset}). It consists of an offset from the
-beginning of the .debug\_line section to the first byte of
+beginning of the
+\addtoindex{.debug\_line}
+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
\item \livelink{chap:loclistptr}{loclistptr} \\
-This is an offset into the .debug\_loc section
+This is an offset into the
+\addtoindex{.debug\_loc}
+section
(\livelink{chap:DWFORMsecoffset}{DW\-\_FORM\-\_sec\-\_offset}). It consists of an offset from the
-beginning of the .debug\_loc section to the first byte of
+beginning of the
+\addtoindex{.debug\_loc}
+section to the first byte of
the data making up the location list for the compilation
unit.
It is relocatable in a relocatable object file, and
\item \livelink{chap:macptr}{macptr} \\
-This is an offset into the .debug\_macinfo section
+This is an offset into the
+\addtoindex{.debug\_macinfo} section
(\livelink{chap:DWFORMsecoffset}{DW\-\_FORM\-\_sec\-\_offset}). It consists of an offset from the
-beginning of the .debug\_macinfo section to the first byte of
+beginning of the \addtoindex{.debug\_macinfo}
+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
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
\item \livelink{chap:rangelistptr}{rangelistptr} \\
-This is an offset into the .debug\_ranges section
+This is an offset into the \addtoindex{.debug\_ranges} section
(\livelink{chap:DWFORMsecoffset}{DW\-\_FORM\-\_sec\-\_offset}).
It consists of an
-offset from the beginning of the .debug\_ranges section
+offset from the beginning of the
+\addtoindex{.debug\_ranges} section
to the beginning of the non\dash contiguous address ranges
information for the referencing entity.
It is relocatable in
is required.
The second type of reference can identify any debugging
-information entry within a .debug\_info section; in particular,
+information entry within a
+\addtoindex{.debug\_info} 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
-.debug\_info section of the target executable or shared object;
+\addtoindex{.debug\_info}
+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
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’s .debug\_info section in the same fashion as the run
+object’s \addtoindex{.debug\_info}
+section in the same fashion as the run
time loader, either when the debug information is first read,
or when the reference is used.
debugging information entry itself
(\livetarg{chap:DWFORMstring}{DW\-\_FORM\-\_string}), or may
be represented as an offset into a string table contained in
-the .debug\_str section of the object file
+the \addtoindex{.debug\_str} section of the object file
(\livetarg{chap:DWFORMstrp}{DW\-\_FORM\-\_strp}). In
the 32\dash bit DWARF format, the representation of a
\livelink{chap:DWFORMstrp}{DW\-\_FORM\-\_strp}
In no case does an attribute use one of the classes \livelink{chap:lineptr}{lineptr},
\livelink{chap:loclistptr}{loclistptr}, \livelink{chap:macptr}{macptr} or \livelink{chap:rangelistptr}{rangelistptr} to point into either the
-.debug\_info or .debug\_str section.
+\addtoindex{.debug\_info} or \addtoindex{.debug\_str} section.
The form encodings are listed in
Table \refersec{tab:attributeformencodings}.
\label{datarep:namelookuptables}
Each set of entries in the table of global names contained
-in the .debug\_pubnames and .debug\_pubtypes sections begins
+in the \addtoindex{.debug\_pubnames} and
+\addtoindex{.debug\_pubtypes} sections begins
with a header consisting of:
\begin{enumerate}[1.]
\item unit\_length (initial length) \\
A 4\dash byte or 12\dash byte unsigned integer representing the length
-of the .debug\_info contribution for that compilation unit,
+of the \addtoindex{.debug\_info}
+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 0xfffffff0); in the 64\dash bit DWARF format, this consists
% Some say unsigned offset this just says offset: FIXME
\item debug\_info\_offset (section offset) \\
-A 4\dash byte or 8\dash byte offset into the .debug\_info
+A 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;
\item debug\_info\_length (section length) \\
A 4\dash byte or 8\dash byte length containing the size in bytes of the
-contents of the .debug\_info section generated to represent
+contents of the \addtoindex{.debug\_info}
+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
is an 8-byte unsigned length
\label{datarep:addrssrangetable}
Each set of entries in the table of address ranges contained
-in the .debug\_aranges section begins with a header containing:
+in the \addtoindex{.debug\_aranges}
+section begins with a header containing:
\begin{enumerate}[1.]
% FIXME The unit length text is not fully consistent across
(see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
\item debug\_info\_offset (section offset) \\
-A 4\dash byte or 8\dash byte offset into the .debug\_info section of
+A 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,
this is an 8\dash byte unsigned offset
\label{datarep:dependenciesandconstraints}
The debugging information in this format is intended to
-exist in the .debug\_abbrev, .debug\_aranges, .debug\_frame,
-.debug\_info, .debug\_line, .debug\_loc, .debug\_macinfo,
-.debug\_pubnames, .debug\_pubtypes, .debug\_ranges, .debug\_str
-and .debug\_types sections of an object file, or equivalent
+exist 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}
+and
+\addtoindex{.debug\_types}
+sections of an object file, or equivalent
separate file or database. The information is not
word\dash aligned. Consequently: •
\thicklines
\begin{picture}(0,0)
\footnotesize
- \put(10,0) { .debug\_aranges }
+ \put(10,0) { \addtoindex{.debug\_aranges} }
\put(40,0) { \circle{80}}
- \put(180,0) { .debug\_frame }
+ \put(180,0) { \addtoindex{.debug\_frame} }
\put(210,0) { \circle{80}}
- \put(350,0) { .debug\_abbrev }
+ \put(350,0) { \addtoindex{.debug\_abbrev} }
\put(380,0) { \circle{80}}
\put(40,-40){\line(0,-1){30}}
\put(-10,-90){\framebox(110,20){To compilation unit (a)} }
\put(40,-90){\vector(0,-1){35}}
- \put(350,-90) { .debug\_str }
+ \put(350,-90) { \addtoindex{.debug\_str} }
\put(380,-90) {\circle{80}}
- \put(10,-180) { .debug\_info }
+ \put(10,-180) { \addtoindex{.debug\_info} }
\put(40,-180) {\circle{100}}
+ \put(10,-195) { \addtoindex{.debug\_types} }
- \put(350,-180) { .debug\_loc }
+ \put(350,-180) { \addtoindex{.debug\_loc} }
\put(380,-180) {\circle{80}}
- \put(350,-270) { .debug\_ranges }
+ \put(350,-270) { \addtoindex{.debug\_ranges} }
\put(380,-270) {\circle{80}}
\put(80,-140){\line(3, 2){90}}
\put(-10,-270){\framebox(110,20){To compilation unit (b)} }
\put(40,-320){\line(0,1){50}}
- \put(0,-360) { .debug\_pubnames }
- \put(0,-375) { .debug\_pubtypes }
+ \put(0,-360) { \addtoindex{.debug\_pubnames} }
+ \put(0,-375) { \addtoindex{.debug\_pubtypes} }
\put(40, -360) { \circle{80}}
- \put(175,-360) { .debug\_line }
+ \put(175,-360) { \addtoindex{.debug\_line} }
\put(210,-360) { \circle{80}}
- \put(350,-360) { .debug\_macinfo}
+ \put(350,-360) { \addtoindex{.debug\_macinfo} }
\put(380,-360) { \circle{80}}
\end{picture}
\clearpage
\begin{enumerate}[(a)]
-\item .debug\_aranges \\
+\item \addtoindex{.debug\_aranges} \\
The debug\_info\_offset value in
-the header is the offset in the .debug\_info section of the
+the header is
+the offset in the \addtoindex{.debug\_info} section of the
corresponding compilation unit header (not the compilation
unit entry).
-\item .debug\_pubnames and .debug\_pubtypes \\
+%b
+\item \addtoindex{.debug\_pubnames} and \addtoindex{.debug\_pubtypes} \\
The debug\_info\_offset value in the header is the offset in the
-.debug\_info section of the corresponding compilation unit header (not
+\addtoindex{.debug\_info} 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.
-\item .debug\_info and .debug\_types \\
+%c
+\item \addtoindex{.debug\_info} and \addtoindex{.debug\_types} \\
The debug\_abbrev\_offset value in the header is the offset in the
-.debug\_abbrev section of the abbreviations for that compilation unit.
-(d) .debug\_info and .debug\_types
-Attribute values of class string may have form \livelink{chap:DWFORMstrp}{DW\-\_FORM\-\_strp}, whose
-value is the offset in the .debug\_str section of the corresponding string.
+\addtoindex{.debug\_abbrev}
+section of the abbreviations for that compilation unit.
-\item .debug\_info and .debug\_types \\
+%d
+\item \addtoindex{.debug\_info} and \addtoindex{.debug\_types} \\
Attribute values of class string may have form \livelink{chap:DWFORMstrp}{DW\-\_FORM\-\_strp}, whose
-value is the offset in the .debug\_str section of the corresponding string.
+value is the offset in the \addtoindex{.debug\_str}
+section of the corresponding string.
-\item .debug\_loc \\
+%e
+\item \addtoindex{.debug\_loc} \\
The operand of the \livelink{chap:DWOPcallref}{DW\-\_OP\-\_call\-\_ref} DWARF expression operator is the
-offset of a debugging information entry in the .debug\_info section.
+offset of a debugging information entry in the
+\addtoindex{.debug\_info} section.
-\item .debug\_info \\
+%f
+\item \addtoindex{.debug\_info} \\
An attribute value of class \livelink{chap:loclistptr}{loclistptr} (specifically form
-\livelink{chap:DWFORMsecoffset}{DW\-\_FORM\-\_sec\-\_offset}) is an offset within the .debug\_loc section of a
+\livelink{chap:DWFORMsecoffset}{DW\-\_FORM\-\_sec\-\_offset}) is an offset within the \addtoindex{.debug\_loc} section of a
location list.
-\item .debug\_info \\
+%g
+\item \addtoindex{.debug\_info} \\
An attribute value of class \livelink{chap:rangelistptr}{rangelistptr} (specifically form
-\livelink{chap:DWFORMsecoffset}{DW\-\_FORM\-\_sec\-\_offset}) is an offset within the .debug\_ranges section of
+\livelink{chap:DWFORMsecoffset}{DW\-\_FORM\-\_sec\-\_offset}) is an offset within the \addtoindex{.debug\_ranges} section of
a range list.
-
-\item .debug\_info \\
-An attribute value of class \livelink{chap:macptr}{macptr} (specifically form
-\livelink{chap:DWFORMsecoffset}{DW\-\_FORM\-\_sec\-\_offset}) is an offset within the .debug\_macinfo section
+%h
+\item \addtoindex{.debug\_info} \\
+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
of the beginning of the macro information for the referencing unit.
-
-\item .debug\_info \\
-An attribute value of class \livelink{chap:lineptr}{lineptr} (specifically form
-\livelink{chap:DWFORMsecoffset}{DW\-\_FORM\-\_sec\-\_offset}) is an offset in the .debug\_line section of the
+%i
+\item \addtoindex{.debug\_info} \\
+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
beginning of the line number information for the referencing unit.
\end{enumerate}
-
-
-
Figure \refersec{fig:compilationunitsandabbreviationstable}
depicts the relationship of the abbreviations tables contained
-in the .debug\_abbrev section to the information contained in
-the .debug\_info section. Values are given in symbolic form,
+\addtoindexx{.debug\_abbrev example}
+\addtoindexx{.debug\_info example}
+in the \addtoindex{.debug\_abbrev}
+section to the information contained in
+the \addtoindex{.debug\_info}
+section. Values are given in symbolic form,
where possible.
The figure corresponds to the following two trivial source files:
%\centering
\begin{minipage}{0.4\textwidth}
\centering
-Compilation Unit 1: .debug\_info
+Compilation Unit 1: \addtoindex{.debug\_info}
\begin{framed}
\scriptsize
\begin{alltt}
%
%
\end{framed}
-Compilation Unit 2: .debug\_info
+Compilation Unit 2: \addtoindex{.debug\_info}
\begin{framed}
\scriptsize
\begin{alltt}
\hfill
\begin{minipage}{0.4\textwidth}
\centering
-Abbreviation Table: .debug\_abbrev
+Abbreviation Table: \addtoindex{.debug\_abbrev}
\begin{framed}
\scriptsize
\begin{alltt}
is shown in
Table \refersec{tab:callframeinformationexampleconceptualmatrix}.
Corresponding fragments from the
-.debug\_frame section are shown in
+\addtoindex{.debug\_frame} section are shown in
Table \refersec{tab:callframeinformationexamplecommoninformationentryencoding}.
The following notations apply in
coordinates, and \livelink{chap:DWATdescription}{DW\-\_AT\-\_description}, among others.
The debugging information entries are contained
-in the .debug\_info and .debug\_types
+in the \addtoindex{.debug\_info} and
+\addtoindex{.debug\_types}
sections of an object file.
in the 64\dash bit DWARF format, 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 .debug\_info or .debug\_types
+debugging information entry in a
+\addtoindex{.debug\_info}
+or
+\addtoindex{.debug\_types}
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
whenever the object whose location is being described
can change location during its lifetime. Location lists
are contained in a separate object file section called
-.debug\_loc. A location list is indicated by a location
+\addtoindex{.debug\_loc}. A location list is indicated by a location
attribute whose value is an offset from the beginning of
-the .debug\_loc section to the first byte of the list for the
+the \addtoindex{.debug\_loc} section to the first byte of the list for the
object in question.
Each entry in a location list is either a location
\livelink{chap:rangelistptr}{rangelistptr} for the same reason.
Range lists are contained
-in a separate object file section called .debug\_ranges. A
-range list is indicated by a \livelink{chap:DWATranges}{DW\-\_AT\-\_ranges} attribute whose
+in a separate object file section called
+\addtoindex{.debug\_ranges}. A
+range list is indicated by a
+\livelink{chap:DWATranges}{DW\-\_AT\-\_ranges} attribute whose
value is represented as an offset from the beginning of the
-.debug\_ranges section to the beginning of the range list.
+\addtoindex{.debug\_ranges} section to the beginning of the range list.
Each entry in a range list is either a range list entry,
a base address selection entry, or an end of list entry.
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, .debug\_info.
+file section, \addtoindex{.debug\_info}.
\textit{
A summary of the major changes
% 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 .debug\_info or .debug\_types section.
+is not contained within a \addtoindex{.debug\_info} or
+\addtoindex{.debug\_types} section.
In the descriptions that follow, these terms are used to
specify the representation of DWARF sections:
\subsection{Lookup by Name}
For lookup by name, two tables are maintained in separate
-object file sections named .debug\_pubnames for objects and
-functions, and .debug\_pubtypes for types. Each table consists
+object file sections named
+\addtoindex{.debug\_pubnames} for objects and
+functions, and
+\addtoindex{.debug\_pubtypes}
+for types. Each table consists
of sets of variable length entries. Each set describes the
names of global objects and functions, or global types,
respectively, whose definitions are represented by debugging
\textit{C++ member functions with a definition in the class declaration
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 .debug\_pubnames entry
+instance there is no need to have a
+\addtoindex{.debug\_pubnames} entry
for the member function.}
Each set begins with a header containing four values:
version number.
\item debug\_info\_offset (section offset) \\
-The offset from the beginning of the .debug\_info section of
+The offset from the beginning of the
+\addtoindex{.debug\_info} section of
the compilation unit header referenced by the set.
\item debug\_info\_length (section length) \\
-The size in bytes of the contents of the .debug\_info section
+The size in bytes of the contents of the
+\addtoindex{.debug\_info} 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 .debug\_pubnames section is not the simple name given
+in the
+\addtoindex{.debug\_pubnames}
+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
the data or function member.
\subsection{Lookup by Address}
For lookup by address, a table is maintained in a separate
-object file section called .debug\_aranges. The table consists
+object file section called
+\addtoindex{.debug\_aranges}. The table consists
of sets of variable length entries, each set describing the
portion of the program’s address space that is covered by
a single compilation unit.
\item debug\_info\_offset (section offset) \\
The offset from the
-beginning of the .debug\_info or .debug\_types section of the
+beginning of the \addtoindex{.debug\_info} or
+\addtoindex{.debug\_types} section of the
compilation unit header referenced by the set.
\item address\_size (ubyte) \\
or statement to statement.}
Line number information generated for a compilation unit is
-represented in the .debug\_line section of an object file and
+represented in the
+\addtoindex{.debug\_line} section of an object file and
is referenced by a corresponding compilation unit debugging
information entry
(see Section \refersec{chap:generalsubroutineandentrypointinformation})
-in the .debug\_info
+in the \addtoindex{.debug\_info}
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
-.debug\_line section as well.}
+\addtoindex{.debug\_line} section as well.}
\textit{If space were not a consideration, the information provided
-in the .debug\_line section could be represented as a large
+in the \addtoindex{.debug\_line}
+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:}
of preserving the original source in the debugging information.}
As described in Section 3.1.1, the macro information for a
-given compilation unit is represented in the .debug\_macinfo
+given compilation unit is represented in the
+\addtoindex{.debug\_macinfo}
section of an object file. The macro information for each
compilation unit is represented as a series of “macinfo”
entries. Each macinfo entry consists of a “type code” and
\subsection{General rules and restrictions}
\label{chap:generalrulesandrestrictions}
-All macinfo entries within a .debug\_macinfo section for a
+All macinfo entries within a \addtoindex{.debug\_macinfo}
+section for a
given compilation unit appear in the same order in which the
directives were processed by the compiler.
the program.}
The virtual unwind information is encoded in a self-contained
-section called .debug\_frame. Entries in a .debug\_frame section
+section called
+\addtoindex{.debug\_frame}. Entries in a
+\addtoindex{.debug\_frame} section
are aligned on a multiple of the address size relative to
the start of the section and come in two forms: a Common
Information Entry (CIE) and a Frame Description Entry (FDE).
A Common Information Entry holds information that is shared
among many Frame Description Entries. There is at least one
-CIE in every non-empty .debug\_frame section. A CIE contains
+CIE in every non-empty \addtoindex{.debug\_frame} section. A CIE contains
the following fields, in order:
\begin{enumerate}[1.]
might be information about dynamically allocated data which
needs to be freed on exit from the routine.}
-\textit{Because the .debug\_frame section is useful independently of
-any .debug\_info section, the augmentation string always uses
+\textit{Because the \addtoindex{.debug\_frame} section is useful independently of
+any \addtoindex{.debug\_info} section, the augmentation string always uses
UTF\dash 8 encoding.}
\item address\_size (ubyte) \\
address size.
\item CIE\_pointer (4 or 8 bytes, see Section \refersec{datarep:32bitand64bitdwarfformats}) \\
-A constant offset into the .debug\_frame section that denotes
+A constant offset into the \addtoindex{.debug\_frame}
+section that denotes
the CIE that is associated with this FDE.
\item initial\_location (segment selector and target address) \\
unit. 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
-.debug\_line section of the first byte of the line number
+\addtoindex{.debug\_line} 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 .debug\_macinfo section of the first byte of the macro
+the \addtoindex{.debug\_macinfo} section of the first byte of the macro
information for this compilation unit
(see Section \refersec{chap:macroinformation}).
least one child entry, an
entry representing the type of exception accepted by
that catch \livelink{chap:catchblock}{block}.
-This child entry has one of the tags
+
+This child entry has one of the
+\addtoindexx{unspecified parameters entry!in catch block}
+tags
\livelink{chap:DWTAGformalparameter}{DW\-\_TAG\-\_formal\-\_parameter} or \livelink{chap:DWTAGunspecifiedparameters}{DW\-\_TAG\-\_unspecified\-\_parameters},
and will have the same form as other parameter entries.
numbers are in use for each section.
There are sections with no version number encoded in them;
-they are only accessed via the .debug\_info and .debug\_types
+they are only accessed via the
+\addtoindex{.debug\_info} and
+\addtoindex{.debug\_types}
sections and so an incompatible change in those sections'
-format would be represented by a change in the .debug\_info
-and .debug\_types section version number.
+format would be represented by a change in the
+and \addtoindex{.debug\_types} section version number.
\clearpage
\begin{centering}
\endfoot
\hline
\endlastfoot
-.debug\_abbrev& - & - & - \\
-.debug\_aranges&2&2&2 \\
-.debug\_frame&1&3&4 \\
-.debug\_info&2&3&4 \\
-.debug\_line&2&3&4 \\
-.debug\_loc& - & - & - \\
-.debug\_macinfo& - & - & - \\
-.debug\_pubnames&2&2&2 \\
-.debug\_pubtypes&x&2&2 \\
-.debug\_ranges&x& - & - \\
-.debug\_str& - & - & - \\
-.debug\_types&x&x&4 \\
+\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 \\
\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 .debug\_info and .debug\_types
+\item The version numbers for the \addtoindex{.debug\_info} and \addtoindex{.debug\_types}
sections must be the same.
\end{itemize}
-\textit{For .debug\_frame, section version 2 is unused.}
+\textit{For \addtoindex{.debug\_frame}, section version 2 is unused.}
Higher numbers are reserved for future use.
\section{Unspecified Type Entries}
\label{chap:unspecifiedtypeentries}
-Some languages have constructs in which a type may be left unspecified or the absence of a type
+Some languages have constructs in which a type
+may be left unspecified or the absence of a type
+\addtoindex{unspecified type entry}
may be explicitly indicated.
An unspecified (implicit, unknown, ambiguous or nonexistent)
the formal parameter.
\item The unspecified parameters of a variable parameter list
-are represented by a debugging information entry with the
+\addtoindexx{unspecified parameters entry}
+are
+\addtoindexx{... parameters|see{unspecified parameters entry}}
+represented by a debugging information entry with the
tag \livelink{chap:DWTAGunspecifiedparameters}{DW\-\_TAG\-\_unspecified\-\_parameters}.
\end{enumerate}