1 \chapter{Data Representation}
2 \label{datarep:datarepresentation}
4 This section describes the binary representation of the
5 debugging information entry itself, of the attribute types
6 and of other fundamental elements described above.
8 \section{Vendor Extensibility}
9 \label{datarep:vendorextensibility}
10 \addtoindexx{vendor extensibility}
11 \addtoindexx{vendor specific extensions|see{vendor extensibility}}
14 \addtoindexx{extensibility|see{vendor extensibility}}
15 reserve a portion of the DWARF name space and ranges of
16 enumeration values for use for vendor specific extensions,
17 special labels are reserved for tag names, attribute names,
18 base type encodings, location operations, language names,
19 calling conventions and call frame instructions.
21 The labels denoting the beginning and end of the
22 \hypertarget{chap:DWXXXlohiuser}{reserved value range}
23 for vendor specific extensions consist of the
25 (\DWATlouserMARK{}\DWAThiuserMARK{}DW\_AT,
26 \DWATElouserMARK{}\DWATEhiuserMARK{}DW\_ATE,
27 \DWCClouserMARK{}\DWCChiuserMARK{}DW\_CC,
28 \DWCFAlouserMARK{}\DWCFAhiuserMARK{}DW\_CFA,
29 \DWENDlouserMARK{}\DWENDhiuserMARK{}DW\_END,
30 \DWIDXlouserMARK{}\DWIDXhiuserMARK{}DW\_IDX,
31 \DWLANGlouserMARK{}\DWLANGhiuserMARK{}DW\_LANG,
32 \DWLNCTlouserMARK{}\DWLNCThiuserMARK{}DW\_LNCT,
33 \DWLNElouserMARK{}\DWLNEhiuserMARK{}DW\_LNE,
34 \DWMACROlouserMARK{}\DWMACROhiuserMARK{}DW\_MACRO,
36 \DWOPlouserMARK{}\DWOPhiuserMARK{}DW\_OP,
37 \DWTAGlouserMARK{}\DWTAGhiuserMARK{}DW\_TAG,
38 \DWUTlouserMARK{}\DWUThiuserMARK{}DW\_UT)
40 followed by \_lo\_user or \_hi\_user.
41 Values in the range between \textit{prefix}\_lo\_user
42 and \textit{prefix}\_hi\_user inclusive,
43 are reserved for vendor specific extensions. Vendors may
44 use values in this range without conflicting with current or
45 future system\dash defined values. All other values are reserved
46 for use by the system.
48 \textit{For example, for debugging information entry
49 tags, the special labels are \DWTAGlouserNAME{} and \DWTAGhiuserNAME.}
51 \textit{There may also be codes for vendor specific extensions
52 between the number of standard line number opcodes and
53 the first special line number opcode. However, since the
54 number of standard opcodes varies with the DWARF version,
55 the range for extensions is also version dependent. Thus,
56 \DWLNSlouserTARG{} and
57 \DWLNShiuserTARG{} symbols are not defined.}
59 Vendor defined tags, attributes, base type encodings, location
60 atoms, language names, line number actions, calling conventions
61 and call frame instructions, conventionally use the form
62 \text{prefix\_vendor\_id\_name}, where
63 \textit{vendor\_id}\addtoindexx{vendor id} is some identifying
64 character sequence chosen so as to avoid conflicts with
67 To ensure that extensions added by one vendor may be safely
68 ignored by consumers that do not understand those extensions,
69 the following rules must be followed:
70 \begin{enumerate}[1. ]
72 \item New attributes are added in such a way that a
73 debugger may recognize the format of a new attribute value
74 without knowing the content of that attribute value.
76 \item The semantics of any new attributes do not alter
77 the semantics of previously existing attributes.
79 \item The semantics of any new tags do not conflict with
80 the semantics of previously existing tags.
82 \item New forms of attribute value are not added.
87 \section{Reserved Values}
88 \label{datarep:reservedvalues}
89 \subsection{Error Values}
90 \label{datarep:errorvalues}
91 \addtoindexx{reserved values!error}
94 \addtoindexx{error value}
95 a convenience for consumers of DWARF information, the value
96 0 is reserved in the encodings for attribute names, attribute
97 forms, base type encodings, location operations, languages,
98 line number program opcodes, macro information entries and tag
99 names to represent an error condition or unknown value. DWARF
100 does not specify names for these reserved values, because they
101 do not represent valid encodings for the given type and do
102 not appear in DWARF debugging information.
105 \subsection{Initial Length Values}
106 \label{datarep:initiallengthvalues}
107 \addtoindexx{reserved values!initial length}
109 An \livetarg{datarep:initiallengthvalues}{initial length} field
110 \addtoindexx{initial length field|see{initial length}}
111 is one of the fields that occur at the beginning
112 of those DWARF sections that have a header
120 that occurs at the beginning of the CIE and FDE structures
121 in the \dotdebugframe{} section.
124 In an \addtoindex{initial length} field, the values \wfffffffzero through
125 \wffffffff are reserved by DWARF to indicate some form of
126 extension relative to \DWARFVersionII; such values must not
127 be interpreted as a length field. The use of one such value,
128 \xffffffff, is defined in
129 Section \refersec{datarep:32bitand64bitdwarfformats});
131 the other values is reserved for possible future extensions.
134 \section{Relocatable, Split, Executable, Shared, Package and Supplementary Object Files}
135 \label{datarep:executableobjectsandsharedobjects}
137 \subsection{Relocatable Object Files}
138 \label{datarep:relocatableobjectfiles}
139 A DWARF producer (for example, a compiler) typically generates its
140 debugging information as part of a relocatable object file.
141 Relocatable object files are then combined by a linker to form an
142 executable file. During the linking process, the linker resolves
143 (binds) symbolic references between the various object files, and
144 relocates the contents of each object file into a combined virtual
147 The DWARF debugging information is placed in several sections (see
148 Appendix \refersec{app:debugsectionrelationshipsinformative}), and
149 requires an object file format capable of
150 representing these separate sections. There are symbolic references
151 between these sections, and also between the debugging information
152 sections and the other sections that contain the text and data of the
153 program itself. Many of these references require relocation, and the
154 producer must emit the relocation information appropriate to the
155 object file format and the target processor architecture. These
156 references include the following:
159 \item The compilation unit header (see Section
160 \refersec{datarep:unitheaders}) in the \dotdebuginfo{}
161 section contains a reference to the \dotdebugabbrev{} table. This
162 reference requires a relocation so that after linking, it refers to
163 that contribution to the combined \dotdebugabbrev{} section in the
166 \item Debugging information entries may have attributes with the form
167 \DWFORMaddr{} (see Section \refersec{datarep:attributeencodings}).
168 These attributes represent locations
169 within the virtual address space of the program, and require
172 \item A DWARF expression may contain a \DWOPaddr{} (see Section
173 \refersec{chap:literalencodings}) which contains a location within
174 the virtual address space of the program, and require relocation.
177 \item Debugging information entries may have attributes with the form
178 \DWFORMsecoffset{} (see Section \refersec{datarep:attributeencodings}).
179 These attributes refer to
180 debugging information in other debugging information sections within
181 the object file, and must be relocated during the linking process.
183 \item Debugging information entries may have attributes with the form
184 \DWFORMrefaddr{} (see Section \refersec{datarep:attributeencodings}).
185 These attributes refer to
186 debugging information entries that may be outside the current
187 compilation unit. These values require both symbolic binding and
190 \item Debugging information entries may have attributes with the form
191 \DWFORMstrp{} (see Section \refersec{datarep:attributeencodings}).
192 These attributes refer to strings in
193 the \dotdebugstr{} section. These values require relocation.
195 \item Entries in the \dotdebugaddr{} and \dotdebugaranges{}
196 sections may contain references to locations within the virtual address
197 space of the program, and thus require relocation.
199 \item Entries in the \dotdebugloclists{} and \dotdebugrnglists{} sections may
200 contain references to locations within the virtual address space of the
201 program depending on whether certain kinds of location or range
202 list entries are used, and thus require relocation.
204 \item In the \dotdebugline{} section, the operand of the \DWLNEsetaddress{}
205 opcode is a reference to a location within the virtual address space
206 of the program, and requires relocation.
208 \item The \dotdebugstroffsets{} section contains a list of string offsets,
209 each of which is an offset of a string in the \dotdebugstr{} section. Each
210 of these offsets requires relocation. Depending on the implementation,
211 these relocations may be implicit (that is, the producer may not need to
212 emit any explicit relocation information for these offsets).
214 \item The \HFNdebuginfooffset{} field in the \dotdebugaranges{} header and
215 the list of compilation units following the \dotdebugnames{} header contain
216 references to the \dotdebuginfo{} section. These references require relocation
217 so that after linking they refer to the correct contribution in the combined
218 \dotdebuginfo{} section in the executable file.
220 \item Frame descriptor entries in the \dotdebugframe{} section
221 (see Section \refersec{chap:structureofcallframeinformation}) contain an
222 \HFNinitiallocation{} field value within the virtual address
223 space of the program and require relocation.
228 \textit{Note that operands of classes
230 \CLASSflag{} do not require relocation. Attribute operands that use
231 forms \DWFORMstring{},
232 \DWFORMrefone, \DWFORMreftwo, \DWFORMreffour, \DWFORMrefeight, or
233 \DWFORMrefudata{} also do not need relocation.}
235 \subsection{Split DWARF Object Files}
236 \label{datarep:splitdwarfobjectfiles}
237 \addtoindexx{split DWARF object file}
238 A DWARF producer may partition the debugging
239 information such that the majority of the debugging
240 information can remain in individual object files without
241 being processed by the linker.
243 \textit{This reduces link time by reducing the amount of information
244 the linker must process.}
247 \subsubsection{First Partition (with Skeleton Unit)}
248 The first partition contains
249 debugging information that must still be processed by the linker,
250 and includes the following:
253 The line number tables, frame tables, and
254 accelerated access tables, in the usual sections:
255 \dotdebugline, \dotdebuglinestr,
256 \dotdebugframe, \dotdebugnames{} and \dotdebugaranges,
260 An address table, in the \dotdebugaddr{} section. This table
261 contains all addresses and constants that require
262 link-time relocation, and items in the table can be
263 referenced indirectly from the debugging information via
264 the \DWFORMaddrxXNand{} forms,
265 by the \DWOPaddrx{} and \DWOPconstx{} operators, and
266 by certain of the \texttt{DW\_LLE\_*} location list
267 and \texttt{DW\_RLE\_*} range list entries.
269 A skeleton compilation unit, as described in Section
270 \refersec{chap:skeletoncompilationunitentries},
271 in the \dotdebuginfo{} section.
273 An abbreviations table for the skeleton compilation unit,
274 in the \dotdebugabbrev{} section
275 used by the \dotdebuginfo{} section.
278 A string table, in the \dotdebugstr{} section. The string
279 table is necessary only if the skeleton compilation unit
281 uses one of the indirect string forms (\DWFORMstrp{},
286 A string offsets table, in the \dotdebugstroffsets{}
287 section for strings in the \dotdebugstr{} section.
288 The string offsets table is necessary only if
289 the skeleton compilation unit uses
291 one of the indexed string forms
295 The attributes contained in the skeleton compilation
296 unit can be used by a DWARF consumer to find the
297 DWARF object file that contains the second partition.
299 \subsubsection{Second Partition (Unlinked or in a \texttt{.dwo} File)}
300 The second partition contains the debugging information that
301 does not need to be processed by the linker. These sections
302 may be left in the object files and ignored by the linker
303 (that is, not combined and copied to the executable object file), or
304 they may be placed by the producer in a separate DWARF object
305 file. This partition includes the following:
308 The full compilation unit, in the \dotdebuginfodwo{} section.
310 Attributes contained in the full compilation unit
311 may refer to machine addresses indirectly using
316 forms, which access the table of addresses specified by the
317 \DWATaddrbase{} attribute in the associated skeleton unit.
318 Location descriptions may similarly do so using the \DWOPaddrx{} and
319 \DWOPconstx{} operations.
321 \item Separate type units, in the \dotdebuginfodwo{} section.
324 Abbreviations table(s) for the compilation unit and type
325 units, in the \dotdebugabbrevdwo{} section
326 used by the \dotdebuginfodwo{} section.
328 \item Location lists, in the
329 \dotdebugloclistsdwo{} section.
331 \item Range lists, in the \dotdebugrnglistsdwo{} section.
334 A \addtoindex{specialized line number table} (for the type units),
335 in the \dotdebuglinedwo{} section.
338 contains only the directory and filename lists needed to
339 interpret \DWATdeclfile{} attributes in the debugging
342 \item Macro information, in the \dotdebugmacrodwo{} section.
344 \item A string table, in the \dotdebugstrdwo{} section.
346 \item A string offsets table, in the \dotdebugstroffsetsdwo{}
348 for the strings in the \dotdebugstrdwo{} section.
351 Except where noted otherwise, all references in this document
352 to a debugging information section (for example, \dotdebuginfo),
353 apply also to the corresponding split DWARF section (for example,
357 Split DWARF object files do not get linked with any other files,
358 therefore references between sections must not make use of
359 normal object file relocation information. As a result, symbolic
360 references within or between sections are not possible.
362 \subsection{Executable Objects}
363 \label{chap:executableobjects}
364 The relocated addresses in the debugging information for an
365 executable object are virtual addresses.
367 The sections containing the debugging information are typically
368 not loaded as part of the memory image of the program (in ELF
369 terminology, the sections are not "allocatable" and are not part
370 of a loadable segment). Therefore, the debugging information
371 sections described in this document are typically linked as if
372 they were each to be loaded at virtual address 0, and references
373 within the debugging information always implicitly indicate which
374 section a particular offset refers to. (For example, a reference
375 of form \DWFORMsecoffset{} may refer to one of several sections,
376 depending on the class allowed by a particular attribute of a
377 debugging information entry, as shown in
378 Table \refersec{tab:attributeencodings}.)
381 \subsection{Shared Object Files}
382 \label{datarep:sharedobjectfiles}
384 addresses in the debugging information for a shared object file
385 are offsets relative to the start of the lowest region of
386 memory loaded from that shared object file.
389 \textit{This requirement makes the debugging information for
390 shared object files position independent. Virtual addresses in a
391 shared object file may be calculated by adding the offset to the
392 base address at which the object file was attached. This offset
393 is available in the run\dash time linker\textquoteright s data structures.}
395 As with executable objects, the sections containing debugging
396 information are typically not loaded as part of the memory image
397 of the shared object, and are typically linked as if they were
398 each to be loaded at virtual address 0.
400 \subsection{DWARF Package Files}
401 \label{datarep:dwarfpackagefiles}
402 \textit{Using \splitDWARFobjectfile{s} allows the developer to compile,
403 link, and debug an application quickly with less link-time overhead,
404 but a more convenient format is needed for saving the debug
405 information for later debugging of a deployed application. A
406 DWARF package file can be used to collect the debugging
407 information from the object (or separate DWARF object) files
408 produced during the compilation of an application.}
410 \textit{The package file is typically placed in the same directory as the
411 application, and is given the same name with a \doublequote{\texttt{.dwp}}
412 extension.\addtoindexx{\texttt{.dwp} file extension}}
415 A DWARF package file is itself an object file, using the
416 \addtoindexx{package files}
417 \addtoindexx{DWARF package files}
418 same object file format (including \byteorder) as the
419 corresponding application binary. It consists only of a file
420 header, a section table, a number of DWARF debug information
421 sections, and two index sections.
424 Each DWARF package file contains no more than one of each of the
425 following sections, copied from a set of object or DWARF object
426 files, and combined, section by section:
433 \dotdebugstroffsetsdwo
438 The string table section in \dotdebugstrdwo{} contains all the
439 strings referenced from DWARF attributes using
443 \DWFORMstrxXNor. Any attribute in a compilation unit or a type
444 unit using this form refers to an entry in that unit's
445 contribution to the \dotdebugstroffsetsdwo{} section, which in turn
446 provides the offset of a string in the \dotdebugstrdwo{}
449 The DWARF package file also contains two index sections that
450 provide a fast way to locate debug information by compilation
451 unit ID for compilation units, or by type
452 signature for type units:
458 \subsubsection{The Compilation Unit (CU) Index Section}
459 The \dotdebugcuindex{} section is a hashed lookup table that maps a
460 compilation unit ID to a set of contributions in the
461 various debug information sections. Each contribution is stored
462 as an offset within its corresponding section and a size.
465 Each \compunitset{} may contain contributions from the
468 \dotdebuginfodwo{} (required)
469 \dotdebugabbrevdwo{} (required)
473 \dotdebugstroffsetsdwo
477 \textit{Note that a \compunitset{} is not able to represent \dotdebugmacinfo{}
478 information from \DWARFVersionIV{} or earlier formats.}
480 \subsubsection{The Type Unit (TU) Index Section}
481 The \dotdebugtuindex{} section is a hashed lookup table that maps a
482 type signature to a set of offsets in the various debug
483 information sections. Each contribution is stored as an offset
484 within its corresponding section and a size.
486 Each \typeunitset{} may contain contributions from the following
489 \dotdebuginfodwo{} (required)
490 \dotdebugabbrevdwo{} (required)
492 \dotdebugstroffsetsdwo
495 \subsubsection{Format of the CU and TU Index Sections}
496 Both index sections have the same format, and serve to map an
497 8-byte signature to a set of contributions to the debug sections.
498 Each index section begins with a header, followed by a hash table of
499 signatures, a parallel table of indexes, a table of offsets, and
500 a table of sizes. The index sections are aligned at 8-byte
501 boundaries in the DWARF package file.
504 The index section header contains the following fields:
505 \begin{enumerate}[1. ]
506 \item \texttt{version} (\HFTuhalf) \\
508 \addtoindexx{version number!CU index information}
509 \addtoindexx{version number!TU index information}
510 This number is specific to the CU and TU index information
511 and is independent of the DWARF version number.
513 The version number is \versiondotdebugcuindex.
515 \item \textit{padding} (\HFTuhalf) \\
516 Reserved to DWARF (must be zero).
519 \item \texttt{section\_count} (\HFTuword) \\
520 The number of entries in the table of section counts that follows.
521 For brevity, the contents of this field is referred to as $N$ below.
523 \item \texttt{unit\_count} (\HFTuword) \\
524 The number of compilation units or type units in the index.
525 For brevity, the contents of this field is referred to as $U$ below.
527 \item \texttt{slot\_count} (\HFTuword) \\
528 The number of slots in the hash table.
529 For brevity, the contents of this field is referred to as $S$ below.
533 \textit{We assume that $U$ and $S$ do not exceed $2^{32}$.}
535 The size of the hash table, $S$, must be $2^k$ such that:
536 \hspace{0.3cm}$2^k\ \ >\ \ 3*U/2$
538 The hash table begins at offset 16 in the section, and consists
539 of an array of $S$ 8-byte slots. Each slot contains a 64-bit
541 % (using the \byteorder{} of the application binary).
543 The parallel table of indices begins immediately after the hash table
544 (at offset \mbox{$16 + 8 * S$} from the beginning of the section), and
545 consists of an array of $S$ 4-byte slots,
546 % (using the byte order of the application binary),
547 corresponding 1-1 with slots in the hash
548 table. Each entry in the parallel table contains a row index into
549 the tables of offsets and sizes.
551 Unused slots in the hash table have 0 in both the hash table
552 entry and the parallel table entry. While 0 is a valid hash
553 value, the row index in a used slot will always be non-zero.
555 Given an 8-byte compilation unit ID or type signature $X$,
556 an entry in the hash table is located as follows:
557 \begin{enumerate}[1. ]
558 \item Define $REP(X)$ to be the value of $X$ interpreted as an
559 unsigned 64-bit integer in the target byte order.
560 \item Calculate a primary hash $H = REP(X)\ \&\ MASK(k)$, where
561 $MASK(k)$ is a mask with the low-order $k$ bits all set to 1.
562 \item Calculate a secondary hash $H' = (((REP(X)>>32)\ \&\ MASK(k))\ |\ 1)$.
563 \item If the hash table entry at index $H$ matches the signature, use
564 that entry. If the hash table entry at index $H$ is unused (all
565 zeroes), terminate the search: the signature is not present
567 \item Let $H = (H + H')\ modulo\ S$. Repeat at Step 4.
570 Because $S > U$, and $H'$ and $S$ are relatively prime, the search is
571 guaranteed to stop at an unused slot or find the match.
574 The table of offsets begins immediately following the parallel
575 table (at offset \mbox{$16 + 12 * S$} from the beginning of the section).
576 This table consists of a single header row containing $N$ fields,
577 each a 4-byte unsigned integer, followed by $U$ data rows, each
578 also containing $N$ fields of 4-byte unsigned integers. The fields
579 in the header row provide a section identifier referring to a
580 debug section; the available section identifiers are shown in
581 Table \referfol{tab:dwarfpackagefilesectionidentifierencodings}.
582 Each data row corresponds to a specific CU
583 or TU in the package file. In the data rows, each field provides
584 an offset to the debug section whose identifier appears in the
585 corresponding field of the header row. The data rows are indexed
588 \textit{Not all sections listed in the table need be included.}
592 \setlength{\extrarowheight}{0.1cm}
593 \begin{longtable}{l|c|l}
594 \caption{DWARF package file section identifier \mbox{encodings}}
595 \label{tab:dwarfpackagefilesectionidentifierencodings}
596 \addtoindexx{DWARF package files!section identifier encodings} \\
597 \hline \bfseries Section identifier &\bfseries Value &\bfseries Section \\ \hline
599 \bfseries Section identifier &\bfseries Value &\bfseries Section\\ \hline
601 \hline \emph{Continued on next page}
605 \DWSECTINFOTARG & 1 & \dotdebuginfodwo \\
606 \textit{Reserved} & 2 & \\
607 \DWSECTABBREVTARG & 3 & \dotdebugabbrevdwo \\
608 \DWSECTLINETARG & 4 & \dotdebuglinedwo \\
609 \DWSECTLOCLISTSTARG & 5 & \dotdebugloclistsdwo \\
610 \DWSECTSTROFFSETSTARG & 6 & \dotdebugstroffsetsdwo \\
611 \DWSECTMACROTARG & 7 & \dotdebugmacrodwo \\
612 \DWSECTRNGLISTSTARG & 8 & \dotdebugrnglistsdwo \\
616 The offsets provided by the CU and TU index sections are the
617 base offsets for the contributions made by each CU or TU to the
618 corresponding section in the package file. Each CU and TU header
619 contains a \HFNdebugabbrevoffset{} field, used to find the abbreviations
620 table for that CU or TU within the contribution to the
621 \dotdebugabbrevdwo{} section for that CU or TU, and are
622 interpreted as relative to the base offset given in the index
623 section. Likewise, offsets into \dotdebuglinedwo{} from
624 \DWATstmtlist{} attributes are interpreted as relative to
625 the base offset for \dotdebuglinedwo{}, and offsets into other debug
626 sections obtained from DWARF attributes are also
627 interpreted as relative to the corresponding base offset.
629 The table of sizes begins immediately following the table of
630 offsets, and provides the sizes of the contributions made by each
631 CU or TU to the corresponding section in the package file.
632 This table consists of U data rows, each with N fields of 4-byte
633 unsigned integers. Each data row corresponds to the same CU or TU
634 as the corresponding data row in the table of offsets described
635 above. Within each data row, the N fields also correspond
636 one-to-one with the fields in the corresponding data row of the
637 table of offsets. Each field provides the size of the
638 contribution made by a CU or TU to the corresponding section in
641 For an example, see Figure \refersec{fig:examplecuindexsection}.
643 \subsection{DWARF Supplementary Object Files}
644 \label{datarep:dwarfsupplemetaryobjectfiles}
645 \textit{A supplementary object file permits a post-link utility to analyze executable and
646 shared object files and collect duplicate debugging information into a single file that
647 can be referenced by each of the original files. This is in contrast to split DWARF
648 object files, which allow the compiler to split the debugging information between
649 multiple files in order to reduce link time and executable size.}
652 A DWARF \addtoindex{supplementary object file} is itself an object file,
653 using the same object
654 file format, \byteorder{}, and size as the corresponding application executables
655 or shared libraries. It consists only of a file header, section table, and
656 a number of DWARF debug information sections. Both the
657 \addtoindex{supplementary object file}
658 and all the executable or shared object files that reference entries or strings in that
659 file must contain a \dotdebugsup{} section that establishes the relationship.
661 The \dotdebugsup{} section contains:
662 \begin{enumerate}[1. ]
663 \item \texttt{version} (\HFTuhalf) \\
664 \addttindexx{version}
665 A 2-byte unsigned integer representing the version of the DWARF
666 information for the compilation unit.
668 The value in this field is \versiondotdebugsup.
670 \item \texttt{is\_supplementary} (\HFTubyte) \\
671 \addttindexx{is\_supplementary}
672 A 1-byte unsigned integer, which contains the value 1 if it is
673 in the \addtoindex{supplementary object file} that other executable or
674 shared object files refer to, or 0 if it is an executable or shared object
675 referring to a \addtoindex{supplementary object file}.
678 \item \texttt{sup\_filename} (null terminated filename string) \\
679 \addttindexx{sup\_filename}
680 If \addttindex{is\_supplementary} is 0, this contains either an absolute
681 filename for the \addtoindex{supplementary object file}, or a filename
682 relative to the object file containing the \dotdebugsup{} section.
683 If \addttindex{is\_supplementary} is 1, then \addttindex{sup\_filename}
684 is not needed and must be an empty string (a single null byte).
687 \item \texttt{sup\_checksum\_len} (unsigned LEB128) \\
688 \addttindexx{sup\_checksum\_len}
689 Length of the following \addttindex{sup\_checksum} field;
690 this value can be 0 if no checksum is provided.
692 \item \texttt{sup\_checksum} (array of \HFTubyte) \\
693 \addttindexx{sup\_checksum}
694 An implementation-defined integer constant value that
695 provides unique identification of the supplementary file.
699 Debug information entries that refer to an executable's or shared
700 object's addresses must \emph{not} be moved to supplementary files
701 (the addesses will likely not be the same). Similarly,
702 entries referenced from within location descriptions or using loclistsptr
703 form attributes must not be moved to a \addtoindex{supplementary object file}.
705 Executable or shared object file compilation units can use
706 \DWTAGimportedunit{} with
708 an \DWATimport{} attribute that uses \DWFORMrefsupfour{} or \DWFORMrefsupeight{}
710 to import entries from the \addtoindex{supplementary object file}, other
712 \DWFORMrefsupfour{} or \DWFORMrefsupeight{}
714 attributes to refer to them and \DWFORMstrpsup{} form attributes to
715 refer to strings that are used by debug information of multiple
716 executables or shared object files. Within the \addtoindex{supplementary object file}'s
717 debugging sections, form
719 \DWFORMrefsupfour{}, \DWFORMrefsupeight{}
721 or \DWFORMstrpsup{} are
722 not used, and all reference forms referring to some other sections
723 refer to the local sections in the \addtoindex{supplementary object file}.
725 In macro information, \DWMACROdefinesup{} or
726 \DWMACROundefsup{} opcodes can refer to strings in the
727 \dotdebugstr{} section of the \addtoindex{supplementary object file},
728 or \DWMACROimportsup{}
729 can refer to \dotdebugmacro{} section entries. Within the
730 \dotdebugmacro{} section of a \addtoindex{supplementary object file},
731 \DWMACROdefinestrp{} and \DWMACROundefstrp{}
732 opcodes refer to the local \dotdebugstr{} section in that
733 supplementary file, not the one in
734 the executable or shared object file.
738 \section{32-Bit and 64-Bit DWARF Formats}
739 \label{datarep:32bitand64bitdwarfformats}
740 \hypertarget{datarep:xxbitdwffmt}{}
741 \addtoindexx{32-bit DWARF format}
742 \addtoindexx{64-bit DWARF format}
743 There are two closely-related DWARF
744 formats. In the 32-bit DWARF
745 format, all values that represent lengths of DWARF sections
746 and offsets relative to the beginning of DWARF sections are
747 represented using four bytes. In the 64-bit DWARF format, all
748 values that represent lengths of DWARF sections and offsets
749 relative to the beginning of DWARF sections are represented
750 using eight bytes. A special convention applies to the initial
751 length field of certain DWARF sections, as well as the CIE and
752 FDE structures, so that the 32-bit and 64-bit DWARF formats
753 can coexist and be distinguished within a single linked object.
755 Except where noted otherwise, all references in this document
756 to a debugging information section (for example, \dotdebuginfo),
757 apply also to the corresponding split DWARF section (for example,
760 The differences between the 32- and 64-bit DWARF formats are
761 detailed in the following:
762 \begin{enumerate}[1. ]
764 \item In the 32-bit DWARF format, an
765 \addtoindex{initial length} field (see
766 \addtoindexx{initial length!encoding}
767 Section \ref{datarep:initiallengthvalues} on page \pageref{datarep:initiallengthvalues})
768 is an unsigned 4-byte integer (which
769 must be less than \xfffffffzero); in the 64-bit DWARF format,
770 an \addtoindex{initial length} field is 12 bytes in size,
773 \item The first four bytes have the value \xffffffff.
775 \item The following eight bytes contain the actual length
776 represented as an unsigned 8-byte integer.
779 \textit{This representation allows a DWARF consumer to dynamically
780 detect that a DWARF section contribution is using the 64-bit
781 format and to adapt its processing accordingly.}
784 \item \hypertarget{datarep:sectionoffsetlength}{}
785 Section offset and section length
786 \addtoindexx{section length!use in headers}
788 \addtoindexx{section offset!use in headers}
789 in the headers of DWARF sections (other than initial length
790 \addtoindexx{initial length}
791 fields) are listed following. In the 32-bit DWARF format these
792 are 4-byte unsigned integer values; in the 64-bit DWARF format,
793 they are 8-byte unsigned integer values.
795 \begin{nolinenumbersenv}
798 Section &Name & Role \\ \hline
799 \dotdebugaranges{} & \addttindex{debug\_info\_offset} & offset in \dotdebuginfo{} \\
800 \dotdebugframe{}/CIE & \addttindex{CIE\_id} & CIE distinguished value \\
801 \dotdebugframe{}/FDE & \addttindex{CIE\_pointer} & offset in \dotdebugframe{} \\
802 \dotdebuginfo{} & \addttindex{debug\_abbrev\_offset} & offset in \dotdebugabbrev{} \\
803 \dotdebugline{} & \addttindex{header\_length} & length of header itself \\
804 \dotdebugnames{} & entry in array of CUs & offset in \dotdebuginfo{} \\
808 \end{nolinenumbersenv}
811 The \texttt{CIE\_id} field in a CIE structure must be 64 bits because
812 it overlays the \texttt{CIE\_pointer} in a FDE structure; this implicit
813 union must be accessed to distinguish whether a CIE or FDE is
814 present, consequently, these two fields must exactly overlay
815 each other (both offset and size).
817 \item Within the body of the \dotdebuginfo{}
818 section, certain forms of attribute value depend on the choice
819 of DWARF format as follows. For the 32-bit DWARF format,
820 the value is a 4-byte unsigned integer; for the 64-bit DWARF
821 format, the value is an 8-byte unsigned integer.
824 \begin{nolinenumbersenv}
825 \begin{tabular}{lp{6cm}}
826 Form & Role \\ \hline
827 \DWFORMlinestrp & offset in \dotdebuglinestr \\
828 \DWFORMrefaddr & offset in \dotdebuginfo{} \\
830 \DWFORMsecoffset & offset in a section other than \\
831 & \dotdebuginfo{} or \dotdebugstr{} \\
832 \DWFORMstrp & offset in \dotdebugstr{} \\
833 \DWFORMstrpsup & offset in \dotdebugstr{} section of a \mbox{supplementary} object file \\
834 \DWOPcallref & offset in \dotdebuginfo{} \\
836 \end{nolinenumbersenv}
840 \item Within the body of the \dotdebugline{} section, certain forms of content
841 description depend on the choice of DWARF format as follows: for the
842 32-bit DWARF format, the value is a 4-byte unsigned integer; for the
843 64-bit DWARF format, the value is a 8-byte unsigned integer.
846 \begin{nolinenumbersenv}
847 \begin{tabular}{lp{6cm}}
848 Form & Role \\ \hline
849 \DWFORMlinestrp & offset in \dotdebuglinestr
851 \end{nolinenumbersenv}
854 \item Within the body of the \dotdebugnames{}
855 sections, the representation of each entry in the array of
856 compilation units (CUs) and the array of local type units
857 (TUs), which represents an offset in the
859 section, depends on the DWARF format as follows: in the
860 32-bit DWARF format, each entry is a 4-byte unsigned integer;
861 in the 64-bit DWARF format, it is a 8-byte unsigned integer.
864 \item In the body of the \dotdebugstroffsets{}
865 sections, the size of entries in the body depend on the DWARF
866 format as follows: in the 32-bit DWARF format, entries are 4-byte
867 unsigned integer values; in the 64-bit DWARF format, they are
868 8-byte unsigned integers.
870 %\bbpareb-delete bullet 7
872 \item In the body of the \dotdebugloclists{} and \dotdebugrnglists{}
873 sections, the offsets the follow the header depend on the
874 DWARF format as follows: in the 32-bit DWARF format, offsets are 4-byte
875 unsigned integer values; in the 64-bit DWARF format, they are
876 8-byte unsigned integers.
881 The 32-bit and 64-bit DWARF format conventions must \emph{not} be
882 intermixed within a single compilation unit.
884 \textit{Attribute values and section header fields that represent
885 addresses in the target program are not affected by these
889 A DWARF consumer that supports the 64-bit DWARF format must
890 support executables in which some compilation units use the
891 32-bit format and others use the 64-bit format provided that
892 the combination links correctly (that is, provided that there
893 are no link\dash time errors due to truncation or overflow). (An
894 implementation is not required to guarantee detection and
895 reporting of all such errors.)
897 \textit{It is expected that DWARF producing compilers will \emph{not} use
898 the 64-bit format \emph{by default}. In most cases, the division of
899 even very large applications into a number of executable and
900 shared object files will suffice to assure that the DWARF sections
901 within each individual linked object are less than 4 GBytes
902 in size. However, for those cases where needed, the 64-bit
903 format allows the unusual case to be handled as well. Even
904 in this case, it is expected that only application supplied
905 objects will need to be compiled using the 64-bit format;
906 separate 32-bit format versions of system supplied shared
907 executable libraries can still be used.}
910 \section{Format of Debugging Information}
911 \label{datarep:formatofdebugginginformation}
913 For each compilation unit compiled with a DWARF producer,
914 a contribution is made to the \dotdebuginfo{} section of
915 the object file. Each such contribution consists of a
916 compilation unit header
917 (see Section \refersec{datarep:compilationunitheader})
919 single \DWTAGcompileunit{} or
920 \DWTAGpartialunit{} debugging
921 information entry, together with its children.
923 For each type defined in a compilation unit, a separate
924 contribution may also be made to the
926 section of the object file. Each
927 such contribution consists of a
928 \addtoindex{type unit} header
929 (see Section \refersec{datarep:typeunitheaders})
930 followed by a \DWTAGtypeunit{} entry, together with
933 Each debugging information entry begins with a code that
934 represents an entry in a separate
935 \addtoindex{abbreviations table}. This
936 code is followed directly by a series of attribute values.
938 The appropriate entry in the
939 \addtoindex{abbreviations table} guides the
940 interpretation of the information contained directly in the
941 \dotdebuginfo{} section.
943 Multiple debugging information entries may share the same
944 abbreviation table entry. Each compilation unit is associated
945 with a particular abbreviation table, but multiple compilation
946 units may share the same table.
949 \subsection{Unit Headers}
950 \label{datarep:unitheaders}
951 Unit headers contain a field, \addttindex{unit\_type}, whose value indicates the kind of
954 (see Section \ref{chap:unitentries})
956 that follows. The encodings for the unit type
957 enumeration are shown in Table \refersec{tab:unitheaderunitkindencodings}.
961 \setlength{\extrarowheight}{0.1cm}
962 \begin{longtable}{l|c}
963 \caption{Unit header unit type encodings}
964 \label{tab:unitheaderunitkindencodings}
965 \addtoindexx{unit header unit type encodings} \\
966 \hline \bfseries Unit header unit type encodings&\bfseries Value \\ \hline
968 \bfseries Unit header unit type encodings&\bfseries Value \\ \hline
970 \hline \emph{Continued on next page}
972 \hline \ddag\ \textit{New in DWARF Version 5}
974 \DWUTcompileTARG~\ddag &0x01 \\
975 \DWUTtypeTARG~\ddag &0x02 \\
976 \DWUTpartialTARG~\ddag &0x03 \\
977 \DWUTskeletonTARG~\ddag &0x04 \\
978 \DWUTsplitcompileTARG~\ddag &0x05 \\
979 \DWUTsplittypeTARG~\ddag &0x06 \\
980 \DWUTlouserTARG~\ddag &0x80 \\
981 \DWUThiuserTARG~\ddag &\xff \\
987 All unit headers have the same initial three fields: \HFNinitiallength, \HFNversion{} and \HFNunittype.
992 \subsubsection{Full and Partial Compilation Unit Headers}
994 \label{datarep:compilationunitheader}
995 \begin{enumerate}[1. ]
997 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
998 \addttindexx{unit\_length}
1000 \addtoindexx{initial length}
1001 unsigned integer representing the length
1002 of the \dotdebuginfo{} contribution for that compilation unit,
1003 not including the length field itself. In the \thirtytwobitdwarfformat,
1004 this is a 4-byte unsigned integer (which must be less
1005 than \xfffffffzero); in the \sixtyfourbitdwarfformat, this consists
1006 of the 4-byte value \wffffffff followed by an 8-byte unsigned
1007 integer that gives the actual length
1008 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1010 \item \texttt{version} (\HFTuhalf) \\
1011 \addttindexx{version}
1012 \addtoindexx{version number!compilation unit}
1013 A 2-byte unsigned integer representing the version of the
1014 DWARF information for the compilation unit.
1016 The value in this field is \versiondotdebuginfo.
1018 \textit{See also Appendix \refersec{app:dwarfsectionversionnumbersinformative}
1019 for a summary of all version numbers that apply to DWARF sections.}
1022 \item \texttt{unit\_type} (\HFTubyte) \\
1023 \addttindexx{unit\_type}
1024 A 1-byte unsigned integer identifying this unit as a compilation unit.
1025 The value of this field is
1026 \DWUTcompile{} for a
1028 (non-split) full compilation unit or
1029 \DWUTpartial{} for a (non-split) partial compilation unit
1031 (see Section \refersec{chap:fullandpartialcompilationunitentries}).
1035 Section \ref{datarep:skeletonandfullcompilationunitheaders}
1036 regarding a split full compilation unit.
1039 \textit{This field is new in \DWARFVersionV.}
1042 \item \texttt{address\_size} (\HFTubyte) \\
1043 \addttindexx{address\_size}
1044 A 1-byte unsigned integer representing the size in bytes of
1045 an address on the target architecture. If the system uses
1046 \addtoindexx{address space!segmented}
1047 segmented addressing, this value represents the size of the
1048 offset portion of an address.
1050 \item \HFNdebugabbrevoffset{} (\livelink{datarep:sectionoffsetlength}{section offset}) \\
1052 \addtoindexx{section offset!in .debug\_info header}
1053 4-byte or 8-byte unsigned offset into the
1055 section. This offset associates the compilation unit with a
1056 particular set of debugging information entry abbreviations. In
1057 the \thirtytwobitdwarfformat, this is a 4-byte unsigned length;
1058 in the \sixtyfourbitdwarfformat, this is an 8-byte unsigned length
1059 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1065 \subsubsection{Skeleton and Split Compilation Unit Headers}
1066 \label{datarep:skeletonandfullcompilationunitheaders}
1067 \begin{enumerate}[1. ]
1069 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
1070 \addttindexx{unit\_length}
1072 \addtoindexx{initial length}
1073 unsigned integer representing the length
1074 of the \dotdebuginfo{}
1075 contribution for that compilation unit,
1076 not including the length field itself. In the \thirtytwobitdwarfformat,
1077 this is a 4-byte unsigned integer (which must be less
1078 than \xfffffffzero); in the \sixtyfourbitdwarfformat, this consists
1079 of the 4-byte value \wffffffff followed by an 8-byte unsigned
1080 integer that gives the actual length
1081 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1083 \item \texttt{version} (\HFTuhalf) \\
1084 \addttindexx{version}
1085 \addtoindexx{version number!compilation unit}
1086 A 2-byte unsigned integer representing the version of the
1087 DWARF information for the compilation unit.
1089 The value in this field is \versiondotdebuginfo.
1091 \textit{See also Appendix \refersec{app:dwarfsectionversionnumbersinformative}
1092 for a summary of all version numbers that apply to DWARF sections.}
1095 \item \texttt{unit\_type} (\HFTubyte) \\
1096 \addttindexx{unit\_type}
1097 A 1-byte unsigned integer identifying this unit as a compilation unit.
1098 The value of this field is
1099 \DWUTskeleton{} for a skeleton compilation unit or
1100 \DWUTsplitcompile{} for a split
1105 (see Section \refersec{chap:skeletoncompilationunitentries}).
1109 is no split analog to the partial compilation unit.
1112 \textit{This field is new in \DWARFVersionV.}
1115 \item \texttt{address\_size} (\HFTubyte) \\
1116 \addttindexx{address\_size}
1117 A 1-byte unsigned integer representing the size in bytes of
1118 an address on the target architecture. If the system uses
1119 \addtoindexx{address space!segmented}
1120 segmented addressing, this value represents the size of the
1121 offset portion of an address.
1123 \item \HFNdebugabbrevoffset{} (\livelink{datarep:sectionoffsetlength}{section offset}) \\
1125 \addtoindexx{section offset!in .debug\_info header}
1126 4-byte or 8-byte unsigned offset into the
1128 section. This offset associates the compilation unit with a
1129 particular set of debugging information entry abbreviations. In
1130 the \thirtytwobitdwarfformat, this is a 4-byte unsigned length;
1131 in the \sixtyfourbitdwarfformat, this is an 8-byte unsigned length
1132 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1135 \item \HFNdwoid{} (unit ID) \\
1136 An 8-byte implementation-defined integer constant value,
1137 known as the compilation unit ID, that provides
1138 unique identification of a skeleton compilation
1139 unit and its associated split compilation unit in
1140 the object file named in the \DWATdwoname{} attribute
1141 of the skeleton compilation.
1147 \subsubsection{Type Unit Headers}
1148 \label{datarep:typeunitheaders}
1149 The header for the series of debugging information entries
1150 contributing to the description of a type that has been
1151 placed in its own \addtoindex{type unit}, within the
1152 \dotdebuginfo{} section,
1153 consists of the following information:
1154 \begin{enumerate}[1. ]
1155 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
1156 \addttindexx{unit\_length}
1157 A 4-byte or 12-byte unsigned integer
1158 \addtoindexx{initial length}
1159 representing the length
1160 of the \dotdebuginfo{} contribution for that type unit,
1161 not including the length field itself. In the \thirtytwobitdwarfformat,
1162 this is a 4-byte unsigned integer (which must be
1163 less than \xfffffffzero); in the \sixtyfourbitdwarfformat, this
1164 consists of the 4-byte value \wffffffff followed by an
1165 8-byte unsigned integer that gives the actual length
1166 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1169 \item \texttt{version} (\HFTuhalf) \\
1170 \addttindexx{version}
1171 \addtoindexx{version number!type unit}
1172 A 2-byte unsigned integer representing the version of the
1173 DWARF information for the type unit.
1175 The value in this field is \versiondotdebuginfo.
1177 \item \texttt{unit\_type} (\HFTubyte) \\
1178 \addttindexx{unit\_type}
1179 A 1-byte unsigned integer identifying this unit as a type unit.
1180 The value of this field is \DWUTtype{} for a non-split type unit
1181 (see Section \refersec{chap:typeunitentries})
1182 or \DWUTsplittype{} for a split type unit.
1184 \textit{This field is new in \DWARFVersionV.}
1187 \item \texttt{address\_size} (\HFTubyte) \\
1188 \addttindexx{address\_size}
1189 A 1-byte unsigned integer representing the size
1190 \addtoindexx{size of an address}
1192 an address on the target architecture. If the system uses
1193 \addtoindexx{address space!segmented}
1194 segmented addressing, this value represents the size of the
1195 offset portion of an address.
1198 \item \HFNdebugabbrevoffset{} (\livelink{datarep:sectionoffsetlength}{section offset}) \\
1200 \addtoindexx{section offset!in .debug\_info header}
1201 4-byte or 8-byte unsigned offset into the
1203 section. This offset associates the type unit with a
1204 particular set of debugging information entry abbreviations. In
1205 the \thirtytwobitdwarfformat, this is a 4-byte unsigned length;
1206 in the \sixtyfourbitdwarfformat, this is an 8-byte unsigned length
1207 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1209 \item \texttt{type\_signature} (8-byte unsigned integer) \\
1210 \addttindexx{type\_signature}
1211 \addtoindexx{type signature}
1212 A unique 8-byte signature (see Section
1213 \refersec{datarep:typesignaturecomputation})
1214 of the type described in this type
1217 \textit{An attribute that refers (using
1218 \DWFORMrefsigeight{}) to
1219 the primary type contained in this
1220 \addtoindex{type unit} uses this value.}
1223 \item \texttt{type\_offset} (\livelink{datarep:sectionoffsetlength}{section offset}) \\
1224 \addttindexx{type\_offset}
1225 A 4-byte or 8-byte unsigned offset
1226 \addtoindexx{section offset!in .debug\_info header}
1227 relative to the beginning
1228 of the \addtoindex{type unit} header.
1229 This offset refers to the debugging
1230 information entry that describes the type. Because the type
1231 may be nested inside a namespace or other structures, and may
1232 contain references to other types that have not been placed in
1233 separate type units, it is not necessarily either the first or
1234 the only entry in the type unit. In the \thirtytwobitdwarfformat,
1235 this is a 4-byte unsigned length; in the \sixtyfourbitdwarfformat,
1236 this is an 8-byte unsigned length
1237 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1241 \subsection{Debugging Information Entry}
1242 \label{datarep:debugginginformationentry}
1244 Each debugging information entry begins with an
1245 unsigned LEB128\addtoindexx{LEB128!unsigned}
1246 number containing the abbreviation code for the entry. This
1247 code represents an entry within the abbreviations table
1248 associated with the compilation unit containing this entry. The
1249 abbreviation code is followed by a series of attribute values.
1251 On some architectures, there are alignment constraints on
1252 section boundaries. To make it easier to pad debugging
1253 information sections to satisfy such constraints, the
1254 abbreviation code 0 is reserved. Debugging information entries
1255 consisting of only the abbreviation code 0 are considered
1258 \subsection{Abbreviations Tables}
1259 \label{datarep:abbreviationstables}
1260 The abbreviations tables for all compilation units
1261 are contained in a separate object file section called
1263 As mentioned before, multiple compilation
1264 units may share the same abbreviations table.
1266 The abbreviations table for a single compilation unit consists
1267 of a series of abbreviation declarations. Each declaration
1268 specifies the tag and attributes for a particular form of
1269 debugging information entry. Each declaration begins with
1270 an unsigned LEB128\addtoindexx{LEB128!unsigned}
1271 number representing the abbreviation
1272 code itself. It is this code that appears at the beginning
1273 of a debugging information entry in the
1275 section. As described above, the abbreviation
1276 code 0 is reserved for null debugging information entries. The
1277 abbreviation code is followed by another unsigned LEB128\addtoindexx{LEB128!unsigned}
1278 number that encodes the entry\textquoteright s tag. The encodings for the
1279 tag names are given in
1280 Table \refersec{tab:tagencodings}.
1284 \setlength{\extrarowheight}{0.1cm}
1285 \begin{longtable}{l|c}
1286 \caption{Tag encodings} \label{tab:tagencodings} \\
1287 \hline \bfseries Tag name&\bfseries Value\\ \hline
1289 \bfseries Tag name&\bfseries Value \\ \hline
1291 \hline \emph{Continued on next page}
1293 \hline \ddag\ \textit{New in DWARF Version 5}
1295 \DWTAGarraytype{} &0x01 \\
1296 \DWTAGclasstype&0x02 \\
1297 \DWTAGentrypoint&0x03 \\
1298 \DWTAGenumerationtype&0x04 \\
1299 \DWTAGformalparameter&0x05 \\
1300 \bbeb\textit{Reserved}&0x06 \\
1301 \bbeb\textit{Reserved}&0x07 \\
1302 \DWTAGimporteddeclaration&0x08 \\
1303 \bbeb\textit{Reserved}&0x09 \\
1305 \DWTAGlexicalblock&0x0b \\
1306 \bbeb\textit{Reserved}&0x0c \\
1307 \DWTAGmember&0x0d \\
1308 \bbeb\textit{Reserved}&0x0e \\
1309 \DWTAGpointertype&0x0f \\
1310 \DWTAGreferencetype&0x10 \\
1311 \DWTAGcompileunit&0x11 \\
1312 \DWTAGstringtype&0x12 \\
1313 \DWTAGstructuretype&0x13 \\
1314 \bbeb\textit{Reserved}&0x14 \\
1315 \DWTAGsubroutinetype&0x15 \\
1316 \DWTAGtypedef&0x16 \\
1317 \DWTAGuniontype&0x17 \\
1318 \DWTAGunspecifiedparameters&0x18 \\
1319 \DWTAGvariant&0x19 \\
1320 \DWTAGcommonblock&0x1a \\
1321 \DWTAGcommoninclusion&0x1b \\
1322 \DWTAGinheritance&0x1c \\
1323 \DWTAGinlinedsubroutine&0x1d \\
1324 \DWTAGmodule&0x1e \\
1325 \DWTAGptrtomembertype&0x1f \\
1326 \DWTAGsettype&0x20 \\
1327 \DWTAGsubrangetype&0x21 \\
1328 \DWTAGwithstmt&0x22 \\
1329 \DWTAGaccessdeclaration&0x23 \\
1330 \DWTAGbasetype&0x24 \\
1331 \DWTAGcatchblock&0x25 \\
1332 \DWTAGconsttype&0x26 \\
1333 \DWTAGconstant&0x27 \\
1334 \DWTAGenumerator&0x28 \\
1335 \DWTAGfiletype&0x29 \\
1336 \DWTAGfriend&0x2a \\
1337 \DWTAGnamelist&0x2b \\
1338 \DWTAGnamelistitem&0x2c \\
1339 \DWTAGpackedtype&0x2d \\
1340 \DWTAGsubprogram&0x2e \\
1341 \DWTAGtemplatetypeparameter&0x2f \\
1342 \DWTAGtemplatevalueparameter&0x30 \\
1343 \DWTAGthrowntype&0x31 \\
1344 \DWTAGtryblock&0x32 \\
1345 \DWTAGvariantpart&0x33 \\
1346 \DWTAGvariable&0x34 \\
1347 \DWTAGvolatiletype&0x35 \\
1348 \DWTAGdwarfprocedure&0x36 \\
1349 \DWTAGrestricttype&0x37 \\
1350 \DWTAGinterfacetype&0x38 \\
1351 \DWTAGnamespace&0x39 \\
1352 \DWTAGimportedmodule&0x3a \\
1353 \DWTAGunspecifiedtype&0x3b \\
1354 \DWTAGpartialunit&0x3c \\
1355 \DWTAGimportedunit&0x3d \\
1356 \textit{Reserved}&0x3e\footnote{Code 0x3e is reserved to allow backward compatible support of the
1357 DW\_TAG\_mutable\_type DIE that was defined (only) in \DWARFVersionIII.}
1359 \DWTAGcondition&\xiiif \\
1360 \DWTAGsharedtype&0x40 \\
1361 \DWTAGtypeunit & 0x41 \\
1362 \DWTAGrvaluereferencetype & 0x42 \\
1363 \DWTAGtemplatealias & 0x43 \\
1364 \DWTAGcoarraytype~\ddag & 0x44 \\
1365 \DWTAGgenericsubrange~\ddag & 0x45 \\
1366 \DWTAGdynamictype~\ddag & 0x46 \\
1367 \DWTAGatomictype~\ddag & 0x47 \\
1368 \DWTAGcallsite~\ddag & 0x48 \\
1369 \DWTAGcallsiteparameter~\ddag & 0x49 \\
1370 \DWTAGskeletonunit~\ddag & 0x4a \\
1371 \DWTAGimmutabletype~\ddag & 0x4b \\
1372 \DWTAGlouser&0x4080 \\
1373 \DWTAGhiuser&\xffff \\
1378 Following the tag encoding is a 1-byte value that determines
1379 whether a debugging information entry using this abbreviation
1380 has child entries or not. If the value is
1382 the next physically succeeding entry of any debugging
1383 information entry using this abbreviation is the first
1384 child of that entry. If the 1-byte value following the
1385 abbreviation\textquoteright s tag encoding is
1386 \DWCHILDRENnoTARG, the next
1387 physically succeeding entry of any debugging information entry
1388 using this abbreviation is a sibling of that entry. (Either
1389 the first child or sibling entries may be null entries). The
1390 encodings for the child determination byte are given in
1391 Table \refersec{tab:childdeterminationencodings}
1393 Section \refersec{chap:relationshipofdebugginginformationentries},
1394 each chain of sibling entries is terminated by a null entry.)
1398 \setlength{\extrarowheight}{0.1cm}
1399 \begin{longtable}{l|c}
1400 \caption{Child determination encodings}
1401 \label{tab:childdeterminationencodings}
1402 \addtoindexx{Child determination encodings} \\
1403 \hline \bfseries Children determination name&\bfseries Value \\ \hline
1405 \bfseries Children determination name&\bfseries Value \\ \hline
1407 \hline \emph{Continued on next page}
1411 \DWCHILDRENno&0x00 \\
1412 \DWCHILDRENyes&0x01 \\ \hline
1417 Finally, the child encoding is followed by a series of
1418 attribute specifications. Each attribute specification
1419 consists of two parts. The first part is an
1420 unsigned LEB128\addtoindexx{LEB128!unsigned}
1421 number representing the attribute\textquoteright s name.
1422 The second part is an
1423 unsigned LEB128\addtoindexx{LEB128!unsigned}
1424 number representing the attribute\textquoteright s form.
1425 The series of attribute specifications ends with an
1426 entry containing 0 for the name and 0 for the form.
1430 \DWFORMindirectTARG{} is a special case. For
1431 attributes with this form, the attribute value itself in the
1433 section begins with an unsigned
1434 LEB128 number that represents its form. This allows producers
1435 to choose forms for particular attributes
1436 \addtoindexx{abbreviations table!dynamic forms in}
1438 without having to add a new entry to the abbreviations table.
1440 The attribute form \DWFORMimplicitconstTARG{} is another special case.
1441 For attributes with this form, the attribute specification contains
1442 a third part, which is a signed LEB128\addtoindexx{LEB128!signed}
1443 number. The value of this number is used as the value of the
1444 attribute, and no value is stored in the \dotdebuginfo{} section.
1446 The abbreviations for a given compilation unit end with an
1447 entry consisting of a 0 byte for the abbreviation code.
1450 Appendix \refersec{app:compilationunitsandabbreviationstableexample}
1451 for a depiction of the organization of the
1452 debugging information.}
1455 \subsection{Attribute Encodings}
1456 \label{datarep:attributeencodings}
1458 The encodings for the attribute names are given in
1459 Table \referfol{tab:attributeencodings}.
1462 \setlength{\extrarowheight}{0.1cm}
1463 \begin{longtable}{l|c|l}
1464 \caption{Attribute encodings}
1465 \label{tab:attributeencodings}
1466 \addtoindexx{attribute encodings} \\
1467 \hline \bfseries Attribute name&\bfseries Value &\bfseries Classes \\ \hline
1469 \bfseries Attribute name&\bfseries Value &\bfseries Classes\\ \hline
1471 \hline \emph{Continued on next page}
1473 \hline \ddag\ \textit{New in DWARF Version 5}
1475 \DWATsibling&0x01&\livelink{chap:classreference}{reference}
1476 \addtoindexx{sibling attribute} \\
1477 \DWATlocation&0x02&\livelink{chap:classexprloc}{exprloc},
1479 \addtoindexx{location attribute} \\
1480 \DWATname&0x03&\livelink{chap:classstring}{string}
1481 \addtoindexx{name attribute} \\
1482 \bbeb\textit{Reserved}&0x04&\textit{not applicable} \\
1483 \bbeb\textit{Reserved}&0x05&\textit{not applicable} \\
1484 \bbeb\textit{Reserved}&0x06&\textit{not applicable} \\
1485 \bbeb\textit{Reserved}&0x07&\textit{not applicable} \\
1486 \bbeb\textit{Reserved}&0x08&\textit{not applicable} \\
1487 \DWATordering&0x09&\livelink{chap:classconstant}{constant}
1488 \addtoindexx{ordering attribute} \\
1489 \bbeb\textit{Reserved}&0x0a&\textit{not applicable} \\
1490 \DWATbytesize&0x0b&\livelink{chap:classconstant}{constant},
1491 \livelink{chap:classexprloc}{exprloc},
1492 \livelink{chap:classreference}{reference}
1493 \addtoindexx{byte size attribute} \\
1494 \textit{Reserved}&0x0c\footnote{Code 0x0c is reserved to allow backward compatible support of the
1495 DW\_AT\_bit\_offset \mbox{attribute} which was
1496 defined in \DWARFVersionIII{} and earlier.}
1497 &\livelink{chap:classconstant}{constant},
1498 \livelink{chap:classexprloc}{exprloc},
1499 \livelink{chap:classreference}{reference}
1500 \addtoindexx{bit offset attribute (Version 3)}
1501 \addtoindexx{DW\_AT\_bit\_offset (deprecated)} \\
1502 \DWATbitsize&0x0d&\livelink{chap:classconstant}{constant},
1503 \livelink{chap:classexprloc}{exprloc},
1504 \livelink{chap:classreference}{reference}
1505 \addtoindexx{bit size attribute} \\
1506 \bbeb\textit{Reserved}&0x0e&\textit{not applicable} \\
1507 \bbeb\textit{Reserved}&0x0f&\textit{not applicable} \\
1508 \DWATstmtlist&0x10&\livelink{chap:classlineptr}{lineptr}
1509 \addtoindexx{statement list attribute} \\
1510 \DWATlowpc&0x11&\livelink{chap:classaddress}{address}
1511 \addtoindexx{low PC attribute} \\
1512 \DWAThighpc&0x12&\livelink{chap:classaddress}{address},
1513 \livelink{chap:classconstant}{constant}
1514 \addtoindexx{high PC attribute} \\
1515 \DWATlanguage&0x13&\livelink{chap:classconstant}{constant}
1516 \addtoindexx{language attribute} \\
1517 \bbeb\textit{Reserved}&0x14&\textit{not applicable} \\
1518 \DWATdiscr&0x15&\livelink{chap:classreference}{reference}
1519 \addtoindexx{discriminant attribute} \\
1520 \DWATdiscrvalue&0x16&\livelink{chap:classconstant}{constant}
1521 \addtoindexx{discriminant value attribute} \\
1522 \DWATvisibility&0x17&\livelink{chap:classconstant}{constant}
1523 \addtoindexx{visibility attribute} \\
1524 \DWATimport&0x18&\livelink{chap:classreference}{reference}
1525 \addtoindexx{import attribute} \\
1526 \DWATstringlength&0x19&\livelink{chap:classexprloc}{exprloc},
1528 \bbeb \CLASSreference
1529 \addtoindexx{string length attribute} \\
1530 \DWATcommonreference&0x1a&\livelink{chap:classreference}{reference}
1531 \addtoindexx{common reference attribute} \\
1532 \DWATcompdir&0x1b&\livelink{chap:classstring}{string}
1533 \addtoindexx{compilation directory attribute} \\
1534 \DWATconstvalue&0x1c&\livelink{chap:classblock}{block},
1535 \livelink{chap:classconstant}{constant},
1536 \livelink{chap:classstring}{string}
1537 \addtoindexx{constant value attribute} \\
1538 \DWATcontainingtype&0x1d&\livelink{chap:classreference}{reference}
1539 \addtoindexx{containing type attribute} \\
1540 \DWATdefaultvalue&0x1e&\livelink{chap:classconstant}{constant},
1541 \livelink{chap:classreference}{reference},
1542 \livelink{chap:classflag}{flag}
1543 \addtoindexx{default value attribute} \\
1544 \bbeb\textit{Reserved}&0x1f&\textit{not applicable} \\
1545 \DWATinline&0x20&\livelink{chap:classconstant}{constant}
1546 \addtoindexx{inline attribute} \\
1547 \DWATisoptional&0x21&\livelink{chap:classflag}{flag}
1548 \addtoindexx{is optional attribute} \\
1549 \DWATlowerbound&0x22&\livelink{chap:classconstant}{constant},
1550 \livelink{chap:classexprloc}{exprloc},
1551 \livelink{chap:classreference}{reference}
1552 \addtoindexx{lower bound attribute} \\
1553 \bbeb\textit{Reserved}&0x23&\textit{not applicable} \\
1554 \bbeb\textit{Reserved}&0x24&\textit{not applicable} \\
1555 \DWATproducer&0x25&\livelink{chap:classstring}{string}
1556 \addtoindexx{producer attribute} \\
1557 \bbeb\textit{Reserved}&0x26&\textit{not applicable} \\
1558 \DWATprototyped&0x27&\livelink{chap:classflag}{flag}
1559 \addtoindexx{prototyped attribute} \\
1560 \bbeb\textit{Reserved}&0x28&\textit{not applicable} \\
1561 \bbeb\textit{Reserved}&0x29&\textit{not applicable} \\
1562 \DWATreturnaddr&0x2a&\livelink{chap:classexprloc}{exprloc},
1564 \addtoindexx{return address attribute} \\
1565 \bbeb\textit{Reserved}&0x2b&\textit{not applicable} \\
1566 \DWATstartscope&0x2c&
1567 \livelink{chap:classconstant}{constant},
1569 \addtoindexx{start scope attribute} \\
1570 \bbeb\textit{Reserved}&0x2d&\textit{not applicable} \\
1571 \DWATbitstride&0x2e&\livelink{chap:classconstant}{constant},
1572 \livelink{chap:classexprloc}{exprloc},
1573 \livelink{chap:classreference}{reference}
1574 \addtoindexx{bit stride attribute} \\
1575 \DWATupperbound&0x2f&\livelink{chap:classconstant}{constant},
1576 \livelink{chap:classexprloc}{exprloc},
1577 \livelink{chap:classreference}{reference}
1578 \addtoindexx{upper bound attribute} \\
1579 \bbeb\textit{Reserved}&0x30&\textit{not applicable} \\
1580 \DWATabstractorigin&0x31&\livelink{chap:classreference}{reference}
1581 \addtoindexx{abstract origin attribute} \\
1582 \DWATaccessibility&0x32&\livelink{chap:classconstant}{constant}
1583 \addtoindexx{accessibility attribute} \\
1584 \DWATaddressclass&0x33&\livelink{chap:classconstant}{constant}
1585 \addtoindexx{address class attribute} \\
1586 \DWATartificial&0x34&\livelink{chap:classflag}{flag}
1587 \addtoindexx{artificial attribute} \\
1588 \DWATbasetypes&0x35&\livelink{chap:classreference}{reference}
1589 \addtoindexx{base types attribute} \\
1590 \DWATcallingconvention&0x36&\livelink{chap:classconstant}{constant}
1591 \addtoindexx{calling convention attribute} \\
1592 \DWATcount&0x37&\livelink{chap:classconstant}{constant},
1593 \livelink{chap:classexprloc}{exprloc},
1594 \livelink{chap:classreference}{reference}
1595 \addtoindexx{count attribute} \\
1596 \DWATdatamemberlocation&0x38&\livelink{chap:classconstant}{constant},
1597 \livelink{chap:classexprloc}{exprloc},
1599 \addtoindexx{data member attribute} \\
1600 \DWATdeclcolumn&0x39&\livelink{chap:classconstant}{constant}
1601 \addtoindexx{declaration column attribute} \\
1602 \DWATdeclfile&0x3a&\livelink{chap:classconstant}{constant}
1603 \addtoindexx{declaration file attribute} \\
1604 \DWATdeclline&0x3b&\livelink{chap:classconstant}{constant}
1605 \addtoindexx{declaration line attribute} \\
1606 \DWATdeclaration&0x3c&\livelink{chap:classflag}{flag}
1607 \addtoindexx{declaration attribute} \\
1608 \DWATdiscrlist&0x3d&\livelink{chap:classblock}{block}
1609 \addtoindexx{discriminant list attribute} \\
1610 \DWATencoding&0x3e&\livelink{chap:classconstant}{constant}
1611 \addtoindexx{encoding attribute} \\
1612 \DWATexternal&\xiiif&\livelink{chap:classflag}{flag}
1613 \addtoindexx{external attribute} \\
1614 \DWATframebase&0x40&\livelink{chap:classexprloc}{exprloc},
1616 \addtoindexx{frame base attribute} \\
1617 \DWATfriend&0x41&\livelink{chap:classreference}{reference}
1618 \addtoindexx{friend attribute} \\
1619 \DWATidentifiercase&0x42&\livelink{chap:classconstant}{constant}
1620 \addtoindexx{identifier case attribute} \\
1621 \textit{Reserved}&0x43\footnote{Code 0x43 is reserved to allow backward compatible support of the
1622 DW\_AT\_macro\_info \mbox{attribute} which was
1623 defined in \DWARFVersionIV{} and earlier.}
1624 &\livelink{chap:classmacptr}{macptr}
1625 \addtoindexx{macro information attribute (legacy)!encoding} \\
1626 \DWATnamelistitem&0x44&\livelink{chap:classreference}{reference}
1627 \addtoindexx{name list item attribute} \\
1628 \DWATpriority&0x45&\livelink{chap:classreference}{reference}
1629 \addtoindexx{priority attribute} \\
1630 \DWATsegment&0x46&\livelink{chap:classexprloc}{exprloc},
1632 \addtoindexx{segment attribute} \\
1633 \DWATspecification&0x47&\livelink{chap:classreference}{reference}
1634 \addtoindexx{specification attribute} \\
1635 \DWATstaticlink&0x48&\livelink{chap:classexprloc}{exprloc},
1637 \addtoindexx{static link attribute} \\
1638 \DWATtype&0x49&\livelink{chap:classreference}{reference}
1639 \addtoindexx{type attribute} \\
1640 \DWATuselocation&0x4a&\livelink{chap:classexprloc}{exprloc},
1642 \addtoindexx{location list attribute} \\
1643 \DWATvariableparameter&0x4b&\livelink{chap:classflag}{flag}
1644 \addtoindexx{variable parameter attribute} \\
1645 \DWATvirtuality&0x4c&\livelink{chap:classconstant}{constant}
1646 \addtoindexx{virtuality attribute} \\
1647 \DWATvtableelemlocation&0x4d&\livelink{chap:classexprloc}{exprloc},
1649 \addtoindexx{vtable element location attribute} \\
1650 \DWATallocated&0x4e&\livelink{chap:classconstant}{constant},
1651 \livelink{chap:classexprloc}{exprloc},
1652 \livelink{chap:classreference}{reference}
1653 \addtoindexx{allocated attribute} \\
1654 \DWATassociated&0x4f&\livelink{chap:classconstant}{constant},
1655 \livelink{chap:classexprloc}{exprloc},
1656 \livelink{chap:classreference}{reference}
1657 \addtoindexx{associated attribute} \\
1658 \DWATdatalocation&0x50&\livelink{chap:classexprloc}{exprloc}
1659 \addtoindexx{data location attribute} \\
1660 \DWATbytestride&0x51&\livelink{chap:classconstant}{constant},
1661 \livelink{chap:classexprloc}{exprloc},
1662 \livelink{chap:classreference}{reference}
1663 \addtoindexx{byte stride attribute} \\
1664 \DWATentrypc&0x52&\livelink{chap:classaddress}{address},
1665 \livelink{chap:classconstant}{constant}
1666 \addtoindexx{entry PC attribute} \\
1667 \DWATuseUTFeight&0x53&\livelink{chap:classflag}{flag}
1668 \addtoindexx{use UTF8 attribute}\addtoindexx{UTF-8} \\
1669 \DWATextension&0x54&\livelink{chap:classreference}{reference}
1670 \addtoindexx{extension attribute} \\
1673 \addtoindexx{ranges attribute} \\
1674 \DWATtrampoline&0x56&\livelink{chap:classaddress}{address},
1675 \livelink{chap:classflag}{flag},
1676 \livelink{chap:classreference}{reference},
1677 \livelink{chap:classstring}{string}
1678 \addtoindexx{trampoline attribute} \\
1679 \DWATcallcolumn&0x57&\livelink{chap:classconstant}{constant}
1680 \addtoindexx{call column attribute} \\
1681 \DWATcallfile&0x58&\livelink{chap:classconstant}{constant}
1682 \addtoindexx{call file attribute} \\
1683 \DWATcallline&0x59&\livelink{chap:classconstant}{constant}
1684 \addtoindexx{call line attribute} \\
1685 \DWATdescription&0x5a&\livelink{chap:classstring}{string}
1686 \addtoindexx{description attribute} \\
1687 \DWATbinaryscale&0x5b&\livelink{chap:classconstant}{constant}
1688 \addtoindexx{binary scale attribute} \\
1689 \DWATdecimalscale&0x5c&\livelink{chap:classconstant}{constant}
1690 \addtoindexx{decimal scale attribute} \\
1691 \DWATsmall{} &0x5d&\livelink{chap:classreference}{reference}
1692 \addtoindexx{small attribute} \\
1693 \DWATdecimalsign&0x5e&\livelink{chap:classconstant}{constant}
1694 \addtoindexx{decimal scale attribute} \\
1695 \DWATdigitcount&0x5f&\livelink{chap:classconstant}{constant}
1696 \addtoindexx{digit count attribute} \\
1697 \DWATpicturestring&0x60&\livelink{chap:classstring}{string}
1698 \addtoindexx{picture string attribute} \\
1699 \DWATmutable&0x61&\livelink{chap:classflag}{flag}
1700 \addtoindexx{mutable attribute} \\
1701 \DWATthreadsscaled&0x62&\livelink{chap:classflag}{flag}
1702 \addtoindexx{thread scaled attribute} \\
1703 \DWATexplicit&0x63&\livelink{chap:classflag}{flag}
1704 \addtoindexx{explicit attribute} \\
1705 \DWATobjectpointer&0x64&\livelink{chap:classreference}{reference}
1706 \addtoindexx{object pointer attribute} \\
1707 \DWATendianity&0x65&\livelink{chap:classconstant}{constant}
1708 \addtoindexx{endianity attribute} \\
1709 \DWATelemental&0x66&\livelink{chap:classflag}{flag}
1710 \addtoindexx{elemental attribute} \\
1711 \DWATpure&0x67&\livelink{chap:classflag}{flag}
1712 \addtoindexx{pure attribute} \\
1713 \DWATrecursive&0x68&\livelink{chap:classflag}{flag}
1714 \addtoindexx{recursive attribute} \\
1715 \DWATsignature{} &0x69&\livelink{chap:classreference}{reference}
1716 \addtoindexx{signature attribute} \\
1717 \DWATmainsubprogram{} &0x6a&\livelink{chap:classflag}{flag}
1718 \addtoindexx{main subprogram attribute} \\
1719 \DWATdatabitoffset{} &0x6b&\livelink{chap:classconstant}{constant}
1720 \addtoindexx{data bit offset attribute} \\
1721 \DWATconstexpr{} &0x6c&\livelink{chap:classflag}{flag}
1722 \addtoindexx{constant expression attribute} \\
1723 \DWATenumclass{} &0x6d&\livelink{chap:classflag}{flag}
1724 \addtoindexx{enumeration class attribute} \\
1725 \DWATlinkagename{} &0x6e&\livelink{chap:classstring}{string}
1726 \addtoindexx{linkage name attribute} \\
1727 \DWATstringlengthbitsize{}~\ddag&0x6f&
1728 \livelink{chap:classconstant}{constant}
1729 \addtoindexx{string length attribute!size of length} \\
1730 \DWATstringlengthbytesize{}~\ddag&0x70&
1731 \livelink{chap:classconstant}{constant}
1732 \addtoindexx{string length attribute!size of length} \\
1733 \DWATrank~\ddag&0x71&
1734 \livelink{chap:classconstant}{constant},
1735 \livelink{chap:classexprloc}{exprloc}
1736 \addtoindexx{rank attribute} \\
1737 \DWATstroffsetsbase~\ddag&0x72&
1738 \livelinki{chap:classstroffsetsptr}{stroffsetsptr}{stroffsetsptr class}
1739 \addtoindexx{string offsets base!encoding} \\
1740 \DWATaddrbase~\ddag &0x73&
1741 \livelinki{chap:classaddrptr}{addrptr}{addrptr class}
1742 \addtoindexx{address table base!encoding} \\
1743 \DWATrnglistsbase~\ddag&0x74&
1745 \addtoindexx{range list base!encoding} \\
1746 \textit{Reserved} &0x75& \textit{Unused} \\
1747 \DWATdwoname~\ddag &0x76&
1748 \livelink{chap:classstring}{string}
1749 \addtoindexx{split DWARF object file name!encoding} \\
1750 \DWATreference~\ddag &0x77&
1751 \livelink{chap:classflag}{flag} \\
1752 \DWATrvaluereference~\ddag &0x78&
1753 \livelink{chap:classflag}{flag} \\
1754 \DWATmacros~\ddag &0x79&\livelink{chap:classmacptr}{macptr}
1755 \addtoindexx{macro information attribute} \\
1756 \DWATcallallcalls~\ddag &0x7a&\CLASSflag
1757 \addtoindexx{all calls summary attribute} \\
1758 \DWATcallallsourcecalls~\ddag &0x7b &\CLASSflag
1759 \addtoindexx{all source calls summary attribute} \\
1760 \DWATcallalltailcalls~\ddag &0x7c&\CLASSflag
1761 \addtoindexx{all tail calls summary attribute} \\
1762 \DWATcallreturnpc~\ddag &0x7d &\CLASSaddress
1763 \addtoindexx{call return PC attribute} \\
1764 \DWATcallvalue~\ddag &0x7e &\CLASSexprloc
1765 \addtoindexx{call value attribute} \\
1766 \DWATcallorigin~\ddag &0x7f &\CLASSexprloc
1767 \addtoindexx{call origin attribute} \\
1768 \DWATcallparameter~\ddag &0x80 &\CLASSreference
1769 \addtoindexx{call parameter attribute} \\
1770 \DWATcallpc~\ddag &0x81 &\CLASSaddress
1771 \addtoindexx{call PC attribute} \\
1772 \DWATcalltailcall~\ddag &0x82 &\CLASSflag
1773 \addtoindexx{call tail call attribute} \\
1774 \DWATcalltarget~\ddag &0x83 &\CLASSexprloc
1775 \addtoindexx{call target attribute} \\
1776 \DWATcalltargetclobbered~\ddag &0x84 &\CLASSexprloc
1777 \addtoindexx{call target clobbered attribute} \\
1778 \DWATcalldatalocation~\ddag &0x85 &\CLASSexprloc
1779 \addtoindexx{call data location attribute} \\
1780 \DWATcalldatavalue~\ddag &0x86 &\CLASSexprloc
1781 \addtoindexx{call data value attribute} \\
1782 \DWATnoreturn~\ddag &0x87 &\CLASSflag
1783 \addtoindexx{noreturn attribute} \\
1784 \DWATalignment~\ddag &0x88 &\CLASSconstant
1785 \addtoindexx{alignment attribute} \\
1786 \DWATexportsymbols~\ddag &0x89 &\CLASSflag
1787 \addtoindexx{export symbols attribute} \\
1788 \DWATdeleted~\ddag &0x8a &\CLASSflag \addtoindexx{deleted attribute} \\
1789 \DWATdefaulted~\ddag &0x8b &\CLASSconstant \addtoindexx{defaulted attribute} \\
1790 \DWATloclistsbase~\ddag &0x8c &\CLASSloclistsptr \addtoindexx{location list base attribute} \\
1791 \DWATlouser&0x2000 & --- \addtoindexx{low user attribute encoding} \\
1792 \DWAThiuser&\xiiifff& --- \addtoindexx{high user attribute encoding} \\
1797 \subsection{Classes and Forms}
1798 \label{datarep:classesandforms}
1799 Each class is a set of forms which have related representations
1800 and which are given a common interpretation according to the
1801 attribute in which the form is used.
1802 The attribute form governs how the value of an attribute is
1804 The classes and the forms they include are listed below.
1806 Form \DWFORMsecoffsetTARG{}
1807 is a member of more than one class, namely
1810 \CLASSloclist, \CLASSloclistsptr,
1812 \CLASSrnglist{}, \CLASSrnglistsptr,
1814 \CLASSstroffsetsptr;
1815 as a result, it is not possible for an
1816 attribute to allow more than one of these classes.
1817 The list of classes allowed by the applicable attribute in
1818 Table \refersec{tab:attributeencodings}
1819 determines the class of the form.
1822 In the form descriptions that follow, some forms are said
1823 to depend in part on the value of an attribute of the
1824 \definition{\associatedcompilationunit}:
1827 In the case of a \splitDWARFobjectfile{}, the associated
1828 compilation unit is the skeleton compilation unit corresponding
1829 to the containing unit.
1830 \item Otherwise, the associated compilation unit
1831 is the containing unit.
1835 Each possible form belongs to one or more of the following classes
1836 (see Table \refersec{tab:classesofattributevalue} for a summary of
1837 the purpose and general usage of each class):
1841 \item \CLASSaddress \\
1842 \livetarg{datarep:classaddress}{}
1843 Represented as either:
1845 \item An object of appropriate size to hold an
1846 address on the target machine (\DWFORMaddrTARG).
1847 The size is encoded in the compilation unit header
1848 (see Section \refersec{datarep:compilationunitheader}).
1849 This address is relocatable in a relocatable object file and
1850 is relocated in an executable file or shared object file.
1852 \item An indirect index into a table of addresses (as
1853 described in the previous bullet) in the \dotdebugaddr{} section
1855 (\DWFORMaddrxTARG, \DWFORMaddrxoneTARG, \DWFORMaddrxtwoTARG,
1856 \DWFORMaddrxthreeTARG{} and \DWFORMaddrxfourTARG).
1858 The representation of a \DWFORMaddrxNAME{} value is an unsigned
1859 \addtoindex{LEB128} value, which is interpreted as a zero-based
1860 index into an array of addresses in the \dotdebugaddr{} section.
1862 The representation of a \DWFORMaddrxoneNAME, \DWFORMaddrxtwoNAME,
1863 \DWFORMaddrxthreeNAME{} or \DWFORMaddrxfourNAME{} value is a
1864 1-, 2-, 3- or 4-byte unsigned integer value, respectively,
1865 which is similarly interpretated.
1867 The index is relative to the value of the \DWATaddrbase{} attribute
1868 of the associated compilation unit.
1873 \item \CLASSaddrptr \\
1874 \livetarg{datarep:classaddrptr}{}
1875 This is an offset into the \dotdebugaddr{} section (\DWFORMsecoffset). It
1876 consists of an offset from the beginning of the \dotdebugaddr{} section to the
1877 beginning of the list of machine addresses information for the
1878 referencing entity. It is relocatable in
1879 a relocatable object file, and relocated in an executable or
1880 shared object file. In the \thirtytwobitdwarfformat, this offset
1881 is a 4-byte unsigned value; in the 64-bit DWARF
1882 format, it is an 8-byte unsigned value (see Section
1883 \refersec{datarep:32bitand64bitdwarfformats}).
1885 \textit{This class is new in \DWARFVersionV.}
1888 \item \CLASSblock \\
1889 \livetarg{datarep:classblock}{}
1890 Blocks come in four forms:
1893 A 1-byte length followed by 0 to 255 contiguous information
1894 bytes (\DWFORMblockoneTARG).
1897 A 2-byte length followed by 0 to 65,535 contiguous information
1898 bytes (\DWFORMblocktwoTARG).
1901 A 4-byte length followed by 0 to 4,294,967,295 contiguous
1902 information bytes (\DWFORMblockfourTARG).
1905 An unsigned LEB128\addtoindexx{LEB128!unsigned}
1906 length followed by the number of bytes
1907 specified by the length (\DWFORMblockTARG).
1910 In all forms, the length is the number of information bytes
1911 that follow. The information bytes may contain any mixture
1912 of relocated (or relocatable) addresses, references to other
1913 debugging information entries or data bytes.
1915 \item \CLASSconstant \\
1916 \livetarg{datarep:classconstant}{}
1917 There are eight forms of constants. There are fixed length
1918 constant data forms for one-, two-, four-, eight- and sixteen-byte values
1922 \DWFORMdatafourTARG,
1923 \DWFORMdataeightTARG{} and
1924 \DWFORMdatasixteenTARG).
1925 There are variable length constant
1926 data forms encoded using
1927 signed LEB128 numbers (\DWFORMsdataTARG) and unsigned
1928 LEB128 numbers (\DWFORMudataTARG).
1929 There is also an implicit constant (\DWFORMimplicitconst),
1930 whose value is provided as part of the abbreviation
1934 The data in \DWFORMdataone,
1937 \DWFORMdataeight{} and
1938 \DWFORMdatasixteen{}
1939 can be anything. Depending on context, it may
1940 be a signed integer, an unsigned integer, a floating\dash point
1941 constant, or anything else. A consumer must use context to
1942 know how to interpret the bits, which if they are target
1943 machine data (such as an integer or floating-point constant)
1944 will be in target machine \byteorder.
1946 \textit{If one of the \DWFORMdataTARG\textless n\textgreater
1947 forms is used to represent a
1948 signed or unsigned integer, it can be hard for a consumer
1949 to discover the context necessary to determine which
1950 interpretation is intended. Producers are therefore strongly
1951 encouraged to use \DWFORMsdata{} or
1952 \DWFORMudata{} for signed and
1953 unsigned integers respectively, rather than
1954 \DWFORMdata\textless n\textgreater.}
1957 \item \CLASSexprloc \\
1958 \livetarg{datarep:classexprloc}{}
1959 This is an unsigned LEB128\addtoindexx{LEB128!unsigned} length
1960 followed by the number of information bytes specified by the
1961 length (\DWFORMexprlocTARG).
1962 The information bytes contain a DWARF expression
1963 (see Section \refersec{chap:dwarfexpressions})
1964 or location description
1965 (see Section \refersec{chap:locationdescriptions}).
1969 \livetarg{datarep:classflag}{}
1970 A flag \addtoindexx{flag class}
1971 is represented explicitly as a single byte of data
1972 (\DWFORMflagTARG) or implicitly (\DWFORMflagpresentTARG). In the
1973 first case, if the \nolink{flag} has value zero, it indicates the
1974 absence of the attribute; if the \nolink{flag} has a non-zero value,
1975 it indicates the presence of the attribute. In the second
1976 case, the attribute is implicitly indicated as present, and
1977 no value is encoded in the debugging information entry itself.
1980 \item \CLASSlineptr \\
1981 \livetarg{datarep:classlineptr}{}
1982 This is an offset into
1983 \addtoindexx{section offset!in class lineptr value}
1985 \dotdebugline{} or \dotdebuglinedwo{} section
1987 It consists of an offset from the beginning of the
1989 section to the first byte of
1990 the data making up the line number list for the compilation
1992 It is relocatable in a relocatable object file, and
1993 relocated in an executable or shared object file. In the
1994 \thirtytwobitdwarfformat, this offset is a 4-byte unsigned value;
1995 in the \sixtyfourbitdwarfformat, it is an 8-byte unsigned value
1996 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1999 \item \CLASSloclist \\
2000 \livetarg{datarep:classloclist}{}
2001 This is represented as either:
2004 An index into the \dotdebugloclists{} section (\DWFORMloclistxTARG).
2005 The unsigned ULEB operand identifies an offset location
2006 relative to the base of that section (the location of the first offset
2007 in the section, not the first byte of the section). The contents of
2008 that location is then added to the base to determine the location of
2009 the target list of entries.
2011 An offset into the \dotdebugloclists{} section (\DWFORMsecoffset).
2012 The operand consists of a byte
2013 offset\addtoindexx{section offset!in class loclist value}
2014 from the beginning of the \dotdebugloclists{} section.
2015 It is relocatable in a relocatable object file, and
2016 relocated in an executable or shared object file. In the
2017 \thirtytwobitdwarfformat, this offset is a 4-byte unsigned value;
2018 in the \sixtyfourbitdwarfformat, it is an 8-byte unsigned value
2019 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
2022 \textit{This class is new in \DWARFVersionV.}
2024 \item \CLASSloclistsptr \\
2025 \livetarg{datarep:classloclistsptr}{}
2026 This is an offset into the \dotdebugloclists{} section (\DWFORMsecoffset).
2027 The operand consists of a byte
2028 offset\addtoindexx{section offset!in class loclistsptr}
2029 from the beginning of the \dotdebugloclists{} section.
2030 It is relocatable in a relocatable object file, and
2031 relocated in an executable or shared object file. In the
2032 \thirtytwobitdwarfformat, this offset is a 4-byte unsigned value;
2033 in the \sixtyfourbitdwarfformat, it is an 8-byte unsigned value
2034 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
2036 \textit{This class is new in \DWARFVersionV.}
2038 \item \CLASSmacptr \\
2039 \livetarg{datarep:classmacptr}{}
2041 \addtoindexx{section offset!in class macptr value}
2043 \dotdebugmacro{} or \dotdebugmacrodwo{} section
2045 It consists of an offset from the beginning of the
2046 \dotdebugmacro{} or \dotdebugmacrodwo{}
2047 section to the the header making up the
2048 macro information list for the compilation unit.
2049 It is relocatable in a relocatable object file, and
2050 relocated in an executable or shared object file. In the
2051 \thirtytwobitdwarfformat, this offset is a 4-byte unsigned value;
2052 in the \sixtyfourbitdwarfformat, it is an 8-byte unsigned value
2053 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
2056 \item \CLASSrnglist \\
2057 \livetarg{datarep:classrnglist}{}
2058 This is represented as either:
2061 An index into the \dotdebugrnglists{} section (\DWFORMrnglistxTARG).
2062 The unsigned ULEB operand identifies an offset location
2063 relative to the base of that section (the location of the first offset
2064 in the section, not the first byte of the section). The contents of
2065 that location is then added to the base to determine the location of
2066 the target range list of entries.
2069 An offset into the \dotdebugrnglists{} section (\DWFORMsecoffset).
2070 The operand consists of a byte
2071 offset\addtoindexx{section offset!in class rnglist value}
2073 from the beginning of the \dotdebugrnglists{} section.
2074 It is relocatable in a relocatable object file, and
2075 relocated in an executable or shared object file. In the
2076 \thirtytwobitdwarfformat, this offset is a 4-byte unsigned value;
2077 in the \sixtyfourbitdwarfformat, it is an 8-byte unsigned value
2078 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
2081 \textit{This class is new in \DWARFVersionV.}
2084 \item \CLASSrnglistsptr \\
2085 \livetarg{datarep:classrnglistsptr}{}
2086 This is an offset\addtoindexx{section offset!in class rnglistsptr}
2087 into the \dotdebugrnglists{} section (\DWFORMsecoffset).
2088 It consists of a byte offset from the beginning of the
2089 \dotdebugrnglists{} section.
2090 It is relocatable in a relocatable object file, and relocated
2091 in an executable or shared object file.
2092 In the \thirtytwobitdwarfformat, this offset
2093 is a 4-byte unsigned value; in the 64-bit DWARF
2094 format, it is an 8-byte unsigned value (see Section
2095 \refersec{datarep:32bitand64bitdwarfformats}).
2097 \textit{This class is new in \DWARFVersionV.}
2100 \item \CLASSreference \\
2101 \livetarg{datarep:classreference}{}
2102 There are four types of reference.\addtoindexx{reference class}
2105 The first type of reference can identify any debugging
2106 information entry within the containing unit.
2107 This type of reference is an
2108 offset\addtoindexx{section offset!in class reference value}
2109 from the first byte of the compilation
2110 header for the compilation unit containing the reference. There
2111 are five forms for this type of reference. There are fixed
2112 length forms for one, two, four and eight byte offsets
2118 and \DWFORMrefeightTARG).
2119 There is also an unsigned variable
2120 length offset encoded form that uses
2121 unsigned LEB128\addtoindexx{LEB128!unsigned} numbers
2122 (\DWFORMrefudataTARG).
2123 Because this type of reference is within
2124 the containing compilation unit no relocation of the value
2128 The second type of reference can identify any debugging
2129 information entry within a
2130 \dotdebuginfo{} section; in particular,
2131 it may refer to an entry in a different compilation unit
2132 from the unit containing the reference, and may refer to an
2133 entry in a different shared object file. This type of reference
2134 (\DWFORMrefaddrTARG)
2135 is an offset from the beginning of the
2137 section of the target executable or shared object file, or, for
2138 references within a \addtoindex{supplementary object file},
2139 an offset from the beginning of the local \dotdebuginfo{} section;
2140 it is relocatable in a relocatable object file and frequently
2141 relocated in an executable or shared object file. For
2142 references from one shared object or static executable file
2143 to another, the relocation and identification of the target
2144 object must be performed by the consumer. In the
2145 \thirtytwobitdwarfformat, this offset is a 4-byte unsigned value;
2146 in the \sixtyfourbitdwarfformat, it is an 8-byte
2148 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
2150 \textit{A debugging information entry that may be referenced by
2151 another compilation unit using
2152 \DWFORMrefaddr{} must have a global symbolic name.}
2154 \textit{For a reference from one executable or shared object file to
2155 another, the reference is resolved by the debugger to identify
2156 the executable or shared object file and the offset into that
2157 file\textquoteright s \dotdebuginfo{}
2158 section in the same fashion as the run
2159 time loader, either when the debug information is first read,
2160 or when the reference is used.}
2163 The third type of reference can identify any debugging
2164 information type entry that has been placed in its own
2165 \addtoindex{type unit}. This type of
2166 reference (\DWFORMrefsigeightTARG) is the
2167 \addtoindexx{type signature}
2168 8-byte type signature
2169 (see Section \refersec{datarep:typesignaturecomputation})
2170 that was computed for the type.
2173 The fourth type of reference is a reference from within the
2174 \dotdebuginfo{} section of the executable or shared object file to
2175 a debugging information entry in the \dotdebuginfo{} section of
2176 a \addtoindex{supplementary object file}.
2177 This type of reference (\DWFORMrefsupfourTARG{}
2179 or \DWFORMrefsupeightTARG{}) is a 4- or 8-byte offset (respectively)
2181 from the beginning of the \dotdebuginfo{} section in the
2182 \addtoindex{supplementary object file}.
2184 \textit{The use of compilation unit relative references will reduce the
2185 number of link\dash time relocations and so speed up linking. The
2186 use of the second, third and fourth type of reference allows for the
2187 sharing of information, such as types, across compilation
2188 units, while the fourth type further allows for sharing of information
2189 across compilation units from different executables or shared object files.}
2191 \textit{A reference to any kind of compilation unit identifies the
2192 debugging information entry for that unit, not the preceding
2197 \item \CLASSstring \\
2198 \livetarg{datarep:classstring}{}
2199 A string is a sequence of contiguous non\dash null bytes followed by
2201 \addtoindexx{string class}
2202 A string may be represented:
2204 \setlength{\itemsep}{0em}
2205 \item Immediately in the debugging information entry itself
2206 (\DWFORMstringTARG),
2209 \addtoindexx{section offset!in class string value}
2210 offset into a string table contained in
2211 the \dotdebugstr{} section of the object file (\DWFORMstrpTARG),
2212 the \dotdebuglinestr{} section of the object file (\DWFORMlinestrpTARG),
2213 or as an offset into a string table contained in the
2214 \dotdebugstr{} section of a \addtoindex{supplementary object file}
2215 (\DWFORMstrpsupTARG). \DWFORMstrpsupNAME{} offsets from the \dotdebuginfo{}
2216 section of a \addtoindex{supplementary object file}
2217 refer to the local \dotdebugstr{} section of that same file.
2218 In the \thirtytwobitdwarfformat, the representation of a
2221 \DWFORMlinestrpNAME{}
2223 or \DWFORMstrpsupNAME{}
2224 value is a 4-byte unsigned offset; in the \sixtyfourbitdwarfformat,
2225 it is an 8-byte unsigned offset
2226 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
2229 \item As an indirect offset into the string table using an
2230 index into a table of offsets contained in the
2231 \dotdebugstroffsets{} section of the object file
2233 (\DWFORMstrxTARG, \DWFORMstrxoneTARG, \DWFORMstrxtwoTARG, \DWFORMstrxthreeTARG{} and \DWFORMstrxfourTARG).
2235 The representation of a \DWFORMstrxNAME{} value is an unsigned
2236 \addtoindex{LEB128} value, which is interpreted as a zero-based
2237 index into an array of offsets in the \dotdebugstroffsets{} section.
2239 The representation of a \DWFORMstrxoneNAME, \DWFORMstrxtwoNAME,
2240 \DWFORMstrxthreeNAME{} or \DWFORMstrxfourNAME{} value is a
2241 1-, 2-, 3- or 4-byte unsigned integer value, respectively,
2242 which is similarly interpretated.
2244 The offset entries in the \dotdebugstroffsets{} section have the
2245 same representation as \DWFORMstrp{} values.
2247 Any combination of these three forms may be used within a single compilation.
2249 If the \DWATuseUTFeight{}
2250 \addtoindexx{use UTF8 attribute}\addtoindexx{UTF-8} attribute is specified for the
2251 compilation, partial, skeleton or type unit entry, string values are encoded using the
2252 UTF\dash 8 (\addtoindex{Unicode} Transformation Format\dash 8) from the Universal
2253 Character Set standard (ISO/IEC 10646\dash 1:1993).
2254 \addtoindexx{ISO 10646 character set standard}
2255 Otherwise, the string representation is unspecified.
2257 \textit{The \addtoindex{Unicode} Standard Version 3 is fully compatible with
2258 ISO/IEC 10646\dash 1:1993.
2259 \addtoindexx{ISO 10646 character set standard}
2260 It contains all the same characters
2261 and encoding points as ISO/IEC 10646, as well as additional
2262 information about the characters and their use.}
2265 \textit{Earlier versions of DWARF did not specify the representation
2266 of strings; for compatibility, this version also does
2267 not. However, the UTF\dash 8 representation is strongly recommended.}
2270 \item \CLASSstroffsetsptr \\
2271 \livetarg{datarep:classstroffsetsptr}{}
2272 This is an offset into the \dotdebugstroffsets{} section
2273 (\DWFORMsecoffset). It consists of an offset from the beginning of the
2274 \dotdebugstroffsets{} section to the
2275 beginning of the string offsets information for the
2276 referencing entity. It is relocatable in
2277 a relocatable object file, and relocated in an executable or
2278 shared object file. In the \thirtytwobitdwarfformat, this offset
2279 is a 4-byte unsigned value; in the \sixtyfourbitdwarfformat,
2280 it is an 8-byte unsigned value (see Section
2281 \refersec{datarep:32bitand64bitdwarfformats}).
2283 \textit{This class is new in \DWARFVersionV.}
2287 In no case does an attribute use one of the classes
2292 \CLASSrnglistsptr{} or
2293 \CLASSstroffsetsptr{}
2294 to point into either the
2295 \dotdebuginfo{} or \dotdebugstr{} section.
2297 \subsection{Form Encodings}
2298 \label{datarep:formencodings}
2299 The form encodings are listed in
2300 Table \referfol{tab:attributeformencodings}.
2304 \setlength{\extrarowheight}{0.1cm}
2305 \begin{longtable}{l|c|l}
2306 \caption{Attribute form encodings} \label{tab:attributeformencodings} \\
2307 \hline \bfseries Form name&\bfseries Value &\bfseries Classes \\ \hline
2309 \bfseries Form name&\bfseries Value &\bfseries Classes\\ \hline
2311 \hline \emph{Continued on next page}
2313 \hline \ddag\ \textit{New in DWARF Version 5}
2316 \DWFORMaddr &0x01&\livelink{chap:classaddress}{address} \\
2317 \textit{Reserved} &0x02& \\
2318 \DWFORMblocktwo &0x03&\livelink{chap:classblock}{block} \\
2319 \DWFORMblockfour &0x04&\livelink{chap:classblock}{block} \\
2320 \DWFORMdatatwo &0x05&\livelink{chap:classconstant}{constant} \\
2321 \DWFORMdatafour &0x06&\livelink{chap:classconstant}{constant} \\
2322 \DWFORMdataeight &0x07&\livelink{chap:classconstant}{constant} \\
2323 \DWFORMstring&0x08&\livelink{chap:classstring}{string} \\
2324 \DWFORMblock&0x09&\livelink{chap:classblock}{block} \\
2325 \DWFORMblockone &0x0a&\livelink{chap:classblock}{block} \\
2326 \DWFORMdataone &0x0b&\livelink{chap:classconstant}{constant} \\
2327 \DWFORMflag&0x0c&\livelink{chap:classflag}{flag} \\
2328 \DWFORMsdata&0x0d&\livelink{chap:classconstant}{constant} \\
2329 \DWFORMstrp&0x0e&\livelink{chap:classstring}{string} \\
2330 \DWFORMudata&0x0f&\livelink{chap:classconstant}{constant} \\
2331 \DWFORMrefaddr&0x10&\livelink{chap:classreference}{reference} \\
2332 \DWFORMrefone&0x11&\livelink{chap:classreference}{reference} \\
2333 \DWFORMreftwo&0x12&\livelink{chap:classreference}{reference} \\
2334 \DWFORMreffour&0x13&\livelink{chap:classreference}{reference} \\
2335 \DWFORMrefeight&0x14&\livelink{chap:classreference}{reference} \\
2336 \DWFORMrefudata&0x15&\livelink{chap:classreference}{reference} \\
2337 \DWFORMindirect&0x16&(see Section \refersec{datarep:abbreviationstables}) \\
2338 \DWFORMsecoffset{} &0x17& \CLASSaddrptr, \CLASSlineptr, \CLASSloclist, \CLASSloclistsptr, \\
2339 & & \CLASSmacptr, \CLASSrnglist, \CLASSrnglistsptr, \CLASSstroffsetsptr \\
2340 \DWFORMexprloc{} &0x18&\livelink{chap:classexprloc}{exprloc} \\
2341 \DWFORMflagpresent{} &0x19&\livelink{chap:classflag}{flag} \\
2342 \DWFORMstrx{} \ddag &0x1a &\CLASSstring \\
2343 \DWFORMaddrx{} \ddag &0x1b &\CLASSaddress \\
2344 \DWFORMrefsupfour{}~\ddag &0x1c &\CLASSreference \\
2345 \DWFORMstrpsup{}~\ddag &0x1d &\CLASSstring \\
2346 \DWFORMdatasixteen~\ddag &0x1e &\CLASSconstant \\
2347 \DWFORMlinestrp~\ddag &0x1f &\CLASSstring \\
2348 \DWFORMrefsigeight &0x20 &\CLASSreference \\
2349 \DWFORMimplicitconst~\ddag &0x21 &\CLASSconstant \\
2350 \DWFORMloclistx~\ddag &0x22 &\CLASSloclist \\
2351 \DWFORMrnglistx~\ddag &0x23 &\CLASSrnglist \\
2352 \DWFORMrefsupeight{}~\ddag &0x24 &\CLASSreference \\
2354 \DWFORMstrxone{}~\ddag &0x25 &\CLASSstring \\
2355 \DWFORMstrxtwo{}~\ddag &0x26 &\CLASSstring \\
2356 \DWFORMstrxthree{}~\ddag &0x27 &\CLASSstring \\
2357 \DWFORMstrxfour{}~\ddag &0x28 &\CLASSstring \\
2358 \DWFORMaddrxone{}~\ddag &0x29 &\CLASSaddress \\
2359 \DWFORMaddrxtwo{}~\ddag &0x2a &\CLASSaddress \\
2360 \DWFORMaddrxthree{}~\ddag &0x2b &\CLASSaddress \\
2362 \DWFORMaddrxfour{}~\ddag &0x2c &\CLASSaddress \\
2368 \section{Variable Length Data}
2369 \label{datarep:variablelengthdata}
2370 \addtoindexx{variable length data|see {LEB128}}
2372 \addtoindexx{Little-Endian Base 128|see{LEB128}}
2373 encoded using \doublequote{Little-Endian Base 128}
2374 \addtoindexx{little-endian encoding|see{endian attribute}}
2376 \addtoindexx{LEB128}
2377 LEB128 is a scheme for encoding integers
2378 densely that exploits the assumption that most integers are
2381 \textit{This encoding is equally suitable whether the target machine
2382 architecture represents data in big-endian or little-endian
2383 \byteorder. It is \doublequote{little-endian} only in the sense that it
2384 avoids using space to represent the \doublequote{big} end of an
2385 unsigned integer, when the big end is all zeroes or sign
2388 Unsigned LEB128\addtoindexx{LEB128!unsigned} (\addtoindex{ULEB128})
2389 numbers are encoded as follows:
2390 \addtoindexx{LEB128!unsigned, encoding as}
2391 start at the low order end of an unsigned integer and chop
2392 it into 7-bit chunks. Place each chunk into the low order 7
2393 bits of a byte. Typically, several of the high order bytes
2394 will be zero; discard them. Emit the remaining bytes in a
2395 stream, starting with the low order byte; set the high order
2396 bit on each byte except the last emitted byte. The high bit
2397 of zero on the last byte indicates to the decoder that it
2398 has encountered the last byte.
2400 The integer zero is a special case, consisting of a single
2403 Table \refersec{tab:examplesofunsignedleb128encodings}
2404 gives some examples of unsigned LEB128\addtoindexx{LEB128!unsigned}
2406 0x80 in each case is the high order bit of the byte, indicating
2407 that an additional byte follows.
2410 The encoding for signed, two\textquoteright{s} complement LEB128
2411 (\addtoindex{SLEB128}) \addtoindexx{LEB128!signed, encoding as}
2412 numbers is similar, except that the criterion for discarding
2413 high order bytes is not whether they are zero, but whether
2414 they consist entirely of sign extension bits. Consider the
2415 4-byte integer -2. The three high level bytes of the number
2416 are sign extension, thus LEB128 would represent it as a single
2417 byte containing the low order 7 bits, with the high order
2418 bit cleared to indicate the end of the byte stream. Note
2419 that there is nothing within the LEB128 representation that
2420 indicates whether an encoded number is signed or unsigned. The
2421 decoder must know what type of number to expect.
2422 Table \refersec{tab:examplesofunsignedleb128encodings}
2423 gives some examples of unsigned LEB128\addtoindexx{LEB128!unsigned}
2424 numbers and Table \refersec{tab:examplesofsignedleb128encodings}
2425 gives some examples of signed LEB128\addtoindexx{LEB128!signed}
2428 \textit{Appendix \refersec{app:variablelengthdataencodingdecodinginformative}
2429 \addtoindexx{LEB128!examples}
2430 gives algorithms for encoding and decoding these forms.}
2434 \setlength{\extrarowheight}{0.1cm}
2435 \begin{longtable}{c|c|c}
2436 \caption{Examples of unsigned LEB128 encodings}
2437 \label{tab:examplesofunsignedleb128encodings}
2438 \addtoindexx{LEB128 encoding!examples}\addtoindexx{LEB128!unsigned} \\
2439 \hline \bfseries Number&\bfseries First byte &\bfseries Second byte \\ \hline
2441 \bfseries Number&\bfseries First Byte &\bfseries Second byte\\ \hline
2443 \hline \emph{Continued on next page}
2449 128& 0 + 0x80 & 1 \\
2450 129& 1 + 0x80 & 1 \\
2451 %130& 2 + 0x80 & 1 \\
2452 12857& 57 + 0x80 & 100 \\
2459 \setlength{\extrarowheight}{0.1cm}
2460 \begin{longtable}{c|c|c}
2461 \caption{Examples of signed LEB128 encodings}
2462 \label{tab:examplesofsignedleb128encodings}
2463 \addtoindexx{LEB128!signed} \\
2464 \hline \bfseries Number&\bfseries First byte &\bfseries Second byte \\ \hline
2466 \bfseries Number&\bfseries First Byte &\bfseries Second byte\\ \hline
2468 \hline \emph{Continued on next page}
2474 127& 127 + 0x80 & 0 \\
2475 -127& 1 + 0x80 & 0x7f \\
2476 128& 0 + 0x80 & 1 \\
2477 -128& 0 + 0x80 & 0x7f \\
2478 129& 1 + 0x80 & 1 \\
2479 -129& 0x7f + 0x80 & 0x7e \\
2486 \section{DWARF Expressions and Location Descriptions}
2487 \label{datarep:dwarfexpressionsandlocationdescriptions}
2488 \subsection{DWARF Expressions}
2489 \label{datarep:dwarfexpressions}
2492 \addtoindexx{DWARF expression!operator encoding}
2493 DWARF expression is stored in a \nolink{block} of contiguous
2494 bytes. The bytes form a sequence of operations. Each operation
2495 is a 1-byte code that identifies that operation, followed by
2496 zero or more bytes of additional data. The encodings for the
2497 operations are described in
2498 Table \refersec{tab:dwarfoperationencodings}.
2501 \setlength{\extrarowheight}{0.1cm}
2502 \begin{longtable}{l|c|c|l}
2503 \caption{DWARF operation encodings} \label{tab:dwarfoperationencodings} \\
2504 \hline & &\bfseries No. of &\\
2505 \bfseries Operation&\bfseries Code &\bfseries Operands &\bfseries Notes\\ \hline
2507 & &\bfseries No. of &\\
2508 \bfseries Operation&\bfseries Code &\bfseries Operands &\bfseries Notes\\ \hline
2510 \hline \emph{Continued on next page}
2512 \hline \ddag\ \textit{New in DWARF Version 5}
2515 \bbeb\textit{Reserved}&0x01&-& \\
2516 \bbeb\textit{Reserved}&0x02&-& \\
2517 \DWOPaddr&0x03&1 & constant address \\
2518 & & &(size is target specific) \\
2519 \bbeb\textit{Reserved}&0x04&-& \\
2520 \bbeb\textit{Reserved}&0x05&-& \\
2521 \DWOPderef&0x06&0 & \\
2522 \bbeb\textit{Reserved}&0x07&-& \\
2523 \DWOPconstoneu&0x08&1&1-byte constant \\
2524 \DWOPconstones&0x09&1&1-byte constant \\
2525 \DWOPconsttwou&0x0a&1&2-byte constant \\
2526 \DWOPconsttwos&0x0b&1&2-byte constant \\
2527 \DWOPconstfouru&0x0c&1&4-byte constant \\
2528 \DWOPconstfours&0x0d&1&4-byte constant \\
2529 \DWOPconsteightu&0x0e&1&8-byte constant \\
2530 \DWOPconsteights&0x0f&1&8-byte constant \\
2531 \DWOPconstu&0x10&1&ULEB128 constant \\
2532 \DWOPconsts&0x11&1&SLEB128 constant \\
2533 \DWOPdup&0x12&0 & \\
2534 \DWOPdrop&0x13&0 & \\
2535 \DWOPover&0x14&0 & \\
2536 \DWOPpick&0x15&1&1-byte stack index \\
2537 \DWOPswap&0x16&0 & \\
2538 \DWOProt&0x17&0 & \\
2539 \DWOPxderef&0x18&0 & \\
2540 \DWOPabs&0x19&0 & \\
2541 \DWOPand&0x1a&0 & \\
2542 \DWOPdiv&0x1b&0 & \\
2543 \DWOPminus&0x1c&0 & \\
2544 \DWOPmod&0x1d&0 & \\
2545 \DWOPmul&0x1e&0 & \\
2546 \DWOPneg&0x1f&0 & \\
2547 \DWOPnot&0x20&0 & \\
2549 \DWOPplus&0x22&0 & \\
2550 \DWOPplusuconst&0x23&1&ULEB128 addend \\
2551 \DWOPshl&0x24&0 & \\
2552 \DWOPshr&0x25&0 & \\
2553 \DWOPshra&0x26&0 & \\
2554 \DWOPxor&0x27&0 & \\
2556 \DWOPbra&0x28&1 & signed 2-byte constant \\
2563 \DWOPskip&0x2f&1&signed 2-byte constant \\ \hline
2565 \DWOPlitzero & 0x30 & 0 & \\
2566 \DWOPlitone & 0x31 & 0& literals 0 .. 31 = \\
2567 \ldots & & &\hspace{0.3cm}(\DWOPlitzero{} + literal) \\
2568 \DWOPlitthirtyone & 0x4f & 0 & \\ \hline
2570 \DWOPregzero & 0x50 & 0 & \\*
2571 \DWOPregone & 0x51 & 0® 0 .. 31 = \\*
2572 \ldots & & &\hspace{0.3cm}(\DWOPregzero{} + regnum) \\*
2573 \DWOPregthirtyone & 0x6f & 0 & \\ \hline
2575 \DWOPbregzero & 0x70 &1 & SLEB128 offset \\*
2576 \DWOPbregone & 0x71 & 1 &base register 0 .. 31 = \\*
2577 ... & & &\hspace{0.3cm}(\DWOPbregzero{} + regnum) \\*
2578 \DWOPbregthirtyone & 0x8f & 1 & \\ \hline
2580 \DWOPregx{} & 0x90 &1&ULEB128 register \\
2581 \DWOPfbreg{} & 0x91&1&SLEB128 offset \\
2582 \DWOPbregx{} & 0x92&2 &ULEB128 register, \\*
2583 & & &SLEB128 offset \\
2584 \DWOPpiece{} & 0x93 &1& ULEB128 size of piece \\
2585 \DWOPderefsize{} & 0x94 &1& 1-byte size of data retrieved \\
2586 \DWOPxderefsize{} & 0x95&1&1-byte size of data retrieved \\
2587 \DWOPnop{} & 0x96 &0& \\
2589 \DWOPpushobjectaddress&0x97&0 & \\
2590 \DWOPcalltwo&0x98&1& 2-byte offset of DIE \\
2591 \DWOPcallfour&0x99&1& 4-byte offset of DIE \\
2592 \DWOPcallref&0x9a&1& 4\dash\ or 8-byte offset of DIE \\
2593 \DWOPformtlsaddress&0x9b &0& \\
2594 \DWOPcallframecfa{} &0x9c &0& \\
2595 \DWOPbitpiece&0x9d &2&ULEB128 size, \\*
2597 \DWOPimplicitvalue{} &0x9e &2&ULEB128 size, \\*
2598 &&&\nolink{block} of that size\\
2599 \DWOPstackvalue{} &0x9f &0& \\
2600 \DWOPimplicitpointer{}~\ddag &0xa0& 2 &4- or 8-byte offset of DIE, \\*
2601 &&&SLEB128 constant offset \\
2602 \DWOPaddrx~\ddag&0xa1&1&ULEB128 indirect address \\
2603 \DWOPconstx~\ddag&0xa2&1&ULEB128 indirect constant \\
2604 \DWOPentryvalue~\ddag&0xa3&2&ULEB128 size, \\*
2605 &&&\nolink{block} of that size\\
2606 \DWOPconsttype~\ddag & 0xa4 & 3 & ULEB128 type entry offset,\\*
2607 & & & 1-byte size, \\*
2608 & & & constant value \\
2609 \DWOPregvaltype~\ddag & 0xa5 & 2 & ULEB128 register number, \\*
2610 &&& ULEB128 constant offset \\
2611 \DWOPdereftype~\ddag & 0xa6 & 2 & 1-byte size, \\*
2612 &&& ULEB128 type entry offset \\
2613 \DWOPxdereftype~\ddag & 0xa7 & 2 & 1-byte size, \\*
2614 &&& ULEB128 type entry offset \\
2615 \DWOPconvert~\ddag & 0xa8 & 1 & ULEB128 type entry offset \\
2616 \DWOPreinterpret~\ddag & 0xa9 & 1 & ULEB128 type entry offset \\
2617 \DWOPlouser{} &0xe0 && \\
2618 \DWOPhiuser{} &\xff && \\
2624 \subsection{Location Descriptions}
2625 \label{datarep:locationdescriptions}
2627 A location description is used to compute the
2628 location of a variable or other entity.
2630 \subsection{Location Lists}
2631 \label{datarep:locationlists}
2632 Each entry in a \addtoindex{location list} is either a location list entry,
2633 a base address entry, a default location entry or an
2634 \addtoindexx{end-of-list entry!in location list}
2637 Each entry begins with an unsigned 1-byte code that indicates the kind of entry
2638 that follows. The encodings for these constants are given in
2639 Table \ref{tab:locationlistentryencodingvalues}.
2643 \setlength{\extrarowheight}{0.1cm}
2644 \begin{longtable}{l|c}
2645 \caption{Location list entry encoding values}
2646 \label{tab:locationlistentryencodingvalues} \\
2647 \hline \bfseries Location list entry encoding name&\bfseries Value \\ \hline
2649 \bfseries Location list entry encoding name&\bfseries Value\\ \hline
2651 \hline \emph{Continued on next page}
2654 \ddag New in \DWARFVersionV
2656 \DWLLEendoflist~\ddag & 0x00 \\
2657 \DWLLEbaseaddressx~\ddag & 0x01 \\
2658 \DWLLEstartxendx~\ddag & 0x02 \\
2659 \DWLLEstartxlength~\ddag & 0x03 \\
2660 \DWLLEoffsetpair~\ddag & 0x04 \\
2661 \DWLLEdefaultlocation~\ddag & 0x05 \\
2662 \DWLLEbaseaddress~\ddag & 0x06 \\
2663 \DWLLEstartend~\ddag & 0x07 \\
2664 \DWLLEstartlength~\ddag & 0x08 \\
2668 \section{Base Type Attribute Encodings}
2669 \label{datarep:basetypeattributeencodings}
2671 The\hypertarget{chap:DWATencodingencodingofbasetype}{}
2672 encodings of the constants used in the
2673 \DWATencodingDEFN{} attribute\addtoindexx{encoding attribute}
2675 Table \refersec{tab:basetypeencodingvalues}
2678 \setlength{\extrarowheight}{0.1cm}
2679 \begin{longtable}{l|c}
2680 \caption{Base type encoding values} \label{tab:basetypeencodingvalues} \\
2681 \hline \bfseries Base type encoding name&\bfseries Value \\ \hline
2683 \bfseries Base type encoding name&\bfseries Value\\ \hline
2685 \hline \emph{Continued on next page}
2688 \ddag \ \textit{New in \DWARFVersionV}
2690 \DWATEaddress&0x01 \\
2691 \DWATEboolean&0x02 \\
2692 \DWATEcomplexfloat&0x03 \\
2694 \DWATEsigned&0x05 \\
2695 \DWATEsignedchar&0x06 \\
2696 \DWATEunsigned&0x07 \\
2697 \DWATEunsignedchar&0x08 \\
2698 \DWATEimaginaryfloat&0x09 \\
2699 \DWATEpackeddecimal&0x0a \\
2700 \DWATEnumericstring&0x0b \\
2701 \DWATEedited&0x0c \\
2702 \DWATEsignedfixed&0x0d \\
2703 \DWATEunsignedfixed&0x0e \\
2704 \DWATEdecimalfloat & 0x0f \\
2705 \DWATEUTF{} & 0x10 \\
2706 \DWATEUCS~\ddag & 0x11 \\
2707 \DWATEASCII~\ddag & 0x12 \\
2708 \DWATElouser{} & 0x80 \\
2709 \DWATEhiuser{} & \xff \\
2714 The encodings of the constants used in the
2715 \DWATdecimalsign{} attribute
2717 Table \refersec{tab:decimalsignencodings}.
2720 \setlength{\extrarowheight}{0.1cm}
2721 \begin{longtable}{l|c}
2722 \caption{Decimal sign encodings} \label{tab:decimalsignencodings} \\
2723 \hline \bfseries Decimal sign code name&\bfseries Value \\ \hline
2725 \bfseries Decimal sign code name&\bfseries Value\\ \hline
2727 % \hline \emph{Continued on next page}
2731 \DWDSunsigned{} & 0x01 \\
2732 \DWDSleadingoverpunch{} & 0x02 \\
2733 \DWDStrailingoverpunch{} & 0x03 \\
2734 \DWDSleadingseparate{} & 0x04 \\
2735 \DWDStrailingseparate{} & 0x05 \\
2740 The encodings of the constants used in the
2741 \DWATendianity{} attribute are given in
2742 Table \refersec{tab:endianityencodings}.
2745 \setlength{\extrarowheight}{0.1cm}
2746 \begin{longtable}{l|c}
2747 \caption{Endianity encodings} \label{tab:endianityencodings}\\
2748 \hline \bfseries Endian code name&\bfseries Value \\ \hline
2750 \bfseries Endian code name&\bfseries Value\\ \hline
2752 \hline \emph{Continued on next page}
2757 \DWENDdefault{} & 0x00 \\
2758 \DWENDbig{} & 0x01 \\
2759 \DWENDlittle{} & 0x02 \\
2760 \DWENDlouser{} & 0x40 \\
2761 \DWENDhiuser{} & \xff \\
2767 \section{Accessibility Codes}
2768 \label{datarep:accessibilitycodes}
2769 The encodings of the constants used in the
2770 \DWATaccessibility{}
2772 \addtoindexx{accessibility attribute}
2774 Table \refersec{tab:accessibilityencodings}.
2777 \setlength{\extrarowheight}{0.1cm}
2778 \begin{longtable}{l|c}
2779 \caption{Accessibility encodings} \label{tab:accessibilityencodings}\\
2780 \hline \bfseries Accessibility code name&\bfseries Value \\ \hline
2782 \bfseries Accessibility code name&\bfseries Value\\ \hline
2784 \hline \emph{Continued on next page}
2789 \DWACCESSpublic&0x01 \\
2790 \DWACCESSprotected&0x02 \\
2791 \DWACCESSprivate&0x03 \\
2797 \section{Visibility Codes}
2798 \label{datarep:visibilitycodes}
2799 The encodings of the constants used in the
2800 \DWATvisibility{} attribute are given in
2801 Table \refersec{tab:visibilityencodings}.
2804 \setlength{\extrarowheight}{0.1cm}
2805 \begin{longtable}{l|c}
2806 \caption{Visibility encodings} \label{tab:visibilityencodings}\\
2807 \hline \bfseries Visibility code name&\bfseries Value \\ \hline
2809 \bfseries Visibility code name&\bfseries Value\\ \hline
2811 \hline \emph{Continued on next page}
2817 \DWVISexported&0x02 \\
2818 \DWVISqualified&0x03 \\
2823 \section{Virtuality Codes}
2824 \label{datarep:vitualitycodes}
2826 The encodings of the constants used in the
2827 \DWATvirtuality{} attribute are given in
2828 Table \refersec{tab:virtualityencodings}.
2831 \setlength{\extrarowheight}{0.1cm}
2832 \begin{longtable}{l|c}
2833 \caption{Virtuality encodings} \label{tab:virtualityencodings}\\
2834 \hline \bfseries Virtuality code name&\bfseries Value \\ \hline
2836 \bfseries Virtuality code name&\bfseries Value\\ \hline
2838 \hline \emph{Continued on next page}
2843 \DWVIRTUALITYnone&0x00 \\
2844 \DWVIRTUALITYvirtual&0x01 \\
2845 \DWVIRTUALITYpurevirtual&0x02 \\
2852 \DWVIRTUALITYnone{} is equivalent to the absence of the
2856 \section{Source Languages}
2857 \label{datarep:sourcelanguages}
2859 The encodings of the constants used
2860 \addtoindexx{language attribute, encoding}
2862 \addtoindexx{language name encoding}
2865 attribute are given in
2866 Table \refersec{tab:languageencodings}.
2868 % If we don't force a following space it looks odd
2870 and their associated values are reserved, but the
2871 languages they represent are not well supported.
2872 Table \refersec{tab:languageencodings}
2874 \addtoindexx{lower bound attribute!default}
2875 default lower bound, if any, assumed for
2876 an omitted \DWATlowerbound{} attribute in the context of a
2877 \DWTAGsubrangetype{} debugging information entry for each
2881 \setlength{\extrarowheight}{0.1cm}
2882 \begin{longtable}{l|c|c}
2883 \caption{Language encodings} \label{tab:languageencodings}\\
2884 \hline \bfseries Language name&\bfseries Value &\bfseries Default Lower Bound \\ \hline
2886 \bfseries Language name&\bfseries Value &\bfseries Default Lower Bound\\ \hline
2888 \hline \emph{Continued on next page}
2891 \dag \ \textit{See text} \\ \ddag \ \textit{New in \DWARFVersionV}
2893 \addtoindexx{ISO-defined language names}
2895 \DWLANGCeightynine &0x0001 &0 \addtoindexx{C:1989 (ISO)} \\
2896 \DWLANGC{} &0x0002 &0 \addtoindexx{C!non-standard} \\
2897 \DWLANGAdaeightythree{} \dag &0x0003 &1 \addtoindexx{Ada:1983 (ISO)} \\
2898 \DWLANGCplusplus{} &0x0004 &0 \addtoindexx{C++98 (ISO)} \\
2899 \DWLANGCobolseventyfour{} \dag &0x0005 &1 \addtoindexx{COBOL:1974 (ISO)} \\
2900 \DWLANGCoboleightyfive{} \dag &0x0006 &1 \addtoindexx{COBOL:1985 (ISO)} \\
2901 \DWLANGFortranseventyseven &0x0007 &1 \addtoindexx{FORTRAN:1977 (ISO)} \\
2902 \DWLANGFortranninety &0x0008 &1 \addtoindexx{Fortran:1990 (ISO)} \\
2903 \DWLANGPascaleightythree &0x0009 &1 \addtoindexx{Pascal:1983 (ISO)} \\
2904 \DWLANGModulatwo &0x000a &1 \addtoindexx{Modula-2:1996 (ISO)} \\
2905 \DWLANGJava &0x000b &0 \addtoindexx{Java} \\
2906 \DWLANGCninetynine &0x000c &0 \addtoindexx{C:1999 (ISO)} \\
2907 \DWLANGAdaninetyfive{} \dag &0x000d &1 \addtoindexx{Ada:1995 (ISO)} \\
2908 \DWLANGFortranninetyfive &0x000e &1 \addtoindexx{Fortran:1995 (ISO)} \\
2909 \DWLANGPLI{} \dag &0x000f &1 \addtoindexx{PL/I:1976 (ANSI)}\\
2910 \DWLANGObjC{} &0x0010 &0 \addtoindexx{Objective C}\\
2911 \DWLANGObjCplusplus{} &0x0011 &0 \addtoindexx{Objective C++}\\
2912 \DWLANGUPC{} &0x0012 &0 \addtoindexx{UPC}\\
2913 \DWLANGD{} &0x0013 &0 \addtoindexx{D language}\\
2914 \DWLANGPython{} \dag &0x0014 &0 \addtoindexx{Python}\\
2915 \DWLANGOpenCL{} \dag \ddag &0x0015 &0 \addtoindexx{OpenCL}\\
2916 \DWLANGGo{} \dag \ddag &0x0016 &0 \addtoindexx{Go}\\
2917 \DWLANGModulathree{} \dag \ddag &0x0017 &1 \addtoindexx{Modula-3}\\
2918 \DWLANGHaskell{} \dag \ddag &0x0018 &0 \addtoindexx{Haskell}\\
2919 \DWLANGCpluspluszerothree{} \ddag &0x0019 &0 \addtoindexx{C++03 (ISO)}\\
2920 \DWLANGCpluspluseleven{} \ddag &0x001a &0 \addtoindexx{C++11 (ISO)} \\
2921 \DWLANGOCaml{} \ddag &0x001b &0 \addtoindexx{OCaml}\\
2922 \DWLANGRust{} \ddag &0x001c &0 \addtoindexx{Rust}\\
2923 \DWLANGCeleven{} \ddag &0x001d &0 \addtoindexx{C:2011 (ISO)}\\
2924 \DWLANGSwift{} \ddag &0x001e &0 \addtoindexx{Swift} \\
2925 \DWLANGJulia{} \ddag &0x001f &1 \addtoindexx{Julia} \\
2926 \DWLANGDylan{} \ddag &0x0020 &0 \addtoindexx{Dylan} \\
2927 \DWLANGCplusplusfourteen{}~\ddag &0x0021 &0 \addtoindexx{C++14 (ISO)} \\
2928 \DWLANGFortranzerothree{}~\ddag &0x0022 &1 \addtoindexx{Fortran:2004 (ISO)} \\
2929 \DWLANGFortranzeroeight{}~\ddag &0x0023 &1 \addtoindexx{Fortran:2010 (ISO)} \\
2930 \DWLANGRenderScript{}~\ddag &0x0024 &0 \addtoindexx{RenderScript Kernel Language} \\
2932 \DWLANGBLISS{} \ddag &0x0025 &0 \addtoindexx{BLISS}
2935 \DWLANGlouser{} &0x8000 & \\
2936 \DWLANGhiuser{} &\xffff & \\
2941 \section{Address Class Encodings}
2942 \label{datarep:addressclassencodings}
2944 The value of the common
2945 \addtoindex{address class} encoding
2949 \section{Identifier Case}
2950 \label{datarep:identifiercase}
2952 The encodings of the constants used in the
2953 \DWATidentifiercase{} attribute are given in
2954 Table \refersec{tab:identifiercaseencodings}.
2958 \setlength{\extrarowheight}{0.1cm}
2959 \begin{longtable}{l|c}
2960 \caption{Identifier case encodings} \label{tab:identifiercaseencodings}\\
2961 \hline \bfseries Identifier case name&\bfseries Value \\ \hline
2963 \bfseries Identifier case name&\bfseries Value\\ \hline
2965 \hline \emph{Continued on next page}
2969 \DWIDcasesensitive&0x00 \\
2971 \DWIDdowncase&0x02 \\
2972 \DWIDcaseinsensitive&0x03 \\
2977 \section{Calling Convention Encodings}
2978 \label{datarep:callingconventionencodings}
2979 The encodings of the constants used in the
2980 \DWATcallingconvention{} attribute are given in
2981 Table \refersec{tab:callingconventionencodings}.
2984 \setlength{\extrarowheight}{0.1cm}
2985 \begin{longtable}{l|c}
2986 \caption{Calling convention encodings} \label{tab:callingconventionencodings}\\
2987 \hline \bfseries Calling convention name&\bfseries Value \\ \hline
2989 \bfseries Calling convention name&\bfseries Value\\ \hline
2991 \hline \emph{Continued on next page}
2993 \hline \ddag\ \textit{New in DWARF Version 5}
2996 \DWCCnormal &0x01 \\
2997 \DWCCprogram&0x02 \\
2998 \DWCCnocall &0x03 \\
2999 \DWCCpassbyreference~\ddag &0x04 \\
3000 \DWCCpassbyvalue~\ddag &0x05 \\
3001 \DWCClouser &0x40 \\
3008 \section{Inline Codes}
3009 \label{datarep:inlinecodes}
3011 The encodings of the constants used in
3012 \addtoindexx{inline attribute}
3014 \DWATinline{} attribute are given in
3015 Table \refersec{tab:inlineencodings}.
3019 \setlength{\extrarowheight}{0.1cm}
3020 \begin{longtable}{l|c}
3021 \caption{Inline encodings} \label{tab:inlineencodings}\\
3022 \hline \bfseries Inline code name&\bfseries Value \\ \hline
3024 \bfseries Inline Code name&\bfseries Value\\ \hline
3026 \hline \emph{Continued on next page}
3031 \DWINLnotinlined&0x00 \\
3032 \DWINLinlined&0x01 \\
3033 \DWINLdeclarednotinlined&0x02 \\
3034 \DWINLdeclaredinlined&0x03 \\
3039 % this clearpage is ugly, but the following table came
3040 % out oddly without it.
3043 \section{Array Ordering}
3044 \label{datarep:arrayordering}
3046 The encodings of the constants used in the
3047 \DWATordering{} attribute are given in
3048 Table \refersec{tab:orderingencodings}.
3052 \setlength{\extrarowheight}{0.1cm}
3053 \begin{longtable}{l|c}
3054 \caption{Ordering encodings} \label{tab:orderingencodings}\\
3055 \hline \bfseries Ordering name&\bfseries Value \\ \hline
3057 \bfseries Ordering name&\bfseries Value\\ \hline
3059 \hline \emph{Continued on next page}
3064 \DWORDrowmajor&0x00 \\
3065 \DWORDcolmajor&0x01 \\
3071 \section{Discriminant Lists}
3072 \label{datarep:discriminantlists}
3074 The descriptors used in
3075 \addtoindexx{discriminant list attribute}
3077 \DWATdiscrlist{} attribute are
3078 encoded as 1-byte constants. The
3079 defined values are given in
3080 Table \refersec{tab:discriminantdescriptorencodings}.
3082 % Odd that the 'Name' field capitalized here, it is not caps elsewhere.
3084 \setlength{\extrarowheight}{0.1cm}
3085 \begin{longtable}{l|c}
3086 \caption{Discriminant descriptor encodings} \label{tab:discriminantdescriptorencodings}\\
3087 \hline \bfseries Descriptor name&\bfseries Value \\ \hline
3089 \bfseries Descriptor name&\bfseries Value\\ \hline
3091 \hline \emph{Continued on next page}
3103 \section{Name Index Table}
3104 \label{datarep:nameindextable}
3105 The \addtoindexi{version number}{version number!name index table}
3106 in the name index table header is \versiondotdebugnames{}.
3108 The name index attributes and their encodings are listed in Table \refersec{datarep:indexattributeencodings}.
3112 \setlength{\extrarowheight}{0.1cm}
3113 \begin{longtable}{l|c|l}
3114 \caption{Name index attribute encodings} \label{datarep:indexattributeencodings}\\
3115 \hline \bfseries Attribute name &\bfseries Value &\bfseries Form/Class \\ \hline
3117 \bfseries Attribute name &\bfseries Value &\bfseries Form/Class \\ \hline
3119 \hline \emph{Continued on next page}
3122 \ddag~\textit{New in \DWARFVersionV}
3124 \DWIDXcompileunit~\ddag & 1 & \CLASSconstant \\
3125 \DWIDXtypeunit~\ddag & 2 & \CLASSconstant \\
3126 \DWIDXdieoffset~\ddag & 3 & \CLASSreference \\
3127 \DWIDXparent~\ddag & 4 & \CLASSconstant \\
3128 \DWIDXtypehash~\ddag & 5 & \DWFORMdataeight \\
3129 \DWIDXlouser~\ddag & 0x2000 & \\
3130 \DWIDXhiuser~\ddag & \xiiifff & \\
3134 The abbreviations table ends with an entry consisting of a single 0
3135 byte for the abbreviation code. The size of the table given by
3136 \texttt{abbrev\_table\_size} may include optional padding following the
3139 \section{Defaulted Member Encodings}
3140 \hypertarget{datarep:defaultedmemberencodings}{}
3142 The encodings of the constants used in the \DWATdefaulted{} attribute
3143 are given in Table \referfol{datarep:defaultedattributeencodings}.
3146 \setlength{\extrarowheight}{0.1cm}
3147 \begin{longtable}{l|c}
3148 \caption{Defaulted attribute encodings} \label{datarep:defaultedattributeencodings} \\
3149 \hline \bfseries Defaulted name &\bfseries Value \\ \hline
3151 \bfseries Defaulted name &\bfseries Value \\ \hline
3153 \hline \emph{Continued on next page}
3156 \ddag~\textit{New in \DWARFVersionV}
3158 \DWDEFAULTEDno~\ddag & 0x00 \\
3159 \DWDEFAULTEDinclass~\ddag & 0x01 \\
3160 \DWDEFAULTEDoutofclass~\ddag & 0x02 \\
3165 \section{Address Range Table}
3166 \label{datarep:addrssrangetable}
3168 Each set of entries in the table of address ranges contained
3169 in the \dotdebugaranges{}
3170 section begins with a header containing:
3171 \begin{enumerate}[1. ]
3172 % FIXME The unit length text is not fully consistent across
3175 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
3176 \addttindexx{unit\_length}
3177 A 4-byte or 12-byte length containing the length of the
3178 \addtoindexx{initial length}
3179 set of entries for this compilation unit, not including the
3180 length field itself. In the \thirtytwobitdwarfformat, this is a
3181 4-byte unsigned integer (which must be less than \xfffffffzero);
3182 in the \sixtyfourbitdwarfformat, this consists of the 4-byte value
3183 \wffffffff followed by an 8-byte unsigned integer that gives
3185 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
3187 \item version (\HFTuhalf) \\
3188 A 2-byte version identifier representing the version of the
3189 DWARF information for the address range table.
3191 This value in this field \addtoindexx{version number!address range table} is 2.
3193 \item debug\_info\_offset (\livelink{datarep:sectionoffsetlength}{section offset}) \\
3195 \addtoindexx{section offset!in .debug\_aranges header}
3196 4-byte or 8-byte offset into the
3197 \dotdebuginfo{} section of
3198 the compilation unit header. In the \thirtytwobitdwarfformat,
3199 this is a 4-byte unsigned offset; in the \sixtyfourbitdwarfformat,
3200 this is an 8-byte unsigned offset
3201 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
3203 \item \texttt{address\_size} (\HFTubyte) \\
3204 A 1-byte unsigned integer containing the size in bytes of an
3205 \addttindexx{address\_size}
3207 \addtoindexx{size of an address}
3208 (or the offset portion of an address for segmented
3209 \addtoindexx{address space!segmented}
3210 addressing) on the target system.
3212 \item \HFNsegmentselectorsize{} (\HFTubyte) \\
3213 A 1-byte unsigned integer containing the size in bytes of a
3214 segment selector on the target system.
3218 This header is followed by a series of tuples. Each tuple
3219 consists of a segment, an address and a length.
3220 The segment selector
3221 size is given by the \HFNsegmentselectorsize{} field of the header; the
3222 address and length size are each given by the \addttindex{address\_size}
3223 field of the header.
3224 The first tuple following the header in
3225 each set begins at an offset that is a multiple of the size
3226 of a single tuple (that is, the size of a segment selector
3227 plus twice the \addtoindex{size of an address}).
3228 The header is padded, if
3229 necessary, to that boundary. Each set of tuples is terminated
3230 by a 0 for the segment, a 0 for the address and 0 for the
3231 length. If the \HFNsegmentselectorsize{} field in the header is zero,
3232 the segment selectors are omitted from all tuples, including
3233 the terminating tuple.
3236 \section{Line Number Information}
3237 \label{datarep:linenumberinformation}
3239 The \addtoindexi{version number}{version number!line number information}
3240 in the line number program header is \versiondotdebugline{}.
3242 The boolean values \doublequote{true} and \doublequote{false}
3243 used by the line number information program are encoded
3244 as a single byte containing the value 0
3245 for \doublequote{false,} and a non-zero value for \doublequote{true.}
3248 The encodings for the standard opcodes are given in
3249 \addtoindexx{line number opcodes!standard opcode encoding}
3250 Table \refersec{tab:linenumberstandardopcodeencodings}.
3253 \setlength{\extrarowheight}{0.1cm}
3254 \begin{longtable}{l|c}
3255 \caption{Line number standard opcode encodings} \label{tab:linenumberstandardopcodeencodings}\\
3256 \hline \bfseries Opcode name&\bfseries Value \\ \hline
3258 \bfseries Opcode name&\bfseries Value\\ \hline
3260 \hline \emph{Continued on next page}
3266 \DWLNSadvancepc&0x02 \\
3267 \DWLNSadvanceline&0x03 \\
3268 \DWLNSsetfile&0x04 \\
3269 \DWLNSsetcolumn&0x05 \\
3270 \DWLNSnegatestmt&0x06 \\
3271 \DWLNSsetbasicblock&0x07 \\
3272 \DWLNSconstaddpc&0x08 \\
3273 \DWLNSfixedadvancepc&0x09 \\
3274 \DWLNSsetprologueend&0x0a \\*
3275 \DWLNSsetepiloguebegin&0x0b \\*
3276 \DWLNSsetisa&0x0c \\*
3282 The encodings for the extended opcodes are given in
3283 \addtoindexx{line number opcodes!extended opcode encoding}
3284 Table \refersec{tab:linenumberextendedopcodeencodings}.
3287 \setlength{\extrarowheight}{0.1cm}
3288 \begin{longtable}{l|c}
3289 \caption{Line number extended opcode encodings} \label{tab:linenumberextendedopcodeencodings}\\
3290 \hline \bfseries Opcode name&\bfseries Value \\ \hline
3292 \bfseries Opcode name&\bfseries Value\\ \hline
3294 \hline \emph{Continued on next page}
3296 \hline %\ddag~\textit{New in DWARF Version 5}
3299 \DWLNEendsequence &0x01 \\
3300 \DWLNEsetaddress &0x02 \\
3301 \textit{Reserved} &0x03\footnote{Code 0x03 is reserved to allow backward compatible support of the
3302 DW\_LNE\_define\_file operation which was defined in \DWARFVersionIV{}
3304 \DWLNEsetdiscriminator &0x04 \\
3305 \DWLNElouser &0x80 \\
3306 \DWLNEhiuser &\xff \\
3312 The encodings for the line number header entry formats are given in
3313 \addtoindexx{line number opcodes!file entry format encoding}
3314 Table \refersec{tab:linenumberheaderentryformatencodings}.
3317 \setlength{\extrarowheight}{0.1cm}
3318 \begin{longtable}{l|c}
3319 \caption{Line number header entry format \mbox{encodings}} \label{tab:linenumberheaderentryformatencodings}\\
3320 \hline \bfseries Line number header entry format name&\bfseries Value \\ \hline
3322 \bfseries Line number header entry format name&\bfseries Value\\ \hline
3324 \hline \emph{Continued on next page}
3326 \hline \ddag~\textit{New in DWARF Version 5}
3328 \DWLNCTpath~\ddag & 0x1 \\
3329 \DWLNCTdirectoryindex~\ddag & 0x2 \\
3330 \DWLNCTtimestamp~\ddag & 0x3 \\
3331 \DWLNCTsize~\ddag & 0x4 \\
3332 \DWLNCTMDfive~\ddag & 0x5 \\
3333 \DWLNCTlouser~\ddag & 0x2000 \\
3334 \DWLNCThiuser~\ddag & \xiiifff \\
3339 \section{Macro Information}
3340 \label{datarep:macroinformation}
3341 The \addtoindexi{version number}{version number!macro information}
3342 in the macro information header is \versiondotdebugmacro{}.
3344 The source line numbers and source file indices encoded in the
3345 macro information section are represented as
3346 unsigned LEB128\addtoindexx{LEB128!unsigned} numbers.
3349 The macro information entry type is encoded as a single unsigned byte.
3351 \addtoindexx{macro information entry types!encoding}
3353 Table \refersec{tab:macroinfoentrytypeencodings}.
3357 \setlength{\extrarowheight}{0.1cm}
3358 \begin{longtable}{l|c}
3359 \caption{Macro information entry type encodings} \label{tab:macroinfoentrytypeencodings}\\
3360 \hline \bfseries Macro information entry type name&\bfseries Value \\ \hline
3362 \bfseries Macro information entry type name&\bfseries Value\\ \hline
3364 \hline \emph{Continued on next page}
3366 \hline \ddag~\textit{New in DWARF Version 5}
3369 \DWMACROdefine~\ddag &0x01 \\
3370 \DWMACROundef~\ddag &0x02 \\
3371 \DWMACROstartfile~\ddag &0x03 \\
3372 \DWMACROendfile~\ddag &0x04 \\
3373 \DWMACROdefinestrp~\ddag &0x05 \\
3374 \DWMACROundefstrp~\ddag &0x06 \\
3375 \DWMACROimport~\ddag &0x07 \\
3376 \DWMACROdefinesup~\ddag &0x08 \\
3377 \DWMACROundefsup~\ddag &0x09 \\
3378 \DWMACROimportsup~\ddag &0x0a \\
3379 \DWMACROdefinestrx~\ddag &0x0b \\
3380 \DWMACROundefstrx~\ddag &0x0c \\
3381 \DWMACROlouser~\ddag &0xe0 \\
3382 \DWMACROhiuser~\ddag &\xff \\
3388 \section{Call Frame Information}
3389 \label{datarep:callframeinformation}
3391 In the \thirtytwobitdwarfformat, the value of the CIE id in the
3392 CIE header is \xffffffff; in the \sixtyfourbitdwarfformat, the
3393 value is \xffffffffffffffff.
3395 The value of the CIE \addtoindexi{version number}{version number!call frame information}
3396 is \versiondotdebugframe.
3398 Call frame instructions are encoded in one or more bytes. The
3399 primary opcode is encoded in the high order two bits of
3400 the first byte (that is, opcode = byte $\gg$ 6). An operand
3401 or extended opcode may be encoded in the low order 6
3402 bits. Additional operands are encoded in subsequent bytes.
3403 The instructions and their encodings are presented in
3404 Table \refersec{tab:callframeinstructionencodings}.
3407 \setlength{\extrarowheight}{0.1cm}
3408 \begin{longtable}{l|c|c|l|l}
3409 \caption{Call frame instruction encodings} \label{tab:callframeinstructionencodings} \\
3410 \hline &\bfseries High 2 &\bfseries Low 6 & & \\
3411 \bfseries Instruction&\bfseries Bits &\bfseries Bits &\bfseries Operand 1 &\bfseries Operand 2\\ \hline
3413 & \bfseries High 2 &\bfseries Low 6 & &\\
3414 \bfseries Instruction&\bfseries Bits &\bfseries Bits &\bfseries Operand 1 &\bfseries Operand 2\\ \hline
3416 \hline \emph{Continued on next page}
3421 \DWCFAadvanceloc&0x1&delta & \\
3422 \DWCFAoffset&0x2®ister&ULEB128 offset \\
3423 \DWCFArestore&0x3®ister & & \\
3424 \DWCFAnop&0&0 & & \\
3425 \DWCFAsetloc&0&0x01&address & \\
3426 \DWCFAadvancelocone&0&0x02&1-byte delta & \\
3427 \DWCFAadvanceloctwo&0&0x03&2-byte delta & \\
3428 \DWCFAadvancelocfour&0&0x04&4-byte delta & \\
3429 \DWCFAoffsetextended&0&0x05&ULEB128 register&ULEB128 offset \\
3430 \DWCFArestoreextended&0&0x06&ULEB128 register & \\
3431 \DWCFAundefined&0&0x07&ULEB128 register & \\
3432 \DWCFAsamevalue&0&0x08 &ULEB128 register & \\
3433 \DWCFAregister&0&0x09&ULEB128 register &ULEB128 offset \\
3434 \DWCFArememberstate&0&0x0a & & \\
3435 \DWCFArestorestate&0&0x0b & & \\
3436 \DWCFAdefcfa&0&0x0c &ULEB128 register&ULEB128 offset \\
3437 \DWCFAdefcfaregister&0&0x0d&ULEB128 register & \\
3438 \DWCFAdefcfaoffset&0&0x0e &ULEB128 offset & \\
3439 \DWCFAdefcfaexpression&0&0x0f &BLOCK \\
3440 \DWCFAexpression&0&0x10&ULEB128 register & BLOCK \\
3442 \DWCFAoffsetextendedsf&0&0x11&ULEB128 register&SLEB128 offset \\
3443 \DWCFAdefcfasf&0&0x12&ULEB128 register&SLEB128 offset \\
3444 \DWCFAdefcfaoffsetsf&0&0x13&SLEB128 offset & \\
3445 \DWCFAvaloffset&0&0x14&ULEB128&ULEB128 \\
3446 \DWCFAvaloffsetsf&0&0x15&ULEB128&SLEB128 \\
3447 \DWCFAvalexpression&0&0x16&ULEB128&BLOCK \\
3448 \DWCFAlouser&0&0x1c & & \\
3449 \DWCFAhiuser&0&\xiiif & & \\
3453 \section{Range List Entries for Non-contiguous Address Ranges}
3454 \label{datarep:noncontiguousaddressranges}
3455 Each entry in a \addtoindex{range list}
3456 (see Section \refersec{chap:noncontiguousaddressranges})
3458 \addtoindexx{base address selection entry!in range list}
3460 \addtoindexx{range list}
3461 a base address selection entry, or an end-of-list entry.
3463 Each entry begins with an unsigned 1-byte code that indicates the kind of entry
3464 that follows. The encodings for these constants are given in
3465 Table \refersec{tab:rnglistsentryencodingvalues}.
3469 \setlength{\extrarowheight}{0.1cm}
3470 \begin{longtable}{l|c}
3471 \caption{Range list entry encoding values}
3472 \label{tab:rnglistsentryencodingvalues} \\
3473 \hline \bfseries Range list entry encoding name&\bfseries Value \\ \hline
3475 \bfseries Range list entry encoding name&\bfseries Value\\ \hline
3477 \hline \emph{Continued on next page}
3480 \ddag New in \DWARFVersionV
3482 \DWRLEendoflist~\ddag & 0x00 \\
3483 \DWRLEbaseaddressx~\ddag & 0x01 \\
3484 \DWRLEstartxendx~\ddag & 0x02 \\
3485 \DWRLEstartxlength~\ddag & 0x03 \\
3486 \DWRLEoffsetpair~\ddag & 0x04 \\
3487 \DWRLEbaseaddress~\ddag & 0x05 \\
3488 \DWRLEstartend~\ddag & 0x06 \\
3489 \DWRLEstartlength~\ddag & 0x07 \\
3493 For a \addtoindex{range list} to be specified, the base address of the
3494 \addtoindexx{base address selection entry!in range list}
3495 corresponding compilation unit must be defined
3496 (see Section \refersec{chap:fullandpartialcompilationunitentries}).
3499 \section{String Offsets Table}
3500 \label{chap:stringoffsetstable}
3501 Each set of entries in the string offsets table contained in the
3502 \dotdebugstroffsets{} or \dotdebugstroffsetsdwo{}
3503 section begins with a header containing:
3504 \begin{enumerate}[1. ]
3505 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
3506 \addttindexx{unit\_length}
3507 A 4-byte or 12-byte length containing the length of
3508 the set of entries for this compilation unit, not
3509 including the length field itself. In the 32-bit
3510 DWARF format, this is a 4-byte unsigned integer
3511 (which must be less than \xfffffffzero); in the 64-bit
3512 DWARF format, this consists of the 4-byte value
3513 \wffffffff followed by an 8-byte unsigned integer
3514 that gives the actual length (see
3515 Section \refersec{datarep:32bitand64bitdwarfformats}).
3518 \item \texttt{version} (\HFTuhalf) \\
3519 \addtoindexx{version number!string offsets table}
3520 A 2-byte version identifier containing the value
3521 \versiondotdebugstroffsets{}.
3523 \item \textit{padding} (\HFTuhalf) \\
3524 Reserved to DWARF (must be zero).
3527 This header is followed by a series of string table offsets
3528 that have the same representation as \DWFORMstrp.
3529 For the 32-bit DWARF format, each offset is 4 bytes long; for
3530 the 64-bit DWARF format, each offset is 8 bytes long.
3532 The \DWATstroffsetsbase{} attribute points to the first
3533 entry following the header. The entries are indexed
3534 sequentially from this base entry, starting from 0.
3536 \section{Address Table}
3537 \label{chap:addresstable}
3538 Each set of entries in the address table contained in the
3539 \dotdebugaddr{} section begins with a header containing:
3540 \begin{enumerate}[1. ]
3541 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
3542 \addttindexx{unit\_length}
3543 A 4-byte or 12-byte length containing the length of
3544 the set of entries for this compilation unit, not
3545 including the length field itself. In the 32-bit
3546 DWARF format, this is a 4-byte unsigned integer
3547 (which must be less than \xfffffffzero); in the 64-bit
3548 DWARF format, this consists of the 4-byte value
3549 \wffffffff followed by an 8-byte unsigned integer
3550 that gives the actual length (see
3551 Section \refersec{datarep:32bitand64bitdwarfformats}).
3554 \item \texttt{version} (\HFTuhalf) \\
3555 \addtoindexx{version number!address table}
3556 A 2-byte version identifier containing the value
3557 \versiondotdebugaddr{}.
3560 \item \texttt{address\_size} (\HFTubyte) \\
3561 A 1-byte unsigned integer containing the size in
3562 bytes of an address (or the offset portion of an
3563 address for segmented addressing) on the target
3567 \item \HFNsegmentselectorsize{} (\HFTubyte) \\
3568 A 1-byte unsigned integer containing the size in
3569 bytes of a segment selector on the target system.
3572 This header is followed by a series of segment/address pairs.
3573 The segment size is given by the \HFNsegmentselectorsize{} field of the
3574 header, and the address size is given by the \addttindex{address\_size}
3575 field of the header. If the \HFNsegmentselectorsize{} field in the header
3576 is zero, the entries consist only of an addresses.
3578 The \DWATaddrbase{} attribute points to the first entry
3579 following the header. The entries are indexed sequentially
3580 from this base entry, starting from 0.
3583 \section{Range List Table}
3584 \label{app:ranglisttable}
3585 Each \dotdebugrnglists{} and \dotdebugrnglistsdwo{} section
3586 begins with a header containing:
3587 \begin{enumerate}[1. ]
3588 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
3589 \addttindexx{unit\_length}
3590 A 4-byte or 12-byte length containing the length of
3591 the set of entries for this compilation unit, not
3592 including the length field itself. In the 32-bit
3593 DWARF format, this is a 4-byte unsigned integer
3594 (which must be less than \xfffffffzero); in the 64-bit
3595 DWARF format, this consists of the 4-byte value
3596 \wffffffff followed by an 8-byte unsigned integer
3597 that gives the actual length (see
3598 Section \refersec{datarep:32bitand64bitdwarfformats}).
3601 \item \texttt{version} (\HFTuhalf) \\
3602 \addtoindexx{version number!range list table}
3603 A 2-byte version identifier containing the value
3604 \versiondotdebugrnglists{}.
3607 \item \texttt{address\_size} (\HFTubyte) \\
3608 A 1-byte unsigned integer containing the size in
3609 bytes of an address (or the offset portion of an
3610 address for segmented addressing) on the target
3614 \item \HFNsegmentselectorsize{} (\HFTubyte) \\
3615 A 1-byte unsigned integer containing the size in
3616 bytes of a segment selector on the target system.
3618 \item \HFNoffsetentrycount{} (\HFTuword) \\
3619 A 4-byte count of the number of&n