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,
35 \DWOPlouserMARK{}\DWOPhiuserMARK{}DW\_OP or
36 \DWTAGlouserMARK{}\DWTAGhiuserMARK{}DW\_TAG)
37 followed by \_lo\_user or \_hi\_user.
38 Values in the range between \textit{prefix}\_lo\_user
39 and \textit{prefix}\_hi\_user inclusive,
40 are reserved for vendor specific extensions. Vendors may
41 use values in this range without conflicting with current or
42 future system\dash defined values. All other values are reserved
43 for use by the system.
45 \textit{For example, for debugging information entry
46 tags, the special labels are \DWTAGlouserNAME{} and \DWTAGhiuserNAME.}
48 \textit{There may also be codes for vendor specific extensions
49 between the number of standard line number opcodes and
50 the first special line number opcode. However, since the
51 number of standard opcodes varies with the DWARF version,
52 the range for extensions is also version dependent. Thus,
53 \DWLNSlouserTARG{} and
54 \DWLNShiuserTARG{} symbols are not defined.}
56 Vendor defined tags, attributes, base type encodings, location
57 atoms, language names, line number actions, calling conventions
58 and call frame instructions, conventionally use the form
59 \text{prefix\_vendor\_id\_name}, where
60 \textit{vendor\_id}\addtoindexx{vendor id} is some identifying
61 character sequence chosen so as to avoid conflicts with
64 To ensure that extensions added by one vendor may be safely
65 ignored by consumers that do not understand those extensions,
66 the following rules must be followed:
67 \begin{enumerate}[1. ]
69 \item New attributes are added in such a way that a
70 debugger may recognize the format of a new attribute value
71 without knowing the content of that attribute value.
73 \item The semantics of any new attributes do not alter
74 the semantics of previously existing attributes.
76 \item The semantics of any new tags do not conflict with
77 the semantics of previously existing tags.
79 \item New forms of attribute value are not added.
84 \section{Reserved Values}
85 \label{datarep:reservedvalues}
86 \subsection{Error Values}
87 \label{datarep:errorvalues}
88 \addtoindexx{reserved values!error}
91 \addtoindexx{error value}
92 a convenience for consumers of DWARF information, the value
93 0 is reserved in the encodings for attribute names, attribute
94 forms, base type encodings, location operations, languages,
95 line number program opcodes, macro information entries and tag
96 names to represent an error condition or unknown value. DWARF
97 does not specify names for these reserved values, because they
98 do not represent valid encodings for the given type and do
99 not appear in DWARF debugging information.
102 \subsection{Initial Length Values}
103 \label{datarep:initiallengthvalues}
104 \addtoindexx{reserved values!initial length}
106 An \livetarg{datarep:initiallengthvalues}{initial length} field
107 \addtoindexx{initial length field|see{initial length}}
108 is one of the fields that occur at the beginning
109 of those DWARF sections that have a header
117 that occurs at the beginning of the CIE and FDE structures
118 in the \dotdebugframe{} section.
121 In an \addtoindex{initial length} field, the values \wfffffffzero through
122 \wffffffff are reserved by DWARF to indicate some form of
123 extension relative to \DWARFVersionII; such values must not
124 be interpreted as a length field. The use of one such value,
125 \xffffffff, is defined in
126 Section \refersec{datarep:32bitand64bitdwarfformats});
128 the other values is reserved for possible future extensions.
131 \section{Relocatable, Split, Executable, Shared, Package and Supplementary Object Files}
132 \label{datarep:executableobjectsandsharedobjects}
134 \subsection{Relocatable Object Files}
135 \label{datarep:relocatableobjectfiles}
136 A DWARF producer (for example, a compiler) typically generates its
137 debugging information as part of a relocatable object file.
138 Relocatable object files are then combined by a linker to form an
139 executable file. During the linking process, the linker resolves
140 (binds) symbolic references between the various object files, and
141 relocates the contents of each object file into a combined virtual
144 The DWARF debugging information is placed in several sections (see
145 Appendix \refersec{app:debugsectionrelationshipsinformative}), and
146 requires an object file format capable of
147 representing these separate sections. There are symbolic references
148 between these sections, and also between the debugging information
149 sections and the other sections that contain the text and data of the
150 program itself. Many of these references require relocation, and the
151 producer must emit the relocation information appropriate to the
152 object file format and the target processor architecture. These
153 references include the following:
156 \item The compilation unit header (see Section
157 \refersec{datarep:unitheaders}) in the \dotdebuginfo{}
158 section contains a reference to the \dotdebugabbrev{} table. This
159 reference requires a relocation so that after linking, it refers to
160 that contribution to the combined \dotdebugabbrev{} section in the
163 \item Debugging information entries may have attributes with the form
164 \DWFORMaddr{} (see Section \refersec{datarep:attributeencodings}).
165 These attributes represent locations
166 within the virtual address space of the program, and require
169 \item A DWARF expression may contain a \DWOPaddr{} (see Section
170 \refersec{chap:literalencodings}) which contains a location within
171 the virtual address space of the program, and require relocation.
174 \item Debugging information entries may have attributes with the form
175 \DWFORMsecoffset{} (see Section \refersec{datarep:attributeencodings}).
176 These attributes refer to
177 debugging information in other debugging information sections within
178 the object file, and must be relocated during the linking process.
180 \item Debugging information entries may have attributes with the form
181 \DWFORMrefaddr{} (see Section \refersec{datarep:attributeencodings}).
182 These attributes refer to
183 debugging information entries that may be outside the current
184 compilation unit. These values require both symbolic binding and
187 \item Debugging information entries may have attributes with the form
188 \DWFORMstrp{} (see Section \refersec{datarep:attributeencodings}).
189 These attributes refer to strings in
190 the \dotdebugstr{} section. These values require relocation.
192 \item Entries in the \dotdebugaddr{} and \dotdebugaranges{}
193 sections may contain references to locations within the virtual address
194 space of the program, and thus require relocation.
196 \item Entries in the \dotdebugloclists{} and \dotdebugrnglists{} sections may
197 contain references to locations within the virtual address space of the
198 program depending on whether certain kinds of location or range
199 list entries are used, and thus require relocation.
201 \item In the \dotdebugline{} section, the operand of the \DWLNEsetaddress{}
202 opcode is a reference to a location within the virtual address space
203 of the program, and requires relocation.
205 \item The \dotdebugstroffsets{} section contains a list of string offsets,
206 each of which is an offset of a string in the \dotdebugstr{} section. Each
207 of these offsets requires relocation. Depending on the implementation,
208 these relocations may be implicit (that is, the producer may not need to
209 emit any explicit relocation information for these offsets).
211 \item The \HFNdebuginfooffset{} field in the \dotdebugaranges{} header and
212 the list of compilation units following the \dotdebugnames{} header contain
213 references to the \dotdebuginfo{} section. These references require relocation
214 so that after linking they refer to the correct contribution in the combined
215 \dotdebuginfo{} section in the executable file.
217 \item Frame descriptor entries in the \dotdebugframe{} section
218 (see Section \refersec{chap:structureofcallframeinformation}) contain an
219 \HFNinitiallocation{} field value within the virtual address
220 space of the program and require relocation.
225 \textit{Note that operands of classes
227 \CLASSflag{} do not require relocation. Attribute operands that use
228 forms \DWFORMstring{},
229 \DWFORMrefone, \DWFORMreftwo, \DWFORMreffour, \DWFORMrefeight, or
230 \DWFORMrefudata{} also do not need relocation.}
232 \subsection{Split DWARF Object Files}
233 \label{datarep:splitdwarfobjectfiles}
234 \addtoindexx{split DWARF object file}
235 A DWARF producer may partition the debugging
236 information such that the majority of the debugging
237 information can remain in individual object files without
238 being processed by the linker.
240 \textit{This reduces link time by reducing the amount of information
241 the linker must process.}
244 \subsubsection{First Partition (with Skeleton Unit)}
245 The first partition contains
246 debugging information that must still be processed by the linker,
247 and includes the following:
250 The line number tables, frame tables, and
251 accelerated access tables, in the usual sections:
252 \dotdebugline, \dotdebuglinestr,
253 \dotdebugframe, \dotdebugnames{} and \dotdebugaranges,
257 An address table, in the \dotdebugaddr{} section. This table
258 contains all addresses and constants that require
259 link-time relocation, and items in the table can be
260 referenced indirectly from the debugging information via
261 the \DWFORMaddrx{} form,
262 by the \DWOPaddrx{} and \DWOPconstx{} operators, and
263 by certain of the \texttt{DW\_LLE\_*} location list
264 and \texttt{DW\_RLE\_*} range list entries.
266 A skeleton compilation unit, as described in Section
267 \refersec{chap:skeletoncompilationunitentries},
268 in the \dotdebuginfo{} section.
270 An abbreviations table for the skeleton compilation unit,
271 in the \dotdebugabbrev{} section
272 used by the \dotdebuginfo{} section.
275 A string table, in the \dotdebugstr{} section. The string
276 table is necessary only if the skeleton compilation unit
277 uses either indirect string form, \DWFORMstrp{} or
280 A string offsets table, in the \dotdebugstroffsets{}
281 section for strings in the \dotdebugstr{} section.
282 The string offsets table is necessary only if
283 the skeleton compilation unit uses the \DWFORMstrx{} form.
285 The attributes contained in the skeleton compilation
286 unit can be used by a DWARF consumer to find the
287 DWARF object file that contains the second partition.
289 \subsubsection{Second Partition (Unlinked or in a \texttt{.dwo} File)}
290 The second partition contains the debugging information that
291 does not need to be processed by the linker. These sections
292 may be left in the object files and ignored by the linker
293 (that is, not combined and copied to the executable object file), or
294 they may be placed by the producer in a separate DWARF object
295 file. This partition includes the following:
298 The full compilation unit, in the \dotdebuginfodwo{} section.
300 Attributes contained in the full compilation unit
301 may refer to machine addresses indirectly using the \DWFORMaddrx{}
302 form, which accesses the table of addresses specified by the
303 \DWATaddrbase{} attribute in the associated skeleton unit.
304 Location descriptions may similarly do so using the \DWOPaddrx{} and
305 \DWOPconstx{} operations.
307 \item Separate type units, in the \dotdebuginfodwo{} section.
310 Abbreviations table(s) for the compilation unit and type
311 units, in the \dotdebugabbrevdwo{} section
312 used by the \dotdebuginfodwo{} section.
314 \item Location lists, in the
315 \dotdebugloclistsdwo{} section.
317 \item Range lists, in the \dotdebugrnglistsdwo{} section.
320 A \addtoindex{specialized line number table} (for the type units),
321 in the \dotdebuglinedwo{} section.
324 contains only the directory and filename lists needed to
325 interpret \DWATdeclfile{} attributes in the debugging
328 \item Macro information, in the \dotdebugmacrodwo{} section.
330 \item A string table, in the \dotdebugstrdwo{} section.
332 \item A string offsets table, in the \dotdebugstroffsetsdwo{}
334 for the strings in the \dotdebugstrdwo{} section.
337 Except where noted otherwise, all references in this document
338 to a debugging information section (for example, \dotdebuginfo),
339 apply also to the corresponding split DWARF section (for example,
343 Split DWARF object files do not get linked with any other files,
344 therefore references between sections must not make use of
345 normal object file relocation information. As a result, symbolic
346 references within or between sections are not possible.
348 \subsection{Executable Objects}
349 \label{chap:executableobjects}
350 The relocated addresses in the debugging information for an
351 executable object are virtual addresses.
353 The sections containing the debugging information are typically
354 not loaded as part of the memory image of the program (in ELF
355 terminology, the sections are not "allocatable" and are not part
356 of a loadable segment). Therefore, the debugging information
357 sections described in this document are typically linked as if
358 they were each to be loaded at virtual address 0, and references
359 within the debugging information always implicitly indicate which
360 section a particular offset refers to. (For example, a reference
361 of form \DWFORMsecoffset{} may refer to one of several sections,
362 depending on the class allowed by a particular attribute of a
363 debugging information entry, as shown in
364 Table \refersec{tab:attributeencodings}.)
367 \subsection{Shared Object Files}
368 \label{datarep:sharedobjectfiles}
370 addresses in the debugging information for a shared object file
371 are offsets relative to the start of the lowest region of
372 memory loaded from that shared object file.
375 \textit{This requirement makes the debugging information for
376 shared object files position independent. Virtual addresses in a
377 shared object file may be calculated by adding the offset to the
378 base address at which the object file was attached. This offset
379 is available in the run\dash time linker\textquoteright s data structures.}
381 As with executable objects, the sections containing debugging
382 information are typically not loaded as part of the memory image
383 of the shared object, and are typically linked as if they were
384 each to be loaded at virtual address 0.
386 \subsection{DWARF Package Files}
387 \label{datarep:dwarfpackagefiles}
388 \textit{Using \splitDWARFobjectfile{s} allows the developer to compile,
389 link, and debug an application quickly with less link-time overhead,
390 but a more convenient format is needed for saving the debug
391 information for later debugging of a deployed application. A
392 DWARF package file can be used to collect the debugging
393 information from the object (or separate DWARF object) files
394 produced during the compilation of an application.}
396 \textit{The package file is typically placed in the same directory as the
397 application, and is given the same name with a \doublequote{\texttt{.dwp}}
398 extension.\addtoindexx{\texttt{.dwp} file extension}}
401 A DWARF package file is itself an object file, using the
402 \addtoindexx{package files}
403 \addtoindexx{DWARF package files}
404 same object file format (including \byteorder) as the
405 corresponding application binary. It consists only of a file
406 header, a section table, a number of DWARF debug information
407 sections, and two index sections.
410 Each DWARF package file contains no more than one of each of the
411 following sections, copied from a set of object or DWARF object
412 files, and combined, section by section:
419 \dotdebugstroffsetsdwo
424 The string table section in \dotdebugstrdwo{} contains all the
425 strings referenced from DWARF attributes using the form
426 \DWFORMstrx. Any attribute in a compilation unit or a type
427 unit using this form refers to an entry in that unit's
428 contribution to the \dotdebugstroffsetsdwo{} section, which in turn
429 provides the offset of a string in the \dotdebugstrdwo{}
432 The DWARF package file also contains two index sections that
433 provide a fast way to locate debug information by compilation
434 unit ID for compilation units, or by type
435 signature for type units:
441 \subsubsection{The Compilation Unit (CU) Index Section}
442 The \dotdebugcuindex{} section is a hashed lookup table that maps a
443 compilation unit ID to a set of contributions in the
444 various debug information sections. Each contribution is stored
445 as an offset within its corresponding section and a size.
448 Each \compunitset{} may contain contributions from the
451 \dotdebuginfodwo{} (required)
452 \dotdebugabbrevdwo{} (required)
456 \dotdebugstroffsetsdwo
460 \textit{Note that a \compunitset{} is not able to represent \dotdebugmacinfo{}
461 information from \DWARFVersionIV{} or earlier formats.}
463 \subsubsection{The Type Unit (TU) Index Section}
464 The \dotdebugtuindex{} section is a hashed lookup table that maps a
465 type signature to a set of offsets in the various debug
466 information sections. Each contribution is stored as an offset
467 within its corresponding section and a size.
469 Each \typeunitset{} may contain contributions from the following
472 \dotdebuginfodwo{} (required)
473 \dotdebugabbrevdwo{} (required)
475 \dotdebugstroffsetsdwo
478 \subsubsection{Format of the CU and TU Index Sections}
479 Both index sections have the same format, and serve to map an
480 8-byte signature to a set of contributions to the debug sections.
481 Each index section begins with a header, followed by a hash table of
482 signatures, a parallel table of indexes, a table of offsets, and
483 a table of sizes. The index sections are aligned at 8-byte
484 boundaries in the DWARF package file.
487 The index section header contains the following fields:
488 \begin{enumerate}[1. ]
489 \item \texttt{version} (\HFTuhalf) \\
491 \addtoindexx{version number!CU index information}
492 \addtoindexx{version number!TU index information}
493 This number is specific to the CU and TU index information
494 and is independent of the DWARF version number.
496 The version number is \versiondotdebugcuindex.
498 \item \textit{padding} (\HFTuhalf) \\
499 Reserved to DWARF (must be zero).
502 \item \texttt{section\_count} (\HFTuword) \\
503 The number of entries in the table of section counts that follows.
504 For brevity, the contents of this field is referred to as $N$ below.
506 \item \texttt{unit\_count} (\HFTuword) \\
507 The number of compilation units or type units in the index.
508 For brevity, the contents of this field is referred to as $U$ below.
510 \item \texttt{slot\_count} (\HFTuword) \\
511 The number of slots in the hash table.
512 For brevity, the contents of this field is referred to as $S$ below.
516 \textit{We assume that $U$ and $S$ do not exceed $2^{32}$.}
518 The size of the hash table, $S$, must be $2^k$ such that:
519 \hspace{0.3cm}$2^k\ \ >\ \ 3*U/2$
521 The hash table begins at offset 16 in the section, and consists
522 of an array of $S$ 8-byte slots. Each slot contains a 64-bit
524 % (using the \byteorder{} of the application binary).
526 The parallel table of indices begins immediately after the hash table
527 (at offset \mbox{$16 + 8 * S$} from the beginning of the section), and
528 consists of an array of $S$ 4-byte slots,
529 % (using the byte order of the application binary),
530 corresponding 1-1 with slots in the hash
531 table. Each entry in the parallel table contains a row index into
532 the tables of offsets and sizes.
534 Unused slots in the hash table have 0 in both the hash table
535 entry and the parallel table entry. While 0 is a valid hash
536 value, the row index in a used slot will always be non-zero.
538 Given an 8-byte compilation unit ID or type signature $X$,
539 an entry in the hash table is located as follows:
540 \begin{enumerate}[1. ]
541 \item Define $REP(X)$ to be the value of $X$ interpreted as an
542 unsigned 64-bit integer in the target byte order.
543 \item Calculate a primary hash $H = REP(X)\ \&\ MASK(k)$, where
544 $MASK(k)$ is a mask with the low-order $k$ bits all set to 1.
545 \item Calculate a secondary hash $H' = (((REP(X)>>32)\ \&\ MASK(k))\ |\ 1)$.
546 \item If the hash table entry at index $H$ matches the signature, use
547 that entry. If the hash table entry at index $H$ is unused (all
548 zeroes), terminate the search: the signature is not present
550 \item Let $H = (H + H')\ modulo\ S$. Repeat at Step 4.
553 Because $S > U$, and $H'$ and $S$ are relatively prime, the search is
554 guaranteed to stop at an unused slot or find the match.
557 The table of offsets begins immediately following the parallel
558 table (at offset \mbox{$16 + 12 * S$} from the beginning of the section).
559 This table consists of a single header row containing $N$ fields,
560 each a 4-byte unsigned integer, followed by $U$ data rows, each
561 also containing $N$ fields of 4-byte unsigned integers. The fields
562 in the header row provide a section identifier referring to a
563 debug section; the available section identifiers are shown in
564 Table \referfol{tab:dwarfpackagefilesectionidentifierencodings}.
565 Each data row corresponds to a specific CU
566 or TU in the package file. In the data rows, each field provides
567 an offset to the debug section whose identifier appears in the
568 corresponding field of the header row. The data rows are indexed
571 \textit{Not all sections listed in the table need be included.}
575 \setlength{\extrarowheight}{0.1cm}
576 \begin{longtable}{l|c|l}
577 \caption{DWARF package file section identifier \mbox{encodings}}
578 \label{tab:dwarfpackagefilesectionidentifierencodings}
579 \addtoindexx{DWARF package files!section identifier encodings} \\
580 \hline \bfseries Section identifier &\bfseries Value &\bfseries Section \\ \hline
582 \bfseries Section identifier &\bfseries Value &\bfseries Section\\ \hline
584 \hline \emph{Continued on next page}
588 \DWSECTINFOTARG & 1 & \dotdebuginfodwo \\
589 \textit{Reserved} & 2 & \\
590 \DWSECTABBREVTARG & 3 & \dotdebugabbrevdwo \\
591 \DWSECTLINETARG & 4 & \dotdebuglinedwo \\
592 \DWSECTLOCLISTSTARG & 5 & \dotdebugloclistsdwo \\
593 \DWSECTSTROFFSETSTARG & 6 & \dotdebugstroffsetsdwo \\
594 \DWSECTMACROTARG & 7 & \dotdebugmacrodwo \\
595 \DWSECTRNGLISTSTARG & 8 & \dotdebugrnglistsdwo \\
599 The offsets provided by the CU and TU index sections are the
600 base offsets for the contributions made by each CU or TU to the
601 corresponding section in the package file. Each CU and TU header
602 contains a \HFNdebugabbrevoffset{} field, used to find the abbreviations
603 table for that CU or TU within the contribution to the
604 \dotdebugabbrevdwo{} section for that CU or TU, and are
605 interpreted as relative to the base offset given in the index
606 section. Likewise, offsets into \dotdebuglinedwo{} from
607 \DWATstmtlist{} attributes are interpreted as relative to
608 the base offset for \dotdebuglinedwo{}, and offsets into other debug
609 sections obtained from DWARF attributes are also
610 interpreted as relative to the corresponding base offset.
612 The table of sizes begins immediately following the table of
613 offsets, and provides the sizes of the contributions made by each
614 CU or TU to the corresponding section in the package file.
615 This table consists of U data rows, each with N fields of 4-byte
616 unsigned integers. Each data row corresponds to the same CU or TU
617 as the corresponding data row in the table of offsets described
618 above. Within each data row, the N fields also correspond
619 one-to-one with the fields in the corresponding data row of the
620 table of offsets. Each field provides the size of the
621 contribution made by a CU or TU to the corresponding section in
624 For an example, see Figure \refersec{fig:examplecuindexsection}.
626 \subsection{DWARF Supplementary Object Files}
627 \label{datarep:dwarfsupplemetaryobjectfiles}
628 \textit{A supplementary object file permits a post-link utility to analyze executable and
629 shared object files and collect duplicate debugging information into a single file that
630 can be referenced by each of the original files. This is in contrast to split DWARF
631 object files, which allow the compiler to split the debugging information between
632 multiple files in order to reduce link time and executable size.}
635 A DWARF \addtoindex{supplementary object file} is itself an object file,
636 using the same object
637 file format, \byteorder{}, and size as the corresponding application executables
638 or shared libraries. It consists only of a file header, section table, and
639 a number of DWARF debug information sections. Both the
640 \addtoindex{supplementary object file}
641 and all the executable or shared object files that reference entries or strings in that
642 file must contain a \dotdebugsup{} section that establishes the relationship.
644 The \dotdebugsup{} section contains:
645 \begin{enumerate}[1. ]
646 \item \texttt{version} (\HFTuhalf) \\
647 \addttindexx{version}
648 A 2-byte unsigned integer representing the version of the DWARF
649 information for the compilation unit.
651 The value in this field is \versiondotdebugsup.
653 \item \texttt{is\_supplementary} (\HFTubyte) \\
654 \addttindexx{is\_supplementary}
655 A 1-byte unsigned integer, which contains the value 1 if it is
656 in the \addtoindex{supplementary object file} that other executable or
657 shared object files refer to, or 0 if it is an executable or shared object
658 referring to a \addtoindex{supplementary object file}.
661 \item \texttt{sup\_filename} (null terminated filename string) \\
662 \addttindexx{sup\_filename}
663 If \addttindex{is\_supplementary} is 0, this contains either an absolute
664 filename for the \addtoindex{supplementary object file}, or a filename
665 relative to the object file containing the \dotdebugsup{} section.
666 If \addttindex{is\_supplementary} is 1, then \addttindex{sup\_filename}
667 is not needed and must be an empty string (a single null byte).
670 \item \texttt{sup\_checksum\_len} (unsigned LEB128) \\
671 \addttindexx{sup\_checksum\_len}
672 Length of the following \addttindex{sup\_checksum} field;
673 this value can be 0 if no checksum is provided.
675 \item \texttt{sup\_checksum} (array of \HFTubyte) \\
676 \addttindexx{sup\_checksum}
677 An implementation-defined integer constant value that
678 provides unique identification of the supplementary file.
682 Debug information entries that refer to an executable's or shared
683 object's addresses must \emph{not} be moved to supplementary files
684 (the addesses will likely not be the same). Similarly,
685 entries referenced from within location descriptions or using loclistsptr
686 form attributes must not be moved to a \addtoindex{supplementary object file}.
688 Executable or shared object file compilation units can use
689 \DWTAGimportedunit{} with
691 an \DWATimport{} attribute that uses \DWFORMrefsupfour{} or \DWFORMrefsupeight{}
693 to import entries from the \addtoindex{supplementary object file}, other
695 \DWFORMrefsupfour{} or \DWFORMrefsupeight{}
697 attributes to refer to them and \DWFORMstrpsup{} form attributes to
698 refer to strings that are used by debug information of multiple
699 executables or shared object files. Within the \addtoindex{supplementary object file}'s
700 debugging sections, form
702 \DWFORMrefsupfour{}, \DWFORMrefsupeight{}
704 or \DWFORMstrpsup{} are
705 not used, and all reference forms referring to some other sections
706 refer to the local sections in the \addtoindex{supplementary object file}.
708 In macro information, \DWMACROdefinesup{} or
709 \DWMACROundefsup{} opcodes can refer to strings in the
710 \dotdebugstr{} section of the \addtoindex{supplementary object file},
711 or \DWMACROimportsup{}
712 can refer to \dotdebugmacro{} section entries. Within the
713 \dotdebugmacro{} section of a \addtoindex{supplementary object file},
714 \DWMACROdefinestrp{} and \DWMACROundefstrp{}
715 opcodes refer to the local \dotdebugstr{} section in that
716 supplementary file, not the one in
717 the executable or shared object file.
721 \section{32-Bit and 64-Bit DWARF Formats}
722 \label{datarep:32bitand64bitdwarfformats}
723 \hypertarget{datarep:xxbitdwffmt}{}
724 \addtoindexx{32-bit DWARF format}
725 \addtoindexx{64-bit DWARF format}
726 There are two closely-related DWARF
727 formats. In the 32-bit DWARF
728 format, all values that represent lengths of DWARF sections
729 and offsets relative to the beginning of DWARF sections are
730 represented using four bytes. In the 64-bit DWARF format, all
731 values that represent lengths of DWARF sections and offsets
732 relative to the beginning of DWARF sections are represented
733 using eight bytes. A special convention applies to the initial
734 length field of certain DWARF sections, as well as the CIE and
735 FDE structures, so that the 32-bit and 64-bit DWARF formats
736 can coexist and be distinguished within a single linked object.
738 Except where noted otherwise, all references in this document
739 to a debugging information section (for example, \dotdebuginfo),
740 apply also to the corresponding split DWARF section (for example,
743 The differences between the 32- and 64-bit DWARF formats are
744 detailed in the following:
745 \begin{enumerate}[1. ]
747 \item In the 32-bit DWARF format, an
748 \addtoindex{initial length} field (see
749 \addtoindexx{initial length!encoding}
750 Section \ref{datarep:initiallengthvalues} on page \pageref{datarep:initiallengthvalues})
751 is an unsigned 4-byte integer (which
752 must be less than \xfffffffzero); in the 64-bit DWARF format,
753 an \addtoindex{initial length} field is 12 bytes in size,
756 \item The first four bytes have the value \xffffffff.
758 \item The following eight bytes contain the actual length
759 represented as an unsigned 8-byte integer.
762 \textit{This representation allows a DWARF consumer to dynamically
763 detect that a DWARF section contribution is using the 64-bit
764 format and to adapt its processing accordingly.}
767 \item \hypertarget{datarep:sectionoffsetlength}{}
768 Section offset and section length
769 \addtoindexx{section length!use in headers}
771 \addtoindexx{section offset!use in headers}
772 in the headers of DWARF sections (other than initial length
773 \addtoindexx{initial length}
774 fields) are listed following. In the 32-bit DWARF format these
775 are 4-byte unsigned integer values; in the 64-bit DWARF format,
776 they are 8-byte unsigned integer values.
778 \begin{nolinenumbersenv}
781 Section &Name & Role \\ \hline
782 \dotdebugaranges{} & \addttindex{debug\_info\_offset} & offset in \dotdebuginfo{} \\
783 \dotdebugframe{}/CIE & \addttindex{CIE\_id} & CIE distinguished value \\
784 \dotdebugframe{}/FDE & \addttindex{CIE\_pointer} & offset in \dotdebugframe{} \\
785 \dotdebuginfo{} & \addttindex{debug\_abbrev\_offset} & offset in \dotdebugabbrev{} \\
786 \dotdebugline{} & \addttindex{header\_length} & length of header itself \\
787 \dotdebugnames{} & entry in array of CUs & offset in \dotdebuginfo{} \\
791 \end{nolinenumbersenv}
794 The \texttt{CIE\_id} field in a CIE structure must be 64 bits because
795 it overlays the \texttt{CIE\_pointer} in a FDE structure; this implicit
796 union must be accessed to distinguish whether a CIE or FDE is
797 present, consequently, these two fields must exactly overlay
798 each other (both offset and size).
800 \item Within the body of the \dotdebuginfo{}
801 section, certain forms of attribute value depend on the choice
802 of DWARF format as follows. For the 32-bit DWARF format,
803 the value is a 4-byte unsigned integer; for the 64-bit DWARF
804 format, the value is an 8-byte unsigned integer.
807 \begin{nolinenumbersenv}
808 \begin{tabular}{lp{6cm}}
809 Form & Role \\ \hline
810 \DWFORMlinestrp & offset in \dotdebuglinestr \\
811 \DWFORMrefaddr & offset in \dotdebuginfo{} \\
813 \DWFORMsecoffset & offset in a section other than \\
814 & \dotdebuginfo{} or \dotdebugstr{} \\
815 \DWFORMstrp & offset in \dotdebugstr{} \\
816 \DWFORMstrpsup & offset in \dotdebugstr{} section of a \mbox{supplementary} object file \\
817 \DWOPcallref & offset in \dotdebuginfo{} \\
819 \end{nolinenumbersenv}
823 \item Within the body of the \dotdebugline{} section, certain forms of content
824 description depend on the choice of DWARF format as follows: for the
825 32-bit DWARF format, the value is a 4-byte unsigned integer; for the
826 64-bit DWARF format, the value is a 8-byte unsigned integer.
829 \begin{nolinenumbersenv}
830 \begin{tabular}{lp{6cm}}
831 Form & Role \\ \hline
832 \DWFORMlinestrp & offset in \dotdebuglinestr
834 \end{nolinenumbersenv}
837 \item Within the body of the \dotdebugnames{}
838 sections, the representation of each entry in the array of
839 compilation units (CUs) and the array of local type units
840 (TUs), which represents an offset in the
842 section, depends on the DWARF format as follows: in the
843 32-bit DWARF format, each entry is a 4-byte unsigned integer;
844 in the 64-bit DWARF format, it is a 8-byte unsigned integer.
847 \item In the body of the \dotdebugstroffsets{}
848 sections, the size of entries in the body depend on the DWARF
849 format as follows: in the 32-bit DWARF format, entries are 4-byte
850 unsigned integer values; in the 64-bit DWARF format, they are
851 8-byte unsigned integers.
853 %\bbpareb-delete bullet 7
855 \item In the body of the \dotdebugloclists{} and \dotdebugrnglists{}
856 sections, the offsets the follow the header depend on the
857 DWARF format as follows: in the 32-bit DWARF format, offsets are 4-byte
858 unsigned integer values; in the 64-bit DWARF format, they are
859 8-byte unsigned integers.
864 The 32-bit and 64-bit DWARF format conventions must \emph{not} be
865 intermixed within a single compilation unit.
867 \textit{Attribute values and section header fields that represent
868 addresses in the target program are not affected by these
872 A DWARF consumer that supports the 64-bit DWARF format must
873 support executables in which some compilation units use the
874 32-bit format and others use the 64-bit format provided that
875 the combination links correctly (that is, provided that there
876 are no link\dash time errors due to truncation or overflow). (An
877 implementation is not required to guarantee detection and
878 reporting of all such errors.)
880 \textit{It is expected that DWARF producing compilers will \emph{not} use
881 the 64-bit format \emph{by default}. In most cases, the division of
882 even very large applications into a number of executable and
883 shared object files will suffice to assure that the DWARF sections
884 within each individual linked object are less than 4 GBytes
885 in size. However, for those cases where needed, the 64-bit
886 format allows the unusual case to be handled as well. Even
887 in this case, it is expected that only application supplied
888 objects will need to be compiled using the 64-bit format;
889 separate 32-bit format versions of system supplied shared
890 executable libraries can still be used.}
893 \section{Format of Debugging Information}
894 \label{datarep:formatofdebugginginformation}
896 For each compilation unit compiled with a DWARF producer,
897 a contribution is made to the \dotdebuginfo{} section of
898 the object file. Each such contribution consists of a
899 compilation unit header
900 (see Section \refersec{datarep:compilationunitheader})
902 single \DWTAGcompileunit{} or
903 \DWTAGpartialunit{} debugging
904 information entry, together with its children.
906 For each type defined in a compilation unit, a separate
907 contribution may also be made to the
909 section of the object file. Each
910 such contribution consists of a
911 \addtoindex{type unit} header
912 (see Section \refersec{datarep:typeunitheaders})
913 followed by a \DWTAGtypeunit{} entry, together with
916 Each debugging information entry begins with a code that
917 represents an entry in a separate
918 \addtoindex{abbreviations table}. This
919 code is followed directly by a series of attribute values.
921 The appropriate entry in the
922 \addtoindex{abbreviations table} guides the
923 interpretation of the information contained directly in the
924 \dotdebuginfo{} section.
926 Multiple debugging information entries may share the same
927 abbreviation table entry. Each compilation unit is associated
928 with a particular abbreviation table, but multiple compilation
929 units may share the same table.
932 \subsection{Unit Headers}
933 \label{datarep:unitheaders}
934 Unit headers contain a field, \addttindex{unit\_type}, whose value indicates the kind of
935 compilation unit that follows. The encodings for the unit type
936 enumeration are shown in Table \refersec{tab:unitheaderunitkindencodings}.
940 \setlength{\extrarowheight}{0.1cm}
941 \begin{longtable}{l|c}
942 \caption{Unit header unit type encodings}
943 \label{tab:unitheaderunitkindencodings}
944 \addtoindexx{unit header unit type encodings} \\
945 \hline \bfseries Unit header unit type encodings&\bfseries Value \\ \hline
947 \bfseries Unit header unit type encodings&\bfseries Value \\ \hline
949 \hline \emph{Continued on next page}
951 \hline \ddag\ \textit{New in DWARF Version 5}
953 \DWUTcompileTARG~\ddag &0x01 \\
954 \DWUTtypeTARG~\ddag &0x02 \\
955 \DWUTpartialTARG~\ddag &0x03 \\
956 \DWUTskeletonTARG~\ddag &0x04 \\
957 \DWUTsplitcompileTARG~\ddag &0x05 \\
958 \DWUTsplittypeTARG~\ddag &0x06 \\
959 \DWUTlouserTARG~\ddag &0x80 \\
960 \DWUThiuserTARG~\ddag &\xff \\
965 \textit{All unit headers in a compilation have the same size.
966 Some header types include padding bytes to achieve this.}
969 \subsubsection{Compilation and Partial Unit Headers}
970 \label{datarep:compilationunitheader}
971 \begin{enumerate}[1. ]
973 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
974 \addttindexx{unit\_length}
976 \addtoindexx{initial length}
977 unsigned integer representing the length
978 of the \dotdebuginfo{} contribution for that compilation unit,
979 not including the length field itself. In the \thirtytwobitdwarfformat,
980 this is a 4-byte unsigned integer (which must be less
981 than \xfffffffzero); in the \sixtyfourbitdwarfformat, this consists
982 of the 4-byte value \wffffffff followed by an 8-byte unsigned
983 integer that gives the actual length
984 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
986 \item \texttt{version} (\HFTuhalf) \\
987 \addttindexx{version}
988 \addtoindexx{version number!compilation unit}
989 A 2-byte unsigned integer representing the version of the
990 DWARF information for the compilation unit.
992 The value in this field is \versiondotdebuginfo.
994 \textit{See also Appendix \refersec{app:dwarfsectionversionnumbersinformative}
995 for a summary of all version numbers that apply to DWARF sections.}
998 \item \texttt{unit\_type} (\HFTubyte) \\
999 \addttindexx{unit\_type}
1000 A 1-byte unsigned integer identifying this unit as a compilation unit.
1001 The value of this field is
1002 \DWUTcompile{} for a full compilation unit or
1003 \DWUTpartial{} for a partial compilation unit
1004 (see Section \refersec{chap:fullandpartialcompilationunitentries}).
1006 \textit{This field is new in \DWARFVersionV.}
1009 \item \texttt{address\_size} (\HFTubyte) \\
1010 \addttindexx{address\_size}
1011 A 1-byte unsigned integer representing the size in bytes of
1012 an address on the target architecture. If the system uses
1013 \addtoindexx{address space!segmented}
1014 segmented addressing, this value represents the size of the
1015 offset portion of an address.
1017 \item \HFNdebugabbrevoffset{} (\livelink{datarep:sectionoffsetlength}{section offset}) \\
1019 \addtoindexx{section offset!in .debug\_info header}
1020 4-byte or 8-byte unsigned offset into the
1022 section. This offset associates the compilation unit with a
1023 particular set of debugging information entry abbreviations. In
1024 the \thirtytwobitdwarfformat, this is a 4-byte unsigned length;
1025 in the \sixtyfourbitdwarfformat, this is an 8-byte unsigned length
1026 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1028 \item \HFNunitpaddingONE{} (8 bytes) \\
1029 Reserved to DWARF (must be zero).
1032 \item \HFNunitpaddingTWO{} (4 or 8 bytes) \\
1033 Reserved to DWARF (must be zero). In the \thirtytwobitdwarfformat,
1034 this is 4 bytes in length; in the \sixtyfourbitdwarfformat, this
1035 is 8 bytes in length.
1039 \subsubsection{Skeleton and Split Compilation Unit Headers}
1040 \label{datarep:skeletonandfullcompilationunitheaders}
1041 \begin{enumerate}[1. ]
1043 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
1044 \addttindexx{unit\_length}
1046 \addtoindexx{initial length}
1047 unsigned integer representing the length
1048 of the \dotdebuginfo{}
1049 contribution for that compilation unit,
1050 not including the length field itself. In the \thirtytwobitdwarfformat,
1051 this is a 4-byte unsigned integer (which must be less
1052 than \xfffffffzero); in the \sixtyfourbitdwarfformat, this consists
1053 of the 4-byte value \wffffffff followed by an 8-byte unsigned
1054 integer that gives the actual length
1055 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1057 \item \texttt{version} (\HFTuhalf) \\
1058 \addttindexx{version}
1059 \addtoindexx{version number!compilation unit}
1060 A 2-byte unsigned integer representing the version of the
1061 DWARF information for the compilation unit.
1063 The value in this field is \versiondotdebuginfo.
1065 \textit{See also Appendix \refersec{app:dwarfsectionversionnumbersinformative}
1066 for a summary of all version numbers that apply to DWARF sections.}
1069 \item \texttt{unit\_type} (\HFTubyte) \\
1070 \addttindexx{unit\_type}
1071 A 1-byte unsigned integer identifying this unit as a compilation unit.
1072 The value of this field is
1073 \DWUTskeleton{} for a skeleton compilation unit or
1074 \DWUTsplitcompile{} for a split compilation unit
1075 (see Section \refersec{chap:skeletoncompilationunitentries}).
1077 \textit{This field is new in \DWARFVersionV.}
1080 \item \texttt{address\_size} (\HFTubyte) \\
1081 \addttindexx{address\_size}
1082 A 1-byte unsigned integer representing the size in bytes of
1083 an address on the target architecture. If the system uses
1084 \addtoindexx{address space!segmented}
1085 segmented addressing, this value represents the size of the
1086 offset portion of an address.
1088 \item \HFNdebugabbrevoffset{} (\livelink{datarep:sectionoffsetlength}{section offset}) \\
1090 \addtoindexx{section offset!in .debug\_info header}
1091 4-byte or 8-byte unsigned offset into the
1093 section. This offset associates the compilation unit with a
1094 particular set of debugging information entry abbreviations. In
1095 the \thirtytwobitdwarfformat, this is a 4-byte unsigned length;
1096 in the \sixtyfourbitdwarfformat, this is an 8-byte unsigned length
1097 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1100 \item \HFNdwoid{} (unit ID) \\
1101 An 8-byte implementation-defined integer constant value,
1102 known as the compilation unit ID, that provides
1103 unique identification of a skeleton compilation
1104 unit and its associated split compilation unit in
1105 the object file named in the \DWATdwoname{} attribute
1106 of the skeleton compilation.
1109 \item \HFNunitpaddingTWO{} (4 or 8 bytes) \\
1110 Reserved to DWARF (must be zero). In the \thirtytwobitdwarfformat,
1111 this is 4 bytes in length; in the \sixtyfourbitdwarfformat{}, this
1112 is 8 bytes in length.
1116 \subsubsection{Type Unit Headers}
1117 \label{datarep:typeunitheaders}
1118 The header for the series of debugging information entries
1119 contributing to the description of a type that has been
1120 placed in its own \addtoindex{type unit}, within the
1121 \dotdebuginfo{} section,
1122 consists of the following information:
1123 \begin{enumerate}[1. ]
1124 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
1125 \addttindexx{unit\_length}
1126 A 4-byte or 12-byte unsigned integer
1127 \addtoindexx{initial length}
1128 representing the length
1129 of the \dotdebuginfo{} contribution for that type unit,
1130 not including the length field itself. In the \thirtytwobitdwarfformat,
1131 this is a 4-byte unsigned integer (which must be
1132 less than \xfffffffzero); in the \sixtyfourbitdwarfformat, this
1133 consists of the 4-byte value \wffffffff followed by an
1134 8-byte unsigned integer that gives the actual length
1135 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1138 \item \texttt{version} (\HFTuhalf) \\
1139 \addttindexx{version}
1140 \addtoindexx{version number!type unit}
1141 A 2-byte unsigned integer representing the version of the
1142 DWARF information for the type unit.
1144 The value in this field is \versiondotdebuginfo.
1146 \item \texttt{unit\_type} (\HFTubyte) \\
1147 \addttindexx{unit\_type}
1148 A 1-byte unsigned integer identifying this unit as a type unit.
1149 The value of this field is \DWUTtype{} for a non-split type unit
1150 (see Section \refersec{chap:typeunitentries})
1151 or \DWUTsplittype{} for a split type unit.
1153 \textit{This field is new in \DWARFVersionV.}
1156 \item \texttt{address\_size} (\HFTubyte) \\
1157 \addttindexx{address\_size}
1158 A 1-byte unsigned integer representing the size
1159 \addtoindexx{size of an address}
1161 an address on the target architecture. If the system uses
1162 \addtoindexx{address space!segmented}
1163 segmented addressing, this value represents the size of the
1164 offset portion of an address.
1167 \item \HFNdebugabbrevoffset{} (\livelink{datarep:sectionoffsetlength}{section offset}) \\
1169 \addtoindexx{section offset!in .debug\_info header}
1170 4-byte or 8-byte unsigned offset into the
1172 section. This offset associates the type unit with a
1173 particular set of debugging information entry abbreviations. In
1174 the \thirtytwobitdwarfformat, this is a 4-byte unsigned length;
1175 in the \sixtyfourbitdwarfformat, this is an 8-byte unsigned length
1176 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1178 \item \texttt{type\_signature} (8-byte unsigned integer) \\
1179 \addttindexx{type\_signature}
1180 \addtoindexx{type signature}
1181 A unique 8-byte signature (see Section
1182 \refersec{datarep:typesignaturecomputation})
1183 of the type described in this type
1186 \textit{An attribute that refers (using
1187 \DWFORMrefsigeight{}) to
1188 the primary type contained in this
1189 \addtoindex{type unit} uses this value.}
1192 \item \texttt{type\_offset} (\livelink{datarep:sectionoffsetlength}{section offset}) \\
1193 \addttindexx{type\_offset}
1194 A 4-byte or 8-byte unsigned offset
1195 \addtoindexx{section offset!in .debug\_info header}
1196 relative to the beginning
1197 of the \addtoindex{type unit} header.
1198 This offset refers to the debugging
1199 information entry that describes the type. Because the type
1200 may be nested inside a namespace or other structures, and may
1201 contain references to other types that have not been placed in
1202 separate type units, it is not necessarily either the first or
1203 the only entry in the type unit. In the \thirtytwobitdwarfformat,
1204 this is a 4-byte unsigned length; in the \sixtyfourbitdwarfformat,
1205 this is an 8-byte unsigned length
1206 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1210 \subsection{Debugging Information Entry}
1211 \label{datarep:debugginginformationentry}
1213 Each debugging information entry begins with an
1214 unsigned LEB128\addtoindexx{LEB128!unsigned}
1215 number containing the abbreviation code for the entry. This
1216 code represents an entry within the abbreviations table
1217 associated with the compilation unit containing this entry. The
1218 abbreviation code is followed by a series of attribute values.
1220 On some architectures, there are alignment constraints on
1221 section boundaries. To make it easier to pad debugging
1222 information sections to satisfy such constraints, the
1223 abbreviation code 0 is reserved. Debugging information entries
1224 consisting of only the abbreviation code 0 are considered
1227 \subsection{Abbreviations Tables}
1228 \label{datarep:abbreviationstables}
1230 The abbreviations tables for all compilation units
1231 are contained in a separate object file section called
1233 As mentioned before, multiple compilation
1234 units may share the same abbreviations table.
1236 The abbreviations table for a single compilation unit consists
1237 of a series of abbreviation declarations. Each declaration
1238 specifies the tag and attributes for a particular form of
1239 debugging information entry. Each declaration begins with
1240 an unsigned LEB128\addtoindexx{LEB128!unsigned}
1241 number representing the abbreviation
1242 code itself. It is this code that appears at the beginning
1243 of a debugging information entry in the
1245 section. As described above, the abbreviation
1246 code 0 is reserved for null debugging information entries. The
1247 abbreviation code is followed by another unsigned LEB128\addtoindexx{LEB128!unsigned}
1248 number that encodes the entry\textquoteright s tag. The encodings for the
1249 tag names are given in
1250 Table \refersec{tab:tagencodings}.
1254 \setlength{\extrarowheight}{0.1cm}
1255 \begin{longtable}{l|c}
1256 \caption{Tag encodings} \label{tab:tagencodings} \\
1257 \hline \bfseries Tag name&\bfseries Value\\ \hline
1259 \bfseries Tag name&\bfseries Value \\ \hline
1261 \hline \emph{Continued on next page}
1263 \hline \ddag\ \textit{New in DWARF Version 5}
1265 \DWTAGarraytype{} &0x01 \\
1266 \DWTAGclasstype&0x02 \\
1267 \DWTAGentrypoint&0x03 \\
1268 \DWTAGenumerationtype&0x04 \\
1269 \DWTAGformalparameter&0x05 \\
1270 \bbeb\textit{Reserved}&0x06 \\
1271 \bbeb\textit{Reserved}&0x07 \\
1272 \DWTAGimporteddeclaration&0x08 \\
1273 \bbeb\textit{Reserved}&0x09 \\
1275 \DWTAGlexicalblock&0x0b \\
1276 \bbeb\textit{Reserved}&0x0c \\
1277 \DWTAGmember&0x0d \\
1278 \bbeb\textit{Reserved}&0x0e \\
1279 \DWTAGpointertype&0x0f \\
1280 \DWTAGreferencetype&0x10 \\
1281 \DWTAGcompileunit&0x11 \\
1282 \DWTAGstringtype&0x12 \\
1283 \DWTAGstructuretype&0x13 \\
1284 \bbeb\textit{Reserved}&0x14 \\
1285 \DWTAGsubroutinetype&0x15 \\
1286 \DWTAGtypedef&0x16 \\
1287 \DWTAGuniontype&0x17 \\
1288 \DWTAGunspecifiedparameters&0x18 \\
1289 \DWTAGvariant&0x19 \\
1290 \DWTAGcommonblock&0x1a \\
1291 \DWTAGcommoninclusion&0x1b \\
1292 \DWTAGinheritance&0x1c \\
1293 \DWTAGinlinedsubroutine&0x1d \\
1294 \DWTAGmodule&0x1e \\
1295 \DWTAGptrtomembertype&0x1f \\
1296 \DWTAGsettype&0x20 \\
1297 \DWTAGsubrangetype&0x21 \\
1298 \DWTAGwithstmt&0x22 \\
1299 \DWTAGaccessdeclaration&0x23 \\
1300 \DWTAGbasetype&0x24 \\
1301 \DWTAGcatchblock&0x25 \\
1302 \DWTAGconsttype&0x26 \\
1303 \DWTAGconstant&0x27 \\
1304 \DWTAGenumerator&0x28 \\
1305 \DWTAGfiletype&0x29 \\
1306 \DWTAGfriend&0x2a \\
1307 \DWTAGnamelist&0x2b \\
1308 \DWTAGnamelistitem&0x2c \\
1309 \DWTAGpackedtype&0x2d \\
1310 \DWTAGsubprogram&0x2e \\
1311 \DWTAGtemplatetypeparameter&0x2f \\
1312 \DWTAGtemplatevalueparameter&0x30 \\
1313 \DWTAGthrowntype&0x31 \\
1314 \DWTAGtryblock&0x32 \\
1315 \DWTAGvariantpart&0x33 \\
1316 \DWTAGvariable&0x34 \\
1317 \DWTAGvolatiletype&0x35 \\
1318 \DWTAGdwarfprocedure&0x36 \\
1319 \DWTAGrestricttype&0x37 \\
1320 \DWTAGinterfacetype&0x38 \\
1321 \DWTAGnamespace&0x39 \\
1322 \DWTAGimportedmodule&0x3a \\
1323 \DWTAGunspecifiedtype&0x3b \\
1324 \DWTAGpartialunit&0x3c \\
1325 \DWTAGimportedunit&0x3d \\
1326 \textit{Reserved}&0x3e\footnote{Code 0x3e is reserved to allow backward compatible support of the
1327 DW\_TAG\_mutable\_type DIE that was defined (only) in \DWARFVersionIII.}
1329 \DWTAGcondition&\xiiif \\
1330 \DWTAGsharedtype&0x40 \\
1331 \DWTAGtypeunit & 0x41 \\
1332 \DWTAGrvaluereferencetype & 0x42 \\
1333 \DWTAGtemplatealias & 0x43 \\
1334 \DWTAGcoarraytype~\ddag & 0x44 \\
1335 \DWTAGgenericsubrange~\ddag & 0x45 \\
1336 \DWTAGdynamictype~\ddag & 0x46 \\
1337 \DWTAGatomictype~\ddag & 0x47 \\
1338 \DWTAGcallsite~\ddag & 0x48 \\
1339 \DWTAGcallsiteparameter~\ddag & 0x49 \\
1340 \DWTAGskeletonunit~\ddag & 0x4a \\
1341 \DWTAGimmutabletype~\ddag & 0x4b \\
1342 \DWTAGlouser&0x4080 \\
1343 \DWTAGhiuser&\xffff \\
1348 Following the tag encoding is a 1-byte value that determines
1349 whether a debugging information entry using this abbreviation
1350 has child entries or not. If the value is
1352 the next physically succeeding entry of any debugging
1353 information entry using this abbreviation is the first
1354 child of that entry. If the 1-byte value following the
1355 abbreviation\textquoteright s tag encoding is
1356 \DWCHILDRENnoTARG, the next
1357 physically succeeding entry of any debugging information entry
1358 using this abbreviation is a sibling of that entry. (Either
1359 the first child or sibling entries may be null entries). The
1360 encodings for the child determination byte are given in
1361 Table \refersec{tab:childdeterminationencodings}
1363 Section \refersec{chap:relationshipofdebugginginformationentries},
1364 each chain of sibling entries is terminated by a null entry.)
1368 \setlength{\extrarowheight}{0.1cm}
1369 \begin{longtable}{l|c}
1370 \caption{Child determination encodings}
1371 \label{tab:childdeterminationencodings}
1372 \addtoindexx{Child determination encodings} \\
1373 \hline \bfseries Children determination name&\bfseries Value \\ \hline
1375 \bfseries Children determination name&\bfseries Value \\ \hline
1377 \hline \emph{Continued on next page}
1381 \DWCHILDRENno&0x00 \\
1382 \DWCHILDRENyes&0x01 \\ \hline
1387 Finally, the child encoding is followed by a series of
1388 attribute specifications. Each attribute specification
1389 consists of two parts. The first part is an
1390 unsigned LEB128\addtoindexx{LEB128!unsigned}
1391 number representing the attribute\textquoteright s name.
1392 The second part is an
1393 unsigned LEB128\addtoindexx{LEB128!unsigned}
1394 number representing the attribute\textquoteright s form.
1395 The series of attribute specifications ends with an
1396 entry containing 0 for the name and 0 for the form.
1400 \DWFORMindirectTARG{} is a special case. For
1401 attributes with this form, the attribute value itself in the
1403 section begins with an unsigned
1404 LEB128 number that represents its form. This allows producers
1405 to choose forms for particular attributes
1406 \addtoindexx{abbreviations table!dynamic forms in}
1408 without having to add a new entry to the abbreviations table.
1410 The attribute form \DWFORMimplicitconstTARG{} is another special case.
1411 For attributes with this form, the attribute specification contains
1412 a third part, which is a signed LEB128\addtoindexx{LEB128!signed}
1413 number. The value of this number is used as the value of the
1414 attribute, and no value is stored in the \dotdebuginfo{} section.
1416 The abbreviations for a given compilation unit end with an
1417 entry consisting of a 0 byte for the abbreviation code.
1420 Appendix \refersec{app:compilationunitsandabbreviationstableexample}
1421 for a depiction of the organization of the
1422 debugging information.}
1425 \subsection{Attribute Encodings}
1426 \label{datarep:attributeencodings}
1428 The encodings for the attribute names are given in
1429 Table \referfol{tab:attributeencodings}.
1432 \setlength{\extrarowheight}{0.1cm}
1433 \begin{longtable}{l|c|l}
1434 \caption{Attribute encodings}
1435 \label{tab:attributeencodings}
1436 \addtoindexx{attribute encodings} \\
1437 \hline \bfseries Attribute name&\bfseries Value &\bfseries Classes \\ \hline
1439 \bfseries Attribute name&\bfseries Value &\bfseries Classes\\ \hline
1441 \hline \emph{Continued on next page}
1443 \hline \ddag\ \textit{New in DWARF Version 5}
1445 \DWATsibling&0x01&\livelink{chap:classreference}{reference}
1446 \addtoindexx{sibling attribute} \\
1447 \DWATlocation&0x02&\livelink{chap:classexprloc}{exprloc},
1449 \addtoindexx{location attribute} \\
1450 \DWATname&0x03&\livelink{chap:classstring}{string}
1451 \addtoindexx{name attribute} \\
1452 \bbeb\textit{Reserved}&0x04&\textit{not applicable} \\
1453 \bbeb\textit{Reserved}&0x05&\textit{not applicable} \\
1454 \bbeb\textit{Reserved}&0x06&\textit{not applicable} \\
1455 \bbeb\textit{Reserved}&0x07&\textit{not applicable} \\
1456 \bbeb\textit{Reserved}&0x08&\textit{not applicable} \\
1457 \DWATordering&0x09&\livelink{chap:classconstant}{constant}
1458 \addtoindexx{ordering attribute} \\
1459 \bbeb\textit{Reserved}&0x0a&\textit{not applicable} \\
1460 \DWATbytesize&0x0b&\livelink{chap:classconstant}{constant},
1461 \livelink{chap:classexprloc}{exprloc},
1462 \livelink{chap:classreference}{reference}
1463 \addtoindexx{byte size attribute} \\
1464 \textit{Reserved}&0x0c\footnote{Code 0x0c is reserved to allow backward compatible support of the
1465 DW\_AT\_bit\_offset \mbox{attribute} which was
1466 defined in \DWARFVersionIII{} and earlier.}
1467 &\livelink{chap:classconstant}{constant},
1468 \livelink{chap:classexprloc}{exprloc},
1469 \livelink{chap:classreference}{reference}
1470 \addtoindexx{bit offset attribute (Version 3)}
1471 \addtoindexx{DW\_AT\_bit\_offset (deprecated)} \\
1472 \DWATbitsize&0x0d&\livelink{chap:classconstant}{constant},
1473 \livelink{chap:classexprloc}{exprloc},
1474 \livelink{chap:classreference}{reference}
1475 \addtoindexx{bit size attribute} \\
1476 \bbeb\textit{Reserved}&0x0e&\textit{not applicable} \\
1477 \bbeb\textit{Reserved}&0x0f&\textit{not applicable} \\
1478 \DWATstmtlist&0x10&\livelink{chap:classlineptr}{lineptr}
1479 \addtoindexx{statement list attribute} \\
1480 \DWATlowpc&0x11&\livelink{chap:classaddress}{address}
1481 \addtoindexx{low PC attribute} \\
1482 \DWAThighpc&0x12&\livelink{chap:classaddress}{address},
1483 \livelink{chap:classconstant}{constant}
1484 \addtoindexx{high PC attribute} \\
1485 \DWATlanguage&0x13&\livelink{chap:classconstant}{constant}
1486 \addtoindexx{language attribute} \\
1487 \bbeb\textit{Reserved}&0x14&\textit{not applicable} \\
1488 \DWATdiscr&0x15&\livelink{chap:classreference}{reference}
1489 \addtoindexx{discriminant attribute} \\
1490 \DWATdiscrvalue&0x16&\livelink{chap:classconstant}{constant}
1491 \addtoindexx{discriminant value attribute} \\
1492 \DWATvisibility&0x17&\livelink{chap:classconstant}{constant}
1493 \addtoindexx{visibility attribute} \\
1494 \DWATimport&0x18&\livelink{chap:classreference}{reference}
1495 \addtoindexx{import attribute} \\
1496 \DWATstringlength&0x19&\livelink{chap:classexprloc}{exprloc},
1498 \bbeb \CLASSreference
1499 \addtoindexx{string length attribute} \\
1500 \DWATcommonreference&0x1a&\livelink{chap:classreference}{reference}
1501 \addtoindexx{common reference attribute} \\
1502 \DWATcompdir&0x1b&\livelink{chap:classstring}{string}
1503 \addtoindexx{compilation directory attribute} \\
1504 \DWATconstvalue&0x1c&\livelink{chap:classblock}{block},
1505 \livelink{chap:classconstant}{constant},
1506 \livelink{chap:classstring}{string}
1507 \addtoindexx{constant value attribute} \\
1508 \DWATcontainingtype&0x1d&\livelink{chap:classreference}{reference}
1509 \addtoindexx{containing type attribute} \\
1510 \DWATdefaultvalue&0x1e&\livelink{chap:classconstant}{constant},
1511 \livelink{chap:classreference}{reference},
1512 \livelink{chap:classflag}{flag}
1513 \addtoindexx{default value attribute} \\
1514 \bbeb\textit{Reserved}&0x1f&\textit{not applicable} \\
1515 \DWATinline&0x20&\livelink{chap:classconstant}{constant}
1516 \addtoindexx{inline attribute} \\
1517 \DWATisoptional&0x21&\livelink{chap:classflag}{flag}
1518 \addtoindexx{is optional attribute} \\
1519 \DWATlowerbound&0x22&\livelink{chap:classconstant}{constant},
1520 \livelink{chap:classexprloc}{exprloc},
1521 \livelink{chap:classreference}{reference}
1522 \addtoindexx{lower bound attribute} \\
1523 \bbeb\textit{Reserved}&0x23&\textit{not applicable} \\
1524 \bbeb\textit{Reserved}&0x24&\textit{not applicable} \\
1525 \DWATproducer&0x25&\livelink{chap:classstring}{string}
1526 \addtoindexx{producer attribute} \\
1527 \bbeb\textit{Reserved}&0x26&\textit{not applicable} \\
1528 \DWATprototyped&0x27&\livelink{chap:classflag}{flag}
1529 \addtoindexx{prototyped attribute} \\
1530 \bbeb\textit{Reserved}&0x28&\textit{not applicable} \\
1531 \bbeb\textit{Reserved}&0x29&\textit{not applicable} \\
1532 \DWATreturnaddr&0x2a&\livelink{chap:classexprloc}{exprloc},
1534 \addtoindexx{return address attribute} \\
1535 \bbeb\textit{Reserved}&0x2b&\textit{not applicable} \\
1536 \DWATstartscope&0x2c&
1537 \livelink{chap:classconstant}{constant},
1539 \addtoindexx{start scope attribute} \\
1540 \bbeb\textit{Reserved}&0x2d&\textit{not applicable} \\
1541 \DWATbitstride&0x2e&\livelink{chap:classconstant}{constant},
1542 \livelink{chap:classexprloc}{exprloc},
1543 \livelink{chap:classreference}{reference}
1544 \addtoindexx{bit stride attribute} \\
1545 \DWATupperbound&0x2f&\livelink{chap:classconstant}{constant},
1546 \livelink{chap:classexprloc}{exprloc},
1547 \livelink{chap:classreference}{reference}
1548 \addtoindexx{upper bound attribute} \\
1549 \bbeb\textit{Reserved}&0x30&\textit{not applicable} \\
1550 \DWATabstractorigin&0x31&\livelink{chap:classreference}{reference}
1551 \addtoindexx{abstract origin attribute} \\
1552 \DWATaccessibility&0x32&\livelink{chap:classconstant}{constant}
1553 \addtoindexx{accessibility attribute} \\
1554 \DWATaddressclass&0x33&\livelink{chap:classconstant}{constant}
1555 \addtoindexx{address class attribute} \\
1556 \DWATartificial&0x34&\livelink{chap:classflag}{flag}
1557 \addtoindexx{artificial attribute} \\
1558 \DWATbasetypes&0x35&\livelink{chap:classreference}{reference}
1559 \addtoindexx{base types attribute} \\
1560 \DWATcallingconvention&0x36&\livelink{chap:classconstant}{constant}
1561 \addtoindexx{calling convention attribute} \\
1562 \DWATcount&0x37&\livelink{chap:classconstant}{constant},
1563 \livelink{chap:classexprloc}{exprloc},
1564 \livelink{chap:classreference}{reference}
1565 \addtoindexx{count attribute} \\
1566 \DWATdatamemberlocation&0x38&\livelink{chap:classconstant}{constant},
1567 \livelink{chap:classexprloc}{exprloc},
1569 \addtoindexx{data member attribute} \\
1570 \DWATdeclcolumn&0x39&\livelink{chap:classconstant}{constant}
1571 \addtoindexx{declaration column attribute} \\
1572 \DWATdeclfile&0x3a&\livelink{chap:classconstant}{constant}
1573 \addtoindexx{declaration file attribute} \\
1574 \DWATdeclline&0x3b&\livelink{chap:classconstant}{constant}
1575 \addtoindexx{declaration line attribute} \\
1576 \DWATdeclaration&0x3c&\livelink{chap:classflag}{flag}
1577 \addtoindexx{declaration attribute} \\
1578 \DWATdiscrlist&0x3d&\livelink{chap:classblock}{block}
1579 \addtoindexx{discriminant list attribute} \\
1580 \DWATencoding&0x3e&\livelink{chap:classconstant}{constant}
1581 \addtoindexx{encoding attribute} \\
1582 \DWATexternal&\xiiif&\livelink{chap:classflag}{flag}
1583 \addtoindexx{external attribute} \\
1584 \DWATframebase&0x40&\livelink{chap:classexprloc}{exprloc},
1586 \addtoindexx{frame base attribute} \\
1587 \DWATfriend&0x41&\livelink{chap:classreference}{reference}
1588 \addtoindexx{friend attribute} \\
1589 \DWATidentifiercase&0x42&\livelink{chap:classconstant}{constant}
1590 \addtoindexx{identifier case attribute} \\
1591 \textit{Reserved}&0x43\footnote{Code 0x43 is reserved to allow backward compatible support of the
1592 DW\_AT\_macro\_info \mbox{attribute} which was
1593 defined in \DWARFVersionIV{} and earlier.}
1594 &\livelink{chap:classmacptr}{macptr}
1595 \addtoindexx{macro information attribute (legacy)!encoding} \\
1596 \DWATnamelistitem&0x44&\livelink{chap:classreference}{reference}
1597 \addtoindexx{name list item attribute} \\
1598 \DWATpriority&0x45&\livelink{chap:classreference}{reference}
1599 \addtoindexx{priority attribute} \\
1600 \DWATsegment&0x46&\livelink{chap:classexprloc}{exprloc},
1602 \addtoindexx{segment attribute} \\
1603 \DWATspecification&0x47&\livelink{chap:classreference}{reference}
1604 \addtoindexx{specification attribute} \\
1605 \DWATstaticlink&0x48&\livelink{chap:classexprloc}{exprloc},
1607 \addtoindexx{static link attribute} \\
1608 \DWATtype&0x49&\livelink{chap:classreference}{reference}
1609 \addtoindexx{type attribute} \\
1610 \DWATuselocation&0x4a&\livelink{chap:classexprloc}{exprloc},
1612 \addtoindexx{location list attribute} \\
1613 \DWATvariableparameter&0x4b&\livelink{chap:classflag}{flag}
1614 \addtoindexx{variable parameter attribute} \\
1615 \DWATvirtuality&0x4c&\livelink{chap:classconstant}{constant}
1616 \addtoindexx{virtuality attribute} \\
1617 \DWATvtableelemlocation&0x4d&\livelink{chap:classexprloc}{exprloc},
1619 \addtoindexx{vtable element location attribute} \\
1620 \DWATallocated&0x4e&\livelink{chap:classconstant}{constant},
1621 \livelink{chap:classexprloc}{exprloc},
1622 \livelink{chap:classreference}{reference}
1623 \addtoindexx{allocated attribute} \\
1624 \DWATassociated&0x4f&\livelink{chap:classconstant}{constant},
1625 \livelink{chap:classexprloc}{exprloc},
1626 \livelink{chap:classreference}{reference}
1627 \addtoindexx{associated attribute} \\
1628 \DWATdatalocation&0x50&\livelink{chap:classexprloc}{exprloc}
1629 \addtoindexx{data location attribute} \\
1630 \DWATbytestride&0x51&\livelink{chap:classconstant}{constant},
1631 \livelink{chap:classexprloc}{exprloc},
1632 \livelink{chap:classreference}{reference}
1633 \addtoindexx{byte stride attribute} \\
1634 \DWATentrypc&0x52&\livelink{chap:classaddress}{address},
1635 \livelink{chap:classconstant}{constant}
1636 \addtoindexx{entry PC attribute} \\
1637 \DWATuseUTFeight&0x53&\livelink{chap:classflag}{flag}
1638 \addtoindexx{use UTF8 attribute}\addtoindexx{UTF-8} \\
1639 \DWATextension&0x54&\livelink{chap:classreference}{reference}
1640 \addtoindexx{extension attribute} \\
1643 \addtoindexx{ranges attribute} \\
1644 \DWATtrampoline&0x56&\livelink{chap:classaddress}{address},
1645 \livelink{chap:classflag}{flag},
1646 \livelink{chap:classreference}{reference},
1647 \livelink{chap:classstring}{string}
1648 \addtoindexx{trampoline attribute} \\
1649 \DWATcallcolumn&0x57&\livelink{chap:classconstant}{constant}
1650 \addtoindexx{call column attribute} \\
1651 \DWATcallfile&0x58&\livelink{chap:classconstant}{constant}
1652 \addtoindexx{call file attribute} \\
1653 \DWATcallline&0x59&\livelink{chap:classconstant}{constant}
1654 \addtoindexx{call line attribute} \\
1655 \DWATdescription&0x5a&\livelink{chap:classstring}{string}
1656 \addtoindexx{description attribute} \\
1657 \DWATbinaryscale&0x5b&\livelink{chap:classconstant}{constant}
1658 \addtoindexx{binary scale attribute} \\
1659 \DWATdecimalscale&0x5c&\livelink{chap:classconstant}{constant}
1660 \addtoindexx{decimal scale attribute} \\
1661 \DWATsmall{} &0x5d&\livelink{chap:classreference}{reference}
1662 \addtoindexx{small attribute} \\
1663 \DWATdecimalsign&0x5e&\livelink{chap:classconstant}{constant}
1664 \addtoindexx{decimal scale attribute} \\
1665 \DWATdigitcount&0x5f&\livelink{chap:classconstant}{constant}
1666 \addtoindexx{digit count attribute} \\
1667 \DWATpicturestring&0x60&\livelink{chap:classstring}{string}
1668 \addtoindexx{picture string attribute} \\
1669 \DWATmutable&0x61&\livelink{chap:classflag}{flag}
1670 \addtoindexx{mutable attribute} \\
1671 \DWATthreadsscaled&0x62&\livelink{chap:classflag}{flag}
1672 \addtoindexx{thread scaled attribute} \\
1673 \DWATexplicit&0x63&\livelink{chap:classflag}{flag}
1674 \addtoindexx{explicit attribute} \\
1675 \DWATobjectpointer&0x64&\livelink{chap:classreference}{reference}
1676 \addtoindexx{object pointer attribute} \\
1677 \DWATendianity&0x65&\livelink{chap:classconstant}{constant}
1678 \addtoindexx{endianity attribute} \\
1679 \DWATelemental&0x66&\livelink{chap:classflag}{flag}
1680 \addtoindexx{elemental attribute} \\
1681 \DWATpure&0x67&\livelink{chap:classflag}{flag}
1682 \addtoindexx{pure attribute} \\
1683 \DWATrecursive&0x68&\livelink{chap:classflag}{flag}
1684 \addtoindexx{recursive attribute} \\
1685 \DWATsignature{} &0x69&\livelink{chap:classreference}{reference}
1686 \addtoindexx{signature attribute} \\
1687 \DWATmainsubprogram{} &0x6a&\livelink{chap:classflag}{flag}
1688 \addtoindexx{main subprogram attribute} \\
1689 \DWATdatabitoffset{} &0x6b&\livelink{chap:classconstant}{constant}
1690 \addtoindexx{data bit offset attribute} \\
1691 \DWATconstexpr{} &0x6c&\livelink{chap:classflag}{flag}
1692 \addtoindexx{constant expression attribute} \\
1693 \DWATenumclass{} &0x6d&\livelink{chap:classflag}{flag}
1694 \addtoindexx{enumeration class attribute} \\
1695 \DWATlinkagename{} &0x6e&\livelink{chap:classstring}{string}
1696 \addtoindexx{linkage name attribute} \\
1697 \DWATstringlengthbitsize{}~\ddag&0x6f&
1698 \livelink{chap:classconstant}{constant}
1699 \addtoindexx{string length attribute!size of length} \\
1700 \DWATstringlengthbytesize{}~\ddag&0x70&
1701 \livelink{chap:classconstant}{constant}
1702 \addtoindexx{string length attribute!size of length} \\
1703 \DWATrank~\ddag&0x71&
1704 \livelink{chap:classconstant}{constant},
1705 \livelink{chap:classexprloc}{exprloc}
1706 \addtoindexx{rank attribute} \\
1707 \DWATstroffsetsbase~\ddag&0x72&
1708 \livelinki{chap:classstroffsetsptr}{stroffsetsptr}{stroffsetsptr class}
1709 \addtoindexx{string offsets base!encoding} \\
1710 \DWATaddrbase~\ddag &0x73&
1711 \livelinki{chap:classaddrptr}{addrptr}{addrptr class}
1712 \addtoindexx{address table base!encoding} \\
1713 \DWATrnglistsbase~\ddag&0x74&
1715 \addtoindexx{range list base!encoding} \\
1716 \textit{Reserved} &0x75& \textit{Unused} \\
1717 \DWATdwoname~\ddag &0x76&
1718 \livelink{chap:classstring}{string}
1719 \addtoindexx{split DWARF object file name!encoding} \\
1720 \DWATreference~\ddag &0x77&
1721 \livelink{chap:classflag}{flag} \\
1722 \DWATrvaluereference~\ddag &0x78&
1723 \livelink{chap:classflag}{flag} \\
1724 \DWATmacros~\ddag &0x79&\livelink{chap:classmacptr}{macptr}
1725 \addtoindexx{macro information attribute} \\
1726 \DWATcallallcalls~\ddag &0x7a&\CLASSflag
1727 \addtoindexx{all calls summary attribute} \\
1728 \DWATcallallsourcecalls~\ddag &0x7b &\CLASSflag
1729 \addtoindexx{all source calls summary attribute} \\
1730 \DWATcallalltailcalls~\ddag &0x7c&\CLASSflag
1731 \addtoindexx{all tail calls summary attribute} \\
1732 \DWATcallreturnpc~\ddag &0x7d &\CLASSaddress
1733 \addtoindexx{call return PC attribute} \\
1734 \DWATcallvalue~\ddag &0x7e &\CLASSexprloc
1735 \addtoindexx{call value attribute} \\
1736 \DWATcallorigin~\ddag &0x7f &\CLASSexprloc
1737 \addtoindexx{call origin attribute} \\
1738 \DWATcallparameter~\ddag &0x80 &\CLASSreference
1739 \addtoindexx{call parameter attribute} \\
1740 \DWATcallpc~\ddag &0x81 &\CLASSaddress
1741 \addtoindexx{call PC attribute} \\
1742 \DWATcalltailcall~\ddag &0x82 &\CLASSflag
1743 \addtoindexx{call tail call attribute} \\
1744 \DWATcalltarget~\ddag &0x83 &\CLASSexprloc
1745 \addtoindexx{call target attribute} \\
1746 \DWATcalltargetclobbered~\ddag &0x84 &\CLASSexprloc
1747 \addtoindexx{call target clobbered attribute} \\
1748 \DWATcalldatalocation~\ddag &0x85 &\CLASSexprloc
1749 \addtoindexx{call data location attribute} \\
1750 \DWATcalldatavalue~\ddag &0x86 &\CLASSexprloc
1751 \addtoindexx{call data value attribute} \\
1752 \DWATnoreturn~\ddag &0x87 &\CLASSflag
1753 \addtoindexx{noreturn attribute} \\
1754 \DWATalignment~\ddag &0x88 &\CLASSconstant
1755 \addtoindexx{alignment attribute} \\
1756 \DWATexportsymbols~\ddag &0x89 &\CLASSflag
1757 \addtoindexx{export symbols attribute} \\
1758 \DWATdeleted~\ddag &0x8a &\CLASSflag \addtoindexx{deleted attribute} \\
1759 \DWATdefaulted~\ddag &0x8b &\CLASSconstant \addtoindexx{defaulted attribute} \\
1760 \DWATloclistsbase~\ddag &0x8c &\CLASSloclistsptr \addtoindexx{location list base attribute} \\
1761 \DWATlouser&0x2000 & --- \addtoindexx{low user attribute encoding} \\
1762 \DWAThiuser&\xiiifff& --- \addtoindexx{high user attribute encoding} \\
1767 \subsection{Classes and Forms}
1768 \label{datarep:classesandforms}
1769 Each class is a set of forms which have related representations
1770 and which are given a common interpretation according to the
1771 attribute in which the form is used.
1772 The attribute form governs how the value of an attribute is
1774 The classes and the forms they include are listed below.
1776 Form \DWFORMsecoffsetTARG{}
1777 is a member of more than one class, namely
1780 \CLASSloclist, \CLASSloclistsptr,
1782 \CLASSrnglist{}, \CLASSrnglistsptr,
1784 \CLASSstroffsetsptr;
1785 as a result, it is not possible for an
1786 attribute to allow more than one of these classes.
1787 The list of classes allowed by the applicable attribute in
1788 Table \refersec{tab:attributeencodings}
1789 determines the class of the form.
1792 In the form descriptions that follow, some forms are said
1793 to depend in part on the value of an attribute of the
1794 \definition{\associatedcompilationunit}:
1797 In the case of a \splitDWARFobjectfile{}, the associated
1798 compilation unit is the skeleton compilation unit corresponding
1799 to the containing unit.
1800 \item Otherwise, the associated compilation unit
1801 is the containing unit.
1805 Each possible form belongs to one or more of the following classes
1806 (see Table \refersec{tab:classesofattributevalue} for a summary of
1807 the purpose and general usage of each class):
1811 \item \CLASSaddress \\
1812 \livetarg{datarep:classaddress}{}
1813 Represented as either:
1815 \item An object of appropriate size to hold an
1816 address on the target machine (\DWFORMaddrTARG).
1817 The size is encoded in the compilation unit header
1818 (see Section \refersec{datarep:compilationunitheader}).
1819 This address is relocatable in a relocatable object file and
1820 is relocated in an executable file or shared object file.
1822 \item An indirect index into a table of addresses (as
1823 described in the previous bullet) in the
1824 \dotdebugaddr{} section (\DWFORMaddrxTARG).
1825 The representation of a \DWFORMaddrxNAME{} value is an unsigned
1826 \addtoindex{LEB128} value, which is interpreted as a zero-based
1827 index into an array of addresses in the \dotdebugaddr{} section.
1828 The index is relative to the value of the \DWATaddrbase{} attribute
1829 of the associated compilation unit.
1834 \item \CLASSaddrptr \\
1835 \livetarg{datarep:classaddrptr}{}
1836 This is an offset into the \dotdebugaddr{} section (\DWFORMsecoffset). It
1837 consists of an offset from the beginning of the \dotdebugaddr{} section to the
1838 beginning of the list of machine addresses information for the
1839 referencing entity. It is relocatable in
1840 a relocatable object file, and relocated in an executable or
1841 shared object file. In the \thirtytwobitdwarfformat, this offset
1842 is a 4-byte unsigned value; in the 64-bit DWARF
1843 format, it is an 8-byte unsigned value (see Section
1844 \refersec{datarep:32bitand64bitdwarfformats}).
1846 \textit{This class is new in \DWARFVersionV.}
1849 \item \CLASSblock \\
1850 \livetarg{datarep:classblock}{}
1851 Blocks come in four forms:
1854 A 1-byte length followed by 0 to 255 contiguous information
1855 bytes (\DWFORMblockoneTARG).
1858 A 2-byte length followed by 0 to 65,535 contiguous information
1859 bytes (\DWFORMblocktwoTARG).
1862 A 4-byte length followed by 0 to 4,294,967,295 contiguous
1863 information bytes (\DWFORMblockfourTARG).
1866 An unsigned LEB128\addtoindexx{LEB128!unsigned}
1867 length followed by the number of bytes
1868 specified by the length (\DWFORMblockTARG).
1871 In all forms, the length is the number of information bytes
1872 that follow. The information bytes may contain any mixture
1873 of relocated (or relocatable) addresses, references to other
1874 debugging information entries or data bytes.
1876 \item \CLASSconstant \\
1877 \livetarg{datarep:classconstant}{}
1878 There are eight forms of constants. There are fixed length
1879 constant data forms for one-, two-, four-, eight- and sixteen-byte values
1883 \DWFORMdatafourTARG,
1884 \DWFORMdataeightTARG{} and
1885 \DWFORMdatasixteenTARG).
1886 There are variable length constant
1887 data forms encoded using
1888 signed LEB128 numbers (\DWFORMsdataTARG) and unsigned
1889 LEB128 numbers (\DWFORMudataTARG).
1890 There is also an implicit constant (\DWFORMimplicitconst),
1891 whose value is provided as part of the abbreviation
1895 The data in \DWFORMdataone,
1898 \DWFORMdataeight{} and
1899 \DWFORMdatasixteen{}
1900 can be anything. Depending on context, it may
1901 be a signed integer, an unsigned integer, a floating\dash point
1902 constant, or anything else. A consumer must use context to
1903 know how to interpret the bits, which if they are target
1904 machine data (such as an integer or floating-point constant)
1905 will be in target machine \byteorder.
1907 \textit{If one of the \DWFORMdataTARG\textless n\textgreater
1908 forms is used to represent a
1909 signed or unsigned integer, it can be hard for a consumer
1910 to discover the context necessary to determine which
1911 interpretation is intended. Producers are therefore strongly
1912 encouraged to use \DWFORMsdata{} or
1913 \DWFORMudata{} for signed and
1914 unsigned integers respectively, rather than
1915 \DWFORMdata\textless n\textgreater.}
1918 \item \CLASSexprloc \\
1919 \livetarg{datarep:classexprloc}{}
1920 This is an unsigned LEB128\addtoindexx{LEB128!unsigned} length
1921 followed by the number of information bytes specified by the
1922 length (\DWFORMexprlocTARG).
1923 The information bytes contain a DWARF expression
1924 (see Section \refersec{chap:dwarfexpressions})
1925 or location description
1926 (see Section \refersec{chap:locationdescriptions}).
1930 \livetarg{datarep:classflag}{}
1931 A flag \addtoindexx{flag class}
1932 is represented explicitly as a single byte of data
1933 (\DWFORMflagTARG) or implicitly (\DWFORMflagpresentTARG). In the
1934 first case, if the \nolink{flag} has value zero, it indicates the
1935 absence of the attribute; if the \nolink{flag} has a non-zero value,
1936 it indicates the presence of the attribute. In the second
1937 case, the attribute is implicitly indicated as present, and
1938 no value is encoded in the debugging information entry itself.
1941 \item \CLASSlineptr \\
1942 \livetarg{datarep:classlineptr}{}
1943 This is an offset into
1944 \addtoindexx{section offset!in class lineptr value}
1946 \dotdebugline{} or \dotdebuglinedwo{} section
1948 It consists of an offset from the beginning of the
1950 section to the first byte of
1951 the data making up the line number list for the compilation
1953 It is relocatable in a relocatable object file, and
1954 relocated in an executable or shared object file. In the
1955 \thirtytwobitdwarfformat, this offset is a 4-byte unsigned value;
1956 in the \sixtyfourbitdwarfformat, it is an 8-byte unsigned value
1957 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1960 \item \CLASSloclist \\
1961 \livetarg{datarep:classloclist}{}
1962 This is represented as either:
1965 An index into the \dotdebugloclists{} section (\DWFORMloclistxTARG).
1966 The unsigned ULEB operand identifies an offset location
1967 relative to the base of that section (the location of the first offset
1968 in the section, not the first byte of the section). The contents of
1969 that location is then added to the base to determine the location of
1970 the target list of entries.
1972 An offset into the \dotdebugloclists{} section (\DWFORMsecoffset).
1973 The operand consists of a byte
1974 offset\addtoindexx{section offset!in class loclist value}
1975 from the beginning of the \dotdebugloclists{} section.
1976 It is relocatable in a relocatable object file, and
1977 relocated in an executable or shared object file. In the
1978 \thirtytwobitdwarfformat, this offset is a 4-byte unsigned value;
1979 in the \sixtyfourbitdwarfformat, it is an 8-byte unsigned value
1980 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1983 \textit{This class is new in \DWARFVersionV.}
1985 \item \CLASSloclistsptr \\
1986 \livetarg{datarep:classloclistsptr}{}
1987 This is an offset into the \dotdebugloclists{} section (\DWFORMsecoffset).
1988 The operand consists of a byte
1989 offset\addtoindexx{section offset!in class loclistsptr}
1990 from the beginning of the \dotdebugloclists{} section.
1991 It is relocatable in a relocatable object file, and
1992 relocated in an executable or shared object file. In the
1993 \thirtytwobitdwarfformat, this offset is a 4-byte unsigned value;
1994 in the \sixtyfourbitdwarfformat, it is an 8-byte unsigned value
1995 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1997 \textit{This class is new in \DWARFVersionV.}
1999 \item \CLASSmacptr \\
2000 \livetarg{datarep:classmacptr}{}
2002 \addtoindexx{section offset!in class macptr value}
2004 \dotdebugmacro{} or \dotdebugmacrodwo{} section
2006 It consists of an offset from the beginning of the
2007 \dotdebugmacro{} or \dotdebugmacrodwo{}
2008 section to the the header making up the
2009 macro information list for the compilation unit.
2010 It is relocatable in a relocatable object file, and
2011 relocated in an executable or shared object file. In the
2012 \thirtytwobitdwarfformat, this offset is a 4-byte unsigned value;
2013 in the \sixtyfourbitdwarfformat, it is an 8-byte unsigned value
2014 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
2017 \item \CLASSrnglist \\
2018 \livetarg{datarep:classrnglist}{}
2019 This is represented as either:
2022 An index into the \dotdebugrnglists{} section (\DWFORMrnglistxTARG).
2023 The unsigned ULEB operand identifies an offset location
2024 relative to the base of that section (the location of the first offset
2025 in the section, not the first byte of the section). The contents of
2026 that location is then added to the base to determine the location of
2027 the target range list of entries.
2030 An offset into the \dotdebugrnglists{} section (\DWFORMsecoffset).
2031 The operand consists of a byte
2032 offset\addtoindexx{section offset!in class rnglist value}
2034 from the beginning of the \dotdebugrnglists{} section.
2035 It is relocatable in a relocatable object file, and
2036 relocated in an executable or shared object file. In the
2037 \thirtytwobitdwarfformat, this offset is a 4-byte unsigned value;
2038 in the \sixtyfourbitdwarfformat, it is an 8-byte unsigned value
2039 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
2042 \textit{This class is new in \DWARFVersionV.}
2045 \item \CLASSrnglistsptr \\
2046 \livetarg{datarep:classrnglistsptr}{}
2047 This is an offset\addtoindexx{section offset!in class rnglistsptr}
2048 into the \dotdebugrnglists{} section (\DWFORMsecoffset).
2049 It consists of a byte offset from the beginning of the
2050 \dotdebugrnglists{} section.
2051 It is relocatable in a relocatable object file, and relocated
2052 in an executable or shared object file.
2053 In the \thirtytwobitdwarfformat, this offset
2054 is a 4-byte unsigned value; in the 64-bit DWARF
2055 format, it is an 8-byte unsigned value (see Section
2056 \refersec{datarep:32bitand64bitdwarfformats}).
2058 \textit{This class is new in \DWARFVersionV.}
2061 \item \CLASSreference \\
2062 \livetarg{datarep:classreference}{}
2063 There are four types of reference.\addtoindexx{reference class}
2066 The first type of reference can identify any debugging
2067 information entry within the containing unit.
2068 This type of reference is an
2069 offset\addtoindexx{section offset!in class reference value}
2070 from the first byte of the compilation
2071 header for the compilation unit containing the reference. There
2072 are five forms for this type of reference. There are fixed
2073 length forms for one, two, four and eight byte offsets
2079 and \DWFORMrefeightTARG).
2080 There is also an unsigned variable
2081 length offset encoded form that uses
2082 unsigned LEB128\addtoindexx{LEB128!unsigned} numbers
2083 (\DWFORMrefudataTARG).
2084 Because this type of reference is within
2085 the containing compilation unit no relocation of the value
2089 The second type of reference can identify any debugging
2090 information entry within a
2091 \dotdebuginfo{} section; in particular,
2092 it may refer to an entry in a different compilation unit
2093 from the unit containing the reference, and may refer to an
2094 entry in a different shared object file. This type of reference
2095 (\DWFORMrefaddrTARG)
2096 is an offset from the beginning of the
2098 section of the target executable or shared object file, or, for
2099 references within a \addtoindex{supplementary object file},
2100 an offset from the beginning of the local \dotdebuginfo{} section;
2101 it is relocatable in a relocatable object file and frequently
2102 relocated in an executable or shared object file. For
2103 references from one shared object or static executable file
2104 to another, the relocation and identification of the target
2105 object must be performed by the consumer. In the
2106 \thirtytwobitdwarfformat, this offset is a 4-byte unsigned value;
2107 in the \sixtyfourbitdwarfformat, it is an 8-byte
2109 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
2111 \textit{A debugging information entry that may be referenced by
2112 another compilation unit using
2113 \DWFORMrefaddr{} must have a global symbolic name.}
2115 \textit{For a reference from one executable or shared object file to
2116 another, the reference is resolved by the debugger to identify
2117 the executable or shared object file and the offset into that
2118 file\textquoteright s \dotdebuginfo{}
2119 section in the same fashion as the run
2120 time loader, either when the debug information is first read,
2121 or when the reference is used.}
2124 The third type of reference can identify any debugging
2125 information type entry that has been placed in its own
2126 \addtoindex{type unit}. This type of
2127 reference (\DWFORMrefsigeightTARG) is the
2128 \addtoindexx{type signature}
2129 8-byte type signature
2130 (see Section \refersec{datarep:typesignaturecomputation})
2131 that was computed for the type.
2134 The fourth type of reference is a reference from within the
2135 \dotdebuginfo{} section of the executable or shared object file to
2136 a debugging information entry in the \dotdebuginfo{} section of
2137 a \addtoindex{supplementary object file}.
2138 This type of reference (\DWFORMrefsupfourTARG{}
2140 or \DWFORMrefsupeightTARG{}) is a 4- or 8-byte offset (respectively)
2142 from the beginning of the \dotdebuginfo{} section in the
2143 \addtoindex{supplementary object file}.
2145 \textit{The use of compilation unit relative references will reduce the
2146 number of link\dash time relocations and so speed up linking. The
2147 use of the second, third and fourth type of reference allows for the
2148 sharing of information, such as types, across compilation
2149 units, while the fourth type further allows for sharing of information
2150 across compilation units from different executables or shared object files.}
2152 \textit{A reference to any kind of compilation unit identifies the
2153 debugging information entry for that unit, not the preceding
2158 \item \CLASSstring \\
2159 \livetarg{datarep:classstring}{}
2160 A string is a sequence of contiguous non\dash null bytes followed by
2162 \addtoindexx{string class}
2163 A string may be represented:
2165 \setlength{\itemsep}{0em}
2166 \item immediately in the debugging information entry itself
2167 (\DWFORMstringTARG),
2170 \addtoindexx{section offset!in class string value}
2171 offset into a string table contained in
2172 the \dotdebugstr{} section of the object file (\DWFORMstrpTARG),
2173 the \dotdebuglinestr{} section of the object file (\DWFORMlinestrpTARG),
2174 or as an offset into a string table contained in the
2175 \dotdebugstr{} section of a \addtoindex{supplementary object file}
2176 (\DWFORMstrpsupTARG). \DWFORMstrpsupNAME{} offsets from the \dotdebuginfo{}
2177 section of a \addtoindex{supplementary object file}
2178 refer to the local \dotdebugstr{} section of that same file.
2179 In the \thirtytwobitdwarfformat, the representation of a
2182 \DWFORMlinestrpNAME{}
2184 or \DWFORMstrpsupNAME{}
2185 value is a 4-byte unsigned offset; in the \sixtyfourbitdwarfformat,
2186 it is an 8-byte unsigned offset
2187 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
2190 \item as an indirect offset into the string table using an
2191 index into a table of offsets contained in the
2192 \dotdebugstroffsets{} section of the object file (\DWFORMstrxTARG).
2193 The representation of a \DWFORMstrxNAME{} value is an unsigned
2194 \addtoindex{LEB128} value, which is interpreted as a zero-based
2195 index into an array of offsets in the \dotdebugstroffsets{} section.
2196 The offset entries in the \dotdebugstroffsets{} section have the
2197 same representation as \DWFORMstrp{} values.
2199 Any combination of these three forms may be used within a single compilation.
2201 If the \DWATuseUTFeight{}
2202 \addtoindexx{use UTF8 attribute}\addtoindexx{UTF-8} attribute is specified for the
2203 compilation, partial, skeleton or type unit entry, string values are encoded using the
2204 UTF\dash 8 (\addtoindex{Unicode} Transformation Format\dash 8) from the Universal
2205 Character Set standard (ISO/IEC 10646\dash 1:1993).
2206 \addtoindexx{ISO 10646 character set standard}
2207 Otherwise, the string representation is unspecified.
2209 \textit{The \addtoindex{Unicode} Standard Version 3 is fully compatible with
2210 ISO/IEC 10646\dash 1:1993.
2211 \addtoindexx{ISO 10646 character set standard}
2212 It contains all the same characters
2213 and encoding points as ISO/IEC 10646, as well as additional
2214 information about the characters and their use.}
2217 \textit{Earlier versions of DWARF did not specify the representation
2218 of strings; for compatibility, this version also does
2219 not. However, the UTF\dash 8 representation is strongly recommended.}
2222 \item \CLASSstroffsetsptr \\
2223 \livetarg{datarep:classstroffsetsptr}{}
2224 This is an offset into the \dotdebugstroffsets{} section
2225 (\DWFORMsecoffset). It consists of an offset from the beginning of the
2226 \dotdebugstroffsets{} section to the
2227 beginning of the string offsets information for the
2228 referencing entity. It is relocatable in
2229 a relocatable object file, and relocated in an executable or
2230 shared object file. In the \thirtytwobitdwarfformat, this offset
2231 is a 4-byte unsigned value; in the \sixtyfourbitdwarfformat,
2232 it is an 8-byte unsigned value (see Section
2233 \refersec{datarep:32bitand64bitdwarfformats}).
2235 \textit{This class is new in \DWARFVersionV.}
2239 In no case does an attribute use one of the classes
2244 \CLASSrnglistsptr{} or
2245 \CLASSstroffsetsptr{}
2246 to point into either the
2247 \dotdebuginfo{} or \dotdebugstr{} section.
2249 \subsection{Form Encodings}
2250 \label{datarep:formencodings}
2251 The form encodings are listed in
2252 Table \referfol{tab:attributeformencodings}.
2256 \setlength{\extrarowheight}{0.1cm}
2257 \begin{longtable}{l|c|l}
2258 \caption{Attribute form encodings} \label{tab:attributeformencodings} \\
2259 \hline \bfseries Form name&\bfseries Value &\bfseries Classes \\ \hline
2261 \bfseries Form name&\bfseries Value &\bfseries Classes\\ \hline
2263 \hline \emph{Continued on next page}
2265 \hline \ddag\ \textit{New in DWARF Version 5}
2268 \DWFORMaddr &0x01&\livelink{chap:classaddress}{address} \\
2269 \textit{Reserved} &0x02& \\
2270 \DWFORMblocktwo &0x03&\livelink{chap:classblock}{block} \\
2271 \DWFORMblockfour &0x04&\livelink{chap:classblock}{block} \\
2272 \DWFORMdatatwo &0x05&\livelink{chap:classconstant}{constant} \\
2273 \DWFORMdatafour &0x06&\livelink{chap:classconstant}{constant} \\
2274 \DWFORMdataeight &0x07&\livelink{chap:classconstant}{constant} \\
2275 \DWFORMstring&0x08&\livelink{chap:classstring}{string} \\
2276 \DWFORMblock&0x09&\livelink{chap:classblock}{block} \\
2277 \DWFORMblockone &0x0a&\livelink{chap:classblock}{block} \\
2278 \DWFORMdataone &0x0b&\livelink{chap:classconstant}{constant} \\
2279 \DWFORMflag&0x0c&\livelink{chap:classflag}{flag} \\
2280 \DWFORMsdata&0x0d&\livelink{chap:classconstant}{constant} \\
2281 \DWFORMstrp&0x0e&\livelink{chap:classstring}{string} \\
2282 \DWFORMudata&0x0f&\livelink{chap:classconstant}{constant} \\
2283 \DWFORMrefaddr&0x10&\livelink{chap:classreference}{reference} \\
2284 \DWFORMrefone&0x11&\livelink{chap:classreference}{reference} \\
2285 \DWFORMreftwo&0x12&\livelink{chap:classreference}{reference} \\
2286 \DWFORMreffour&0x13&\livelink{chap:classreference}{reference} \\
2287 \DWFORMrefeight&0x14&\livelink{chap:classreference}{reference} \\
2288 \DWFORMrefudata&0x15&\livelink{chap:classreference}{reference} \\
2289 \DWFORMindirect&0x16&(see Section \refersec{datarep:abbreviationstables}) \\
2290 \DWFORMsecoffset{} &0x17& \CLASSaddrptr, \CLASSlineptr, \CLASSloclist, \CLASSloclistsptr, \\
2291 & & \CLASSmacptr, \CLASSrnglist, \CLASSrnglistsptr, \CLASSstroffsetsptr \\
2292 \DWFORMexprloc{} &0x18&\livelink{chap:classexprloc}{exprloc} \\
2293 \DWFORMflagpresent{} &0x19&\livelink{chap:classflag}{flag} \\
2294 \DWFORMstrx{} \ddag &0x1a&\livelink{chap:classstring}{string} \\
2295 \DWFORMaddrx{} \ddag &0x1b&\livelink{chap:classaddress}{address} \\
2296 \DWFORMrefsupfour{}~\ddag &0x1c &\livelink{chap:classreference}{reference} \\
2297 \DWFORMstrpsup{}~\ddag &0x1d &\livelink{chap:classstring}{string} \\
2298 \DWFORMdatasixteen~\ddag &0x1e &\CLASSconstant \\
2299 \DWFORMlinestrp~\ddag &0x1f &\CLASSstring \\
2300 \DWFORMrefsigeight &0x20 &\livelink{chap:classreference}{reference} \\
2301 \DWFORMimplicitconst~\ddag &0x21 &\CLASSconstant \\
2302 \DWFORMloclistx~\ddag &0x22 &\CLASSloclist \\
2303 \DWFORMrnglistx~\ddag &0x23 &\CLASSrnglist \\
2304 \DWFORMrefsupeight{}~\ddag &0x24 &\CLASSreference \\
2310 \section{Variable Length Data}
2311 \label{datarep:variablelengthdata}
2312 \addtoindexx{variable length data|see {LEB128}}
2314 \addtoindexx{Little-Endian Base 128|see{LEB128}}
2315 encoded using \doublequote{Little-Endian Base 128}
2316 \addtoindexx{little-endian encoding|see{endian attribute}}
2318 \addtoindexx{LEB128}
2319 LEB128 is a scheme for encoding integers
2320 densely that exploits the assumption that most integers are
2323 \textit{This encoding is equally suitable whether the target machine
2324 architecture represents data in big-endian or little-endian
2325 \byteorder. It is \doublequote{little-endian} only in the sense that it
2326 avoids using space to represent the \doublequote{big} end of an
2327 unsigned integer, when the big end is all zeroes or sign
2330 Unsigned LEB128\addtoindexx{LEB128!unsigned} (\addtoindex{ULEB128})
2331 numbers are encoded as follows:
2332 \addtoindexx{LEB128!unsigned, encoding as}
2333 start at the low order end of an unsigned integer and chop
2334 it into 7-bit chunks. Place each chunk into the low order 7
2335 bits of a byte. Typically, several of the high order bytes
2336 will be zero; discard them. Emit the remaining bytes in a
2337 stream, starting with the low order byte; set the high order
2338 bit on each byte except the last emitted byte. The high bit
2339 of zero on the last byte indicates to the decoder that it
2340 has encountered the last byte.
2342 The integer zero is a special case, consisting of a single
2345 Table \refersec{tab:examplesofunsignedleb128encodings}
2346 gives some examples of unsigned LEB128\addtoindexx{LEB128!unsigned}
2348 0x80 in each case is the high order bit of the byte, indicating
2349 that an additional byte follows.
2352 The encoding for signed, two\textquoteright{s} complement LEB128
2353 (\addtoindex{SLEB128}) \addtoindexx{LEB128!signed, encoding as}
2354 numbers is similar, except that the criterion for discarding
2355 high order bytes is not whether they are zero, but whether
2356 they consist entirely of sign extension bits. Consider the
2357 4-byte integer -2. The three high level bytes of the number
2358 are sign extension, thus LEB128 would represent it as a single
2359 byte containing the low order 7 bits, with the high order
2360 bit cleared to indicate the end of the byte stream. Note
2361 that there is nothing within the LEB128 representation that
2362 indicates whether an encoded number is signed or unsigned. The
2363 decoder must know what type of number to expect.
2364 Table \refersec{tab:examplesofunsignedleb128encodings}
2365 gives some examples of unsigned LEB128\addtoindexx{LEB128!unsigned}
2366 numbers and Table \refersec{tab:examplesofsignedleb128encodings}
2367 gives some examples of signed LEB128\addtoindexx{LEB128!signed}
2370 \textit{Appendix \refersec{app:variablelengthdataencodingdecodinginformative}
2371 \addtoindexx{LEB128!examples}
2372 gives algorithms for encoding and decoding these forms.}
2376 \setlength{\extrarowheight}{0.1cm}
2377 \begin{longtable}{c|c|c}
2378 \caption{Examples of unsigned LEB128 encodings}
2379 \label{tab:examplesofunsignedleb128encodings}
2380 \addtoindexx{LEB128 encoding!examples}\addtoindexx{LEB128!unsigned} \\
2381 \hline \bfseries Number&\bfseries First byte &\bfseries Second byte \\ \hline
2383 \bfseries Number&\bfseries First Byte &\bfseries Second byte\\ \hline
2385 \hline \emph{Continued on next page}
2391 128& 0 + 0x80 & 1 \\
2392 129& 1 + 0x80 & 1 \\
2393 %130& 2 + 0x80 & 1 \\
2394 12857& 57 + 0x80 & 100 \\
2401 \setlength{\extrarowheight}{0.1cm}
2402 \begin{longtable}{c|c|c}
2403 \caption{Examples of signed LEB128 encodings}
2404 \label{tab:examplesofsignedleb128encodings}
2405 \addtoindexx{LEB128!signed} \\
2406 \hline \bfseries Number&\bfseries First byte &\bfseries Second byte \\ \hline
2408 \bfseries Number&\bfseries First Byte &\bfseries Second byte\\ \hline
2410 \hline \emph{Continued on next page}
2416 127& 127 + 0x80 & 0 \\
2417 -127& 1 + 0x80 & 0x7f \\
2418 128& 0 + 0x80 & 1 \\
2419 -128& 0 + 0x80 & 0x7f \\
2420 129& 1 + 0x80 & 1 \\
2421 -129& 0x7f + 0x80 & 0x7e \\
2428 \section{DWARF Expressions and Location Descriptions}
2429 \label{datarep:dwarfexpressionsandlocationdescriptions}
2430 \subsection{DWARF Expressions}
2431 \label{datarep:dwarfexpressions}
2434 \addtoindexx{DWARF expression!operator encoding}
2435 DWARF expression is stored in a \nolink{block} of contiguous
2436 bytes. The bytes form a sequence of operations. Each operation
2437 is a 1-byte code that identifies that operation, followed by
2438 zero or more bytes of additional data. The encodings for the
2439 operations are described in
2440 Table \refersec{tab:dwarfoperationencodings}.
2443 \setlength{\extrarowheight}{0.1cm}
2444 \begin{longtable}{l|c|c|l}
2445 \caption{DWARF operation encodings} \label{tab:dwarfoperationencodings} \\
2446 \hline & &\bfseries No. of &\\
2447 \bfseries Operation&\bfseries Code &\bfseries Operands &\bfseries Notes\\ \hline
2449 & &\bfseries No. of &\\
2450 \bfseries Operation&\bfseries Code &\bfseries Operands &\bfseries Notes\\ \hline
2452 \hline \emph{Continued on next page}
2454 \hline \ddag\ \textit{New in DWARF Version 5}
2457 \bbeb\textit{Reserved}&0x01&-& \\
2458 \bbeb\textit{Reserved}&0x02&-& \\
2459 \DWOPaddr&0x03&1 & constant address \\
2460 & & &(size is target specific) \\
2461 \bbeb\textit{Reserved}&0x04&-& \\
2462 \bbeb\textit{Reserved}&0x05&-& \\
2463 \DWOPderef&0x06&0 & \\
2464 \bbeb\textit{Reserved}&0x07&-& \\
2465 \DWOPconstoneu&0x08&1&1-byte constant \\
2466 \DWOPconstones&0x09&1&1-byte constant \\
2467 \DWOPconsttwou&0x0a&1&2-byte constant \\
2468 \DWOPconsttwos&0x0b&1&2-byte constant \\
2469 \DWOPconstfouru&0x0c&1&4-byte constant \\
2470 \DWOPconstfours&0x0d&1&4-byte constant \\
2471 \DWOPconsteightu&0x0e&1&8-byte constant \\
2472 \DWOPconsteights&0x0f&1&8-byte constant \\
2473 \DWOPconstu&0x10&1&ULEB128 constant \\
2474 \DWOPconsts&0x11&1&SLEB128 constant \\
2475 \DWOPdup&0x12&0 & \\
2476 \DWOPdrop&0x13&0 & \\
2477 \DWOPover&0x14&0 & \\
2478 \DWOPpick&0x15&1&1-byte stack index \\
2479 \DWOPswap&0x16&0 & \\
2480 \DWOProt&0x17&0 & \\
2481 \DWOPxderef&0x18&0 & \\
2482 \DWOPabs&0x19&0 & \\
2483 \DWOPand&0x1a&0 & \\
2484 \DWOPdiv&0x1b&0 & \\
2485 \DWOPminus&0x1c&0 & \\
2486 \DWOPmod&0x1d&0 & \\
2487 \DWOPmul&0x1e&0 & \\
2488 \DWOPneg&0x1f&0 & \\
2489 \DWOPnot&0x20&0 & \\
2491 \DWOPplus&0x22&0 & \\
2492 \DWOPplusuconst&0x23&1&ULEB128 addend \\
2493 \DWOPshl&0x24&0 & \\
2494 \DWOPshr&0x25&0 & \\
2495 \DWOPshra&0x26&0 & \\
2496 \DWOPxor&0x27&0 & \\
2498 \DWOPbra&0x28&1 & signed 2-byte constant \\
2505 \DWOPskip&0x2f&1&signed 2-byte constant \\ \hline
2507 \DWOPlitzero & 0x30 & 0 & \\
2508 \DWOPlitone & 0x31 & 0& literals 0 .. 31 = \\
2509 \ldots & & &\hspace{0.3cm}(\DWOPlitzero{} + literal) \\
2510 \DWOPlitthirtyone & 0x4f & 0 & \\ \hline
2512 \DWOPregzero & 0x50 & 0 & \\*
2513 \DWOPregone & 0x51 & 0® 0 .. 31 = \\*
2514 \ldots & & &\hspace{0.3cm}(\DWOPregzero{} + regnum) \\*
2515 \DWOPregthirtyone & 0x6f & 0 & \\ \hline
2517 \DWOPbregzero & 0x70 &1 & SLEB128 offset \\*
2518 \DWOPbregone & 0x71 & 1 &base register 0 .. 31 = \\*
2519 ... & & &\hspace{0.3cm}(\DWOPbregzero{} + regnum) \\*
2520 \DWOPbregthirtyone & 0x8f & 1 & \\ \hline
2522 \DWOPregx{} & 0x90 &1&ULEB128 register \\
2523 \DWOPfbreg{} & 0x91&1&SLEB128 offset \\
2524 \DWOPbregx{} & 0x92&2 &ULEB128 register, \\*
2525 & & &SLEB128 offset \\
2526 \DWOPpiece{} & 0x93 &1& ULEB128 size of piece \\
2527 \DWOPderefsize{} & 0x94 &1& 1-byte size of data retrieved \\
2528 \DWOPxderefsize{} & 0x95&1&1-byte size of data retrieved \\
2529 \DWOPnop{} & 0x96 &0& \\
2531 \DWOPpushobjectaddress&0x97&0 & \\
2532 \DWOPcalltwo&0x98&1& 2-byte offset of DIE \\
2533 \DWOPcallfour&0x99&1& 4-byte offset of DIE \\
2534 \DWOPcallref&0x9a&1& 4\dash\ or 8-byte offset of DIE \\
2535 \DWOPformtlsaddress&0x9b &0& \\
2536 \DWOPcallframecfa{} &0x9c &0& \\
2537 \DWOPbitpiece&0x9d &2&ULEB128 size, \\*
2539 \DWOPimplicitvalue{} &0x9e &2&ULEB128 size, \\*
2540 &&&\nolink{block} of that size\\
2541 \DWOPstackvalue{} &0x9f &0& \\
2542 \DWOPimplicitpointer{}~\ddag &0xa0& 2 &4- or 8-byte offset of DIE, \\*
2543 &&&SLEB128 constant offset \\
2544 \DWOPaddrx~\ddag&0xa1&1&ULEB128 indirect address \\
2545 \DWOPconstx~\ddag&0xa2&1&ULEB128 indirect constant \\
2546 \DWOPentryvalue~\ddag&0xa3&2&ULEB128 size, \\*
2547 &&&\nolink{block} of that size\\
2548 \DWOPconsttype~\ddag & 0xa4 & 3 & ULEB128 type entry offset,\\*
2549 & & & 1-byte size, \\*
2550 & & & constant value \\
2551 \DWOPregvaltype~\ddag & 0xa5 & 2 & ULEB128 register number, \\*
2552 &&& ULEB128 constant offset \\
2553 \DWOPdereftype~\ddag & 0xa6 & 2 & 1-byte size, \\*
2554 &&& ULEB128 type entry offset \\
2555 \DWOPxdereftype~\ddag & 0xa7 & 2 & 1-byte size, \\*
2556 &&& ULEB128 type entry offset \\
2557 \DWOPconvert~\ddag & 0xa8 & 1 & ULEB128 type entry offset \\
2558 \DWOPreinterpret~\ddag & 0xa9 & 1 & ULEB128 type entry offset \\
2559 \DWOPlouser{} &0xe0 && \\
2560 \DWOPhiuser{} &\xff && \\
2566 \subsection{Location Descriptions}
2567 \label{datarep:locationdescriptions}
2569 A location description is used to compute the
2570 location of a variable or other entity.
2572 \subsection{Location Lists}
2573 \label{datarep:locationlists}
2574 Each entry in a \addtoindex{location list} is either a location list entry,
2575 a base address entry, a default location entry or an
2576 \addtoindexx{end-of-list entry!in location list}
2579 Each entry begins with an unsigned 1-byte code that indicates the kind of entry
2580 that follows. The encodings for these constants are given in
2581 Table \ref{tab:locationlistentryencodingvalues}.
2585 \setlength{\extrarowheight}{0.1cm}
2586 \begin{longtable}{l|c}
2587 \caption{Location list entry encoding values}
2588 \label{tab:locationlistentryencodingvalues} \\
2589 \hline \bfseries Location list entry encoding name&\bfseries Value \\ \hline
2591 \bfseries Location list entry encoding name&\bfseries Value\\ \hline
2593 \hline \emph{Continued on next page}
2596 \ddag New in \DWARFVersionV
2598 \DWLLEendoflist~\ddag & 0x00 \\
2599 \DWLLEbaseaddressx~\ddag & 0x01 \\
2600 \DWLLEstartxendx~\ddag & 0x02 \\
2601 \DWLLEstartxlength~\ddag & 0x03 \\
2602 \DWLLEoffsetpair~\ddag & 0x04 \\
2603 \DWLLEdefaultlocation~\ddag & 0x05 \\
2604 \DWLLEbaseaddress~\ddag & 0x06 \\
2605 \DWLLEstartend~\ddag & 0x07 \\
2606 \DWLLEstartlength~\ddag & 0x08 \\
2610 \section{Base Type Attribute Encodings}
2611 \label{datarep:basetypeattributeencodings}
2613 The\hypertarget{chap:DWATencodingencodingofbasetype}{}
2614 encodings of the constants used in the
2615 \DWATencodingDEFN{} attribute\addtoindexx{encoding attribute}
2617 Table \refersec{tab:basetypeencodingvalues}
2620 \setlength{\extrarowheight}{0.1cm}
2621 \begin{longtable}{l|c}
2622 \caption{Base type encoding values} \label{tab:basetypeencodingvalues} \\
2623 \hline \bfseries Base type encoding name&\bfseries Value \\ \hline
2625 \bfseries Base type encoding name&\bfseries Value\\ \hline
2627 \hline \emph{Continued on next page}
2630 \ddag \ \textit{New in \DWARFVersionV}
2632 \DWATEaddress&0x01 \\
2633 \DWATEboolean&0x02 \\
2634 \DWATEcomplexfloat&0x03 \\
2636 \DWATEsigned&0x05 \\
2637 \DWATEsignedchar&0x06 \\
2638 \DWATEunsigned&0x07 \\
2639 \DWATEunsignedchar&0x08 \\
2640 \DWATEimaginaryfloat&0x09 \\
2641 \DWATEpackeddecimal&0x0a \\
2642 \DWATEnumericstring&0x0b \\
2643 \DWATEedited&0x0c \\
2644 \DWATEsignedfixed&0x0d \\
2645 \DWATEunsignedfixed&0x0e \\
2646 \DWATEdecimalfloat & 0x0f \\
2647 \DWATEUTF{} & 0x10 \\
2648 \DWATEUCS~\ddag & 0x11 \\
2649 \DWATEASCII~\ddag & 0x12 \\
2650 \DWATElouser{} & 0x80 \\
2651 \DWATEhiuser{} & \xff \\
2656 The encodings of the constants used in the
2657 \DWATdecimalsign{} attribute
2659 Table \refersec{tab:decimalsignencodings}.
2662 \setlength{\extrarowheight}{0.1cm}
2663 \begin{longtable}{l|c}
2664 \caption{Decimal sign encodings} \label{tab:decimalsignencodings} \\
2665 \hline \bfseries Decimal sign code name&\bfseries Value \\ \hline
2667 \bfseries Decimal sign code name&\bfseries Value\\ \hline
2669 % \hline \emph{Continued on next page}
2673 \DWDSunsigned{} & 0x01 \\
2674 \DWDSleadingoverpunch{} & 0x02 \\
2675 \DWDStrailingoverpunch{} & 0x03 \\
2676 \DWDSleadingseparate{} & 0x04 \\
2677 \DWDStrailingseparate{} & 0x05 \\
2682 The encodings of the constants used in the
2683 \DWATendianity{} attribute are given in
2684 Table \refersec{tab:endianityencodings}.
2687 \setlength{\extrarowheight}{0.1cm}
2688 \begin{longtable}{l|c}
2689 \caption{Endianity encodings} \label{tab:endianityencodings}\\
2690 \hline \bfseries Endian code name&\bfseries Value \\ \hline
2692 \bfseries Endian code name&\bfseries Value\\ \hline
2694 \hline \emph{Continued on next page}
2699 \DWENDdefault{} & 0x00 \\
2700 \DWENDbig{} & 0x01 \\
2701 \DWENDlittle{} & 0x02 \\
2702 \DWENDlouser{} & 0x40 \\
2703 \DWENDhiuser{} & \xff \\
2709 \section{Accessibility Codes}
2710 \label{datarep:accessibilitycodes}
2711 The encodings of the constants used in the
2712 \DWATaccessibility{}
2714 \addtoindexx{accessibility attribute}
2716 Table \refersec{tab:accessibilityencodings}.
2719 \setlength{\extrarowheight}{0.1cm}
2720 \begin{longtable}{l|c}
2721 \caption{Accessibility encodings} \label{tab:accessibilityencodings}\\
2722 \hline \bfseries Accessibility code name&\bfseries Value \\ \hline
2724 \bfseries Accessibility code name&\bfseries Value\\ \hline
2726 \hline \emph{Continued on next page}
2731 \DWACCESSpublic&0x01 \\
2732 \DWACCESSprotected&0x02 \\
2733 \DWACCESSprivate&0x03 \\
2739 \section{Visibility Codes}
2740 \label{datarep:visibilitycodes}
2741 The encodings of the constants used in the
2742 \DWATvisibility{} attribute are given in
2743 Table \refersec{tab:visibilityencodings}.
2746 \setlength{\extrarowheight}{0.1cm}
2747 \begin{longtable}{l|c}
2748 \caption{Visibility encodings} \label{tab:visibilityencodings}\\
2749 \hline \bfseries Visibility code name&\bfseries Value \\ \hline
2751 \bfseries Visibility code name&\bfseries Value\\ \hline
2753 \hline \emph{Continued on next page}
2759 \DWVISexported&0x02 \\
2760 \DWVISqualified&0x03 \\
2765 \section{Virtuality Codes}
2766 \label{datarep:vitualitycodes}
2768 The encodings of the constants used in the
2769 \DWATvirtuality{} attribute are given in
2770 Table \refersec{tab:virtualityencodings}.
2773 \setlength{\extrarowheight}{0.1cm}
2774 \begin{longtable}{l|c}
2775 \caption{Virtuality encodings} \label{tab:virtualityencodings}\\
2776 \hline \bfseries Virtuality code name&\bfseries Value \\ \hline
2778 \bfseries Virtuality code name&\bfseries Value\\ \hline
2780 \hline \emph{Continued on next page}
2785 \DWVIRTUALITYnone&0x00 \\
2786 \DWVIRTUALITYvirtual&0x01 \\
2787 \DWVIRTUALITYpurevirtual&0x02 \\
2794 \DWVIRTUALITYnone{} is equivalent to the absence of the
2798 \section{Source Languages}
2799 \label{datarep:sourcelanguages}
2801 The encodings of the constants used
2802 \addtoindexx{language attribute, encoding}
2804 \addtoindexx{language name encoding}
2807 attribute are given in
2808 Table \refersec{tab:languageencodings}.
2810 % If we don't force a following space it looks odd
2812 and their associated values are reserved, but the
2813 languages they represent are not well supported.
2814 Table \refersec{tab:languageencodings}
2816 \addtoindexx{lower bound attribute!default}
2817 default lower bound, if any, assumed for
2818 an omitted \DWATlowerbound{} attribute in the context of a
2819 \DWTAGsubrangetype{} debugging information entry for each
2823 \setlength{\extrarowheight}{0.1cm}
2824 \begin{longtable}{l|c|c}
2825 \caption{Language encodings} \label{tab:languageencodings}\\
2826 \hline \bfseries Language name&\bfseries Value &\bfseries Default Lower Bound \\ \hline
2828 \bfseries Language name&\bfseries Value &\bfseries Default Lower Bound\\ \hline
2830 \hline \emph{Continued on next page}
2833 \dag \ \textit{See text} \\ \ddag \ \textit{New in \DWARFVersionV}
2835 \addtoindexx{ISO-defined language names}
2837 \DWLANGCeightynine &0x0001 &0 \addtoindexx{C:1989 (ISO)} \\
2838 \DWLANGC{} &0x0002 &0 \addtoindexx{C!non-standard} \\
2839 \DWLANGAdaeightythree{} \dag &0x0003 &1 \addtoindexx{Ada:1983 (ISO)} \\
2840 \DWLANGCplusplus{} &0x0004 &0 \addtoindexx{C++98 (ISO)} \\
2841 \DWLANGCobolseventyfour{} \dag &0x0005 &1 \addtoindexx{COBOL:1974 (ISO)} \\
2842 \DWLANGCoboleightyfive{} \dag &0x0006 &1 \addtoindexx{COBOL:1985 (ISO)} \\
2843 \DWLANGFortranseventyseven &0x0007 &1 \addtoindexx{FORTRAN:1977 (ISO)} \\
2844 \DWLANGFortranninety &0x0008 &1 \addtoindexx{Fortran:1990 (ISO)} \\
2845 \DWLANGPascaleightythree &0x0009 &1 \addtoindexx{Pascal:1983 (ISO)} \\
2846 \DWLANGModulatwo &0x000a &1 \addtoindexx{Modula-2:1996 (ISO)} \\
2847 \DWLANGJava &0x000b &0 \addtoindexx{Java} \\
2848 \DWLANGCninetynine &0x000c &0 \addtoindexx{C:1999 (ISO)} \\
2849 \DWLANGAdaninetyfive{} \dag &0x000d &1 \addtoindexx{Ada:1995 (ISO)} \\
2850 \DWLANGFortranninetyfive &0x000e &1 \addtoindexx{Fortran:1995 (ISO)} \\
2851 \DWLANGPLI{} \dag &0x000f &1 \addtoindexx{PL/I:1976 (ANSI)}\\
2852 \DWLANGObjC{} &0x0010 &0 \addtoindexx{Objective C}\\
2853 \DWLANGObjCplusplus{} &0x0011 &0 \addtoindexx{Objective C++}\\
2854 \DWLANGUPC{} &0x0012 &0 \addtoindexx{UPC}\\
2855 \DWLANGD{} &0x0013 &0 \addtoindexx{D language}\\
2856 \DWLANGPython{} \dag &0x0014 &0 \addtoindexx{Python}\\
2857 \DWLANGOpenCL{} \dag \ddag &0x0015 &0 \addtoindexx{OpenCL}\\
2858 \DWLANGGo{} \dag \ddag &0x0016 &0 \addtoindexx{Go}\\
2859 \DWLANGModulathree{} \dag \ddag &0x0017 &1 \addtoindexx{Modula-3}\\
2860 \DWLANGHaskell{} \dag \ddag &0x0018 &0 \addtoindexx{Haskell}\\
2861 \DWLANGCpluspluszerothree{} \ddag &0x0019 &0 \addtoindexx{C++03 (ISO)}\\
2862 \DWLANGCpluspluseleven{} \ddag &0x001a &0 \addtoindexx{C++11 (ISO)} \\
2863 \DWLANGOCaml{} \ddag &0x001b &0 \addtoindexx{OCaml}\\
2864 \DWLANGRust{} \ddag &0x001c &0 \addtoindexx{Rust}\\
2865 \DWLANGCeleven{} \ddag &0x001d &0 \addtoindexx{C:2011 (ISO)}\\
2866 \DWLANGSwift{} \ddag &0x001e &0 \addtoindexx{Swift} \\
2867 \DWLANGJulia{} \ddag &0x001f &1 \addtoindexx{Julia} \\
2868 \DWLANGDylan{} \ddag &0x0020 &0 \addtoindexx{Dylan} \\
2869 \DWLANGCplusplusfourteen{}~\ddag &0x0021 &0 \addtoindexx{C++14 (ISO)} \\
2870 \DWLANGFortranzerothree{}~\ddag &0x0022 &1 \addtoindexx{Fortran:2004 (ISO)} \\
2871 \DWLANGFortranzeroeight{}~\ddag &0x0023 &1 \addtoindexx{Fortran:2010 (ISO)} \\
2872 \DWLANGRenderScript{}~\ddag &0x0024 &0 \addtoindexx{RenderScript Kernel Language}
2874 \DWLANGlouser{} &0x8000 & \\
2875 \DWLANGhiuser{} &\xffff & \\
2880 \section{Address Class Encodings}
2881 \label{datarep:addressclassencodings}
2883 The value of the common
2884 \addtoindex{address class} encoding
2888 \section{Identifier Case}
2889 \label{datarep:identifiercase}
2891 The encodings of the constants used in the
2892 \DWATidentifiercase{} attribute are given in
2893 Table \refersec{tab:identifiercaseencodings}.
2897 \setlength{\extrarowheight}{0.1cm}
2898 \begin{longtable}{l|c}
2899 \caption{Identifier case encodings} \label{tab:identifiercaseencodings}\\
2900 \hline \bfseries Identifier case name&\bfseries Value \\ \hline
2902 \bfseries Identifier case name&\bfseries Value\\ \hline
2904 \hline \emph{Continued on next page}
2908 \DWIDcasesensitive&0x00 \\
2910 \DWIDdowncase&0x02 \\
2911 \DWIDcaseinsensitive&0x03 \\
2915 \section{Calling Convention Encodings}
2916 \label{datarep:callingconventionencodings}
2917 The encodings of the constants used in the
2918 \DWATcallingconvention{} attribute are given in
2919 Table \refersec{tab:callingconventionencodings}.
2922 \setlength{\extrarowheight}{0.1cm}
2923 \begin{longtable}{l|c}
2924 \caption{Calling convention encodings} \label{tab:callingconventionencodings}\\
2925 \hline \bfseries Calling convention name&\bfseries Value \\ \hline
2927 \bfseries Calling convention name&\bfseries Value\\ \hline
2929 \hline \emph{Continued on next page}
2931 \hline \ddag\ \textit{New in DWARF Version 5}
2934 \DWCCnormal &0x01 \\
2935 \DWCCprogram&0x02 \\
2936 \DWCCnocall &0x03 \\
2937 \DWCCpassbyreference~\ddag &0x04 \\
2938 \DWCCpassbyvalue~\ddag &0x05 \\
2939 \DWCClouser &0x40 \\
2946 \section{Inline Codes}
2947 \label{datarep:inlinecodes}
2949 The encodings of the constants used in
2950 \addtoindexx{inline attribute}
2952 \DWATinline{} attribute are given in
2953 Table \refersec{tab:inlineencodings}.
2957 \setlength{\extrarowheight}{0.1cm}
2958 \begin{longtable}{l|c}
2959 \caption{Inline encodings} \label{tab:inlineencodings}\\
2960 \hline \bfseries Inline code name&\bfseries Value \\ \hline
2962 \bfseries Inline Code name&\bfseries Value\\ \hline
2964 \hline \emph{Continued on next page}
2969 \DWINLnotinlined&0x00 \\
2970 \DWINLinlined&0x01 \\
2971 \DWINLdeclarednotinlined&0x02 \\
2972 \DWINLdeclaredinlined&0x03 \\
2977 % this clearpage is ugly, but the following table came
2978 % out oddly without it.
2980 \section{Array Ordering}
2981 \label{datarep:arrayordering}
2983 The encodings of the constants used in the
2984 \DWATordering{} attribute are given in
2985 Table \refersec{tab:orderingencodings}.
2989 \setlength{\extrarowheight}{0.1cm}
2990 \begin{longtable}{l|c}
2991 \caption{Ordering encodings} \label{tab:orderingencodings}\\
2992 \hline \bfseries Ordering name&\bfseries Value \\ \hline
2994 \bfseries Ordering name&\bfseries Value\\ \hline
2996 \hline \emph{Continued on next page}
3001 \DWORDrowmajor&0x00 \\
3002 \DWORDcolmajor&0x01 \\
3008 \section{Discriminant Lists}
3009 \label{datarep:discriminantlists}
3011 The descriptors used in
3012 \addtoindexx{discriminant list attribute}
3014 \DWATdiscrlist{} attribute are
3015 encoded as 1-byte constants. The
3016 defined values are given in
3017 Table \refersec{tab:discriminantdescriptorencodings}.
3019 % Odd that the 'Name' field capitalized here, it is not caps elsewhere.
3021 \setlength{\extrarowheight}{0.1cm}
3022 \begin{longtable}{l|c}
3023 \caption{Discriminant descriptor encodings} \label{tab:discriminantdescriptorencodings}\\
3024 \hline \bfseries Descriptor name&\bfseries Value \\ \hline
3026 \bfseries Descriptor name&\bfseries Value\\ \hline
3028 \hline \emph{Continued on next page}
3040 \section{Name Index Table}
3041 \label{datarep:nameindextable}
3042 The \addtoindexi{version number}{version number!name index table}
3043 in the name index table header is \versiondotdebugnames{}.
3045 The name index attributes and their encodings are listed in Table \referfol{datarep:indexattributeencodings}.
3048 \setlength{\extrarowheight}{0.1cm}
3049 \begin{longtable}{l|c|l}
3050 \caption{Name index attribute encodings} \label{datarep:indexattributeencodings}\\
3051 \hline \bfseries Attribute name &\bfseries Value &\bfseries Form/Class \\ \hline
3053 \bfseries Attribute name &\bfseries Value &\bfseries Form/Class \\ \hline
3055 \hline \emph{Continued on next page}
3058 \ddag~\textit{New in \DWARFVersionV}
3060 \DWIDXcompileunit~\ddag & 1 & \CLASSconstant \\
3061 \DWIDXtypeunit~\ddag & 2 & \CLASSconstant \\
3062 \DWIDXdieoffset~\ddag & 3 & \CLASSreference \\
3063 \DWIDXparent~\ddag & 4 & \CLASSconstant \\
3064 \DWIDXtypehash~\ddag & 5 & \DWFORMdataeight \\
3065 \DWIDXlouser~\ddag & 0x2000 & \\
3066 \DWIDXhiuser~\ddag & \xiiifff & \\
3070 The abbreviations table ends with an entry consisting of a single 0
3071 byte for the abbreviation code. The size of the table given by
3072 \texttt{abbrev\_table\_size} may include optional padding following the
3075 \section{Defaulted Member Encodings}
3076 \hypertarget{datarep:defaultedmemberencodings}{}
3078 The encodings of the constants used in the \DWATdefaulted{} attribute
3079 are given in Table \referfol{datarep:defaultedattributeencodings}.
3082 \setlength{\extrarowheight}{0.1cm}
3083 \begin{longtable}{l|c}
3084 \caption{Defaulted attribute encodings} \label{datarep:defaultedattributeencodings} \\
3085 \hline \bfseries Defaulted name &\bfseries Value \\ \hline
3087 \bfseries Defaulted name &\bfseries Value \\ \hline
3089 \hline \emph{Continued on next page}
3092 \ddag~\textit{New in \DWARFVersionV}
3094 \DWDEFAULTEDno~\ddag & 0x00 \\
3095 \DWDEFAULTEDinclass~\ddag & 0x01 \\
3096 \DWDEFAULTEDoutofclass~\ddag & 0x02 \\
3101 \section{Address Range Table}
3102 \label{datarep:addrssrangetable}
3104 Each set of entries in the table of address ranges contained
3105 in the \dotdebugaranges{}
3106 section begins with a header containing:
3107 \begin{enumerate}[1. ]
3108 % FIXME The unit length text is not fully consistent across
3111 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
3112 \addttindexx{unit\_length}
3113 A 4-byte or 12-byte length containing the length of the
3114 \addtoindexx{initial length}
3115 set of entries for this compilation unit, not including the
3116 length field itself. In the \thirtytwobitdwarfformat, this is a
3117 4-byte unsigned integer (which must be less than \xfffffffzero);
3118 in the \sixtyfourbitdwarfformat, this consists of the 4-byte value
3119 \wffffffff followed by an 8-byte unsigned integer that gives
3121 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
3123 \item version (\HFTuhalf) \\
3124 A 2-byte version identifier representing the version of the
3125 DWARF information for the address range table.
3127 This value in this field \addtoindexx{version number!address range table} is 2.
3129 \item debug\_info\_offset (\livelink{datarep:sectionoffsetlength}{section offset}) \\
3131 \addtoindexx{section offset!in .debug\_aranges header}
3132 4-byte or 8-byte offset into the
3133 \dotdebuginfo{} section of
3134 the compilation unit header. In the \thirtytwobitdwarfformat,
3135 this is a 4-byte unsigned offset; in the \sixtyfourbitdwarfformat,
3136 this is an 8-byte unsigned offset
3137 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
3139 \item \texttt{address\_size} (\HFTubyte) \\
3140 A 1-byte unsigned integer containing the size in bytes of an
3141 \addttindexx{address\_size}
3143 \addtoindexx{size of an address}
3144 (or the offset portion of an address for segmented
3145 \addtoindexx{address space!segmented}
3146 addressing) on the target system.
3148 \item \HFNsegmentselectorsize{} (\HFTubyte) \\
3149 A 1-byte unsigned integer containing the size in bytes of a
3150 segment selector on the target system.
3154 This header is followed by a series of tuples. Each tuple
3155 consists of a segment, an address and a length.
3156 The segment selector
3157 size is given by the \HFNsegmentselectorsize{} field of the header; the
3158 address and length size are each given by the \addttindex{address\_size}
3159 field of the header.
3160 The first tuple following the header in
3161 each set begins at an offset that is a multiple of the size
3162 of a single tuple (that is, the size of a segment selector
3163 plus twice the \addtoindex{size of an address}).
3164 The header is padded, if
3165 necessary, to that boundary. Each set of tuples is terminated
3166 by a 0 for the segment, a 0 for the address and 0 for the
3167 length. If the \HFNsegmentselectorsize{} field in the header is zero,
3168 the segment selectors are omitted from all tuples, including
3169 the terminating tuple.
3172 \section{Line Number Information}
3173 \label{datarep:linenumberinformation}
3175 The \addtoindexi{version number}{version number!line number information}
3176 in the line number program header is \versiondotdebugline{}.
3178 The boolean values \doublequote{true} and \doublequote{false}
3179 used by the line number information program are encoded
3180 as a single byte containing the value 0
3181 for \doublequote{false,} and a non-zero value for \doublequote{true.}
3184 The encodings for the standard opcodes are given in
3185 \addtoindexx{line number opcodes!standard opcode encoding}
3186 Table \refersec{tab:linenumberstandardopcodeencodings}.
3189 \setlength{\extrarowheight}{0.1cm}
3190 \begin{longtable}{l|c}
3191 \caption{Line number standard opcode encodings} \label{tab:linenumberstandardopcodeencodings}\\
3192 \hline \bfseries Opcode name&\bfseries Value \\ \hline
3194 \bfseries Opcode name&\bfseries Value\\ \hline
3196 \hline \emph{Continued on next page}
3202 \DWLNSadvancepc&0x02 \\
3203 \DWLNSadvanceline&0x03 \\
3204 \DWLNSsetfile&0x04 \\
3205 \DWLNSsetcolumn&0x05 \\
3206 \DWLNSnegatestmt&0x06 \\
3207 \DWLNSsetbasicblock&0x07 \\
3208 \DWLNSconstaddpc&0x08 \\
3209 \DWLNSfixedadvancepc&0x09 \\
3210 \DWLNSsetprologueend&0x0a \\*
3211 \DWLNSsetepiloguebegin&0x0b \\*
3212 \DWLNSsetisa&0x0c \\*
3218 The encodings for the extended opcodes are given in
3219 \addtoindexx{line number opcodes!extended opcode encoding}
3220 Table \refersec{tab:linenumberextendedopcodeencodings}.
3223 \setlength{\extrarowheight}{0.1cm}
3224 \begin{longtable}{l|c}
3225 \caption{Line number extended opcode encodings} \label{tab:linenumberextendedopcodeencodings}\\
3226 \hline \bfseries Opcode name&\bfseries Value \\ \hline
3228 \bfseries Opcode name&\bfseries Value\\ \hline
3230 \hline \emph{Continued on next page}
3232 \hline %\ddag~\textit{New in DWARF Version 5}
3235 \DWLNEendsequence &0x01 \\
3236 \DWLNEsetaddress &0x02 \\
3237 \textit{Reserved} &0x03\footnote{Code 0x03 is reserved to allow backward compatible support of the
3238 DW\_LNE\_define\_file operation which was defined in \DWARFVersionIV{}
3240 \DWLNEsetdiscriminator &0x04 \\
3241 \DWLNElouser &0x80 \\
3242 \DWLNEhiuser &\xff \\
3248 The encodings for the line number header entry formats are given in
3249 \addtoindexx{line number opcodes!file entry format encoding}
3250 Table \refersec{tab:linenumberheaderentryformatencodings}.
3253 \setlength{\extrarowheight}{0.1cm}
3254 \begin{longtable}{l|c}
3255 \caption{Line number header entry format \mbox{encodings}} \label{tab:linenumberheaderentryformatencodings}\\
3256 \hline \bfseries Line number header entry format name&\bfseries Value \\ \hline
3258 \bfseries Line number header entry format name&\bfseries Value\\ \hline
3260 \hline \emph{Continued on next page}
3262 \hline \ddag~\textit{New in DWARF Version 5}
3264 \DWLNCTpath~\ddag & 0x1 \\
3265 \DWLNCTdirectoryindex~\ddag & 0x2 \\
3266 \DWLNCTtimestamp~\ddag & 0x3 \\
3267 \DWLNCTsize~\ddag & 0x4 \\
3268 \DWLNCTMDfive~\ddag & 0x5 \\
3269 \DWLNCTlouser~\ddag & 0x2000 \\
3270 \DWLNCThiuser~\ddag & \xiiifff \\
3275 \section{Macro Information}
3276 \label{datarep:macroinformation}
3277 The \addtoindexi{version number}{version number!macro information}
3278 in the macro information header is \versiondotdebugmacro{}.
3280 The source line numbers and source file indices encoded in the
3281 macro information section are represented as
3282 unsigned LEB128\addtoindexx{LEB128!unsigned} numbers.
3285 The macro information entry type is encoded as a single unsigned byte.
3287 \addtoindexx{macro information entry types!encoding}
3289 Table \refersec{tab:macroinfoentrytypeencodings}.
3293 \setlength{\extrarowheight}{0.1cm}
3294 \begin{longtable}{l|c}
3295 \caption{Macro information entry type encodings} \label{tab:macroinfoentrytypeencodings}\\
3296 \hline \bfseries Macro information entry type name&\bfseries Value \\ \hline
3298 \bfseries Macro information entry type name&\bfseries Value\\ \hline
3300 \hline \emph{Continued on next page}
3302 \hline \ddag~\textit{New in DWARF Version 5}
3305 \DWMACROdefine~\ddag &0x01 \\
3306 \DWMACROundef~\ddag &0x02 \\
3307 \DWMACROstartfile~\ddag &0x03 \\
3308 \DWMACROendfile~\ddag &0x04 \\
3309 \DWMACROdefinestrp~\ddag &0x05 \\
3310 \DWMACROundefstrp~\ddag &0x06 \\
3311 \DWMACROimport~\ddag &0x07 \\
3312 \DWMACROdefinesup~\ddag &0x08 \\
3313 \DWMACROundefsup~\ddag &0x09 \\
3314 \DWMACROimportsup~\ddag &0x0a \\
3315 \DWMACROdefinestrx~\ddag &0x0b \\
3316 \DWMACROundefstrx~\ddag &0x0c \\
3317 \DWMACROlouser~\ddag &0xe0 \\
3318 \DWMACROhiuser~\ddag &\xff \\
3324 \section{Call Frame Information}
3325 \label{datarep:callframeinformation}
3327 In the \thirtytwobitdwarfformat, the value of the CIE id in the
3328 CIE header is \xffffffff; in the \sixtyfourbitdwarfformat, the
3329 value is \xffffffffffffffff.
3331 The value of the CIE \addtoindexi{version number}{version number!call frame information}
3332 is \versiondotdebugframe.
3334 Call frame instructions are encoded in one or more bytes. The
3335 primary opcode is encoded in the high order two bits of
3336 the first byte (that is, opcode = byte $\gg$ 6). An operand
3337 or extended opcode may be encoded in the low order 6
3338 bits. Additional operands are encoded in subsequent bytes.
3339 The instructions and their encodings are presented in
3340 Table \refersec{tab:callframeinstructionencodings}.
3343 \setlength{\extrarowheight}{0.1cm}
3344 \begin{longtable}{l|c|c|l|l}
3345 \caption{Call frame instruction encodings} \label{tab:callframeinstructionencodings} \\
3346 \hline &\bfseries High 2 &\bfseries Low 6 & & \\
3347 \bfseries Instruction&\bfseries Bits &\bfseries Bits &\bfseries Operand 1 &\bfseries Operand 2\\ \hline
3349 & \bfseries High 2 &\bfseries Low 6 & &\\
3350 \bfseries Instruction&\bfseries Bits &\bfseries Bits &\bfseries Operand 1 &\bfseries Operand 2\\ \hline
3352 \hline \emph{Continued on next page}
3357 \DWCFAadvanceloc&0x1&delta & \\
3358 \DWCFAoffset&0x2®ister&ULEB128 offset \\
3359 \DWCFArestore&0x3®ister & & \\
3360 \DWCFAnop&0&0 & & \\
3361 \DWCFAsetloc&0&0x01&address & \\
3362 \DWCFAadvancelocone&0&0x02&1-byte delta & \\
3363 \DWCFAadvanceloctwo&0&0x03&2-byte delta & \\
3364 \DWCFAadvancelocfour&0&0x04&4-byte delta & \\
3365 \DWCFAoffsetextended&0&0x05&ULEB128 register&ULEB128 offset \\
3366 \DWCFArestoreextended&0&0x06&ULEB128 register & \\
3367 \DWCFAundefined&0&0x07&ULEB128 register & \\
3368 \DWCFAsamevalue&0&0x08 &ULEB128 register & \\
3369 \DWCFAregister&0&0x09&ULEB128 register &ULEB128 offset \\
3370 \DWCFArememberstate&0&0x0a & & \\
3371 \DWCFArestorestate&0&0x0b & & \\
3372 \DWCFAdefcfa&0&0x0c &ULEB128 register&ULEB128 offset \\
3373 \DWCFAdefcfaregister&0&0x0d&ULEB128 register & \\
3374 \DWCFAdefcfaoffset&0&0x0e &ULEB128 offset & \\
3375 \DWCFAdefcfaexpression&0&0x0f &BLOCK \\
3376 \DWCFAexpression&0&0x10&ULEB128 register & BLOCK \\
3378 \DWCFAoffsetextendedsf&0&0x11&ULEB128 register&SLEB128 offset \\
3379 \DWCFAdefcfasf&0&0x12&ULEB128 register&SLEB128 offset \\
3380 \DWCFAdefcfaoffsetsf&0&0x13&SLEB128 offset & \\
3381 \DWCFAvaloffset&0&0x14&ULEB128&ULEB128 \\
3382 \DWCFAvaloffsetsf&0&0x15&ULEB128&SLEB128 \\
3383 \DWCFAvalexpression&0&0x16&ULEB128&BLOCK \\
3384 \DWCFAlouser&0&0x1c & & \\
3385 \DWCFAhiuser&0&\xiiif & & \\
3389 \section{Range List Entries for Non-contiguous Address Ranges}
3390 \label{datarep:noncontiguousaddressranges}
3391 Each entry in a \addtoindex{range list}
3392 (see Section \refersec{chap:noncontiguousaddressranges})
3394 \addtoindexx{base address selection entry!in range list}
3396 \addtoindexx{range list}
3397 a base address selection entry, or an end-of-list entry.
3399 Each entry begins with an unsigned 1-byte code that indicates the kind of entry
3400 that follows. The encodings for these constants are given in
3401 Table \refersec{tab:rnglistsentryencodingvalues}.
3405 \setlength{\extrarowheight}{0.1cm}
3406 \begin{longtable}{l|c}
3407 \caption{Range list entry encoding values}
3408 \label{tab:rnglistsentryencodingvalues} \\
3409 \hline \bfseries Range list entry encoding name&\bfseries Value \\ \hline
3411 \bfseries Range list entry encoding name&\bfseries Value\\ \hline
3413 \hline \emph{Continued on next page}
3416 \ddag New in \DWARFVersionV
3418 \DWRLEendoflist~\ddag & 0x00 \\
3419 \DWRLEbaseaddressx~\ddag & 0x01 \\
3420 \DWRLEstartxendx~\ddag & 0x02 \\
3421 \DWRLEstartxlength~\ddag & 0x03 \\
3422 \DWRLEoffsetpair~\ddag & 0x04 \\
3423 \DWRLEbaseaddress~\ddag & 0x05 \\
3424 \DWRLEstartend~\ddag & 0x06 \\
3425 \DWRLEstartlength~\ddag & 0x07 \\
3429 For a \addtoindex{range list} to be specified, the base address of the
3430 \addtoindexx{base address selection entry!in range list}
3431 corresponding compilation unit must be defined
3432 (see Section \refersec{chap:fullandpartialcompilationunitentries}).
3435 \section{String Offsets Table}
3436 \label{chap:stringoffsetstable}
3437 Each set of entries in the string offsets table contained in the
3438 \dotdebugstroffsets{} or \dotdebugstroffsetsdwo{}
3439 section begins with a header containing:
3440 \begin{enumerate}[1. ]
3441 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
3442 \addttindexx{unit\_length}
3443 A 4-byte or 12-byte length containing the length of
3444 the set of entries for this compilation unit, not
3445 including the length field itself. In the 32-bit
3446 DWARF format, this is a 4-byte unsigned integer
3447 (which must be less than \xfffffffzero); in the 64-bit
3448 DWARF format, this consists of the 4-byte value
3449 \wffffffff followed by an 8-byte unsigned integer
3450 that gives the actual length (see
3451 Section \refersec{datarep:32bitand64bitdwarfformats}).
3454 \item \texttt{version} (\HFTuhalf) \\
3455 \addtoindexx{version number!string offsets table}
3456 A 2-byte version identifier containing the value
3457 \versiondotdebugstroffsets{}.
3459 \item \textit{padding} (\HFTuhalf) \\
3460 Reserved to DWARF (must be zero).
3463 This header is followed by a series of string table offsets
3464 that have the same representation as \DWFORMstrp.
3465 For the 32-bit DWARF format, each offset is 4 bytes long; for
3466 the 64-bit DWARF format, each offset is 8 bytes long.
3468 The \DWATstroffsetsbase{} attribute points to the first
3469 entry following the header. The entries are indexed
3470 sequentially from this base entry, starting from 0.
3472 \section{Address Table}
3473 \label{chap:addresstable}
3474 Each set of entries in the address table contained in the
3475 \dotdebugaddr{} section begins with a header containing:
3476 \begin{enumerate}[1. ]
3477 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
3478 \addttindexx{unit\_length}
3479 A 4-byte or 12-byte length containing the length of
3480 the set of entries for this compilation unit, not
3481 including the length field itself. In the 32-bit
3482 DWARF format, this is a 4-byte unsigned integer
3483 (which must be less than \xfffffffzero); in the 64-bit
3484 DWARF format, this consists of the 4-byte value
3485 \wffffffff followed by an 8-byte unsigned integer
3486 that gives the actual length (see
3487 Section \refersec{datarep:32bitand64bitdwarfformats}).
3490 \item \texttt{version} (\HFTuhalf) \\
3491 \addtoindexx{version number!address table}
3492 A 2-byte version identifier containing the value
3493 \versiondotdebugaddr{}.
3496 \item \texttt{address\_size} (\HFTubyte) \\
3497 A 1-byte unsigned integer containing the size in
3498 bytes of an address (or the offset portion of an
3499 address for segmented addressing) on the target
3503 \item \HFNsegmentselectorsize{} (\HFTubyte) \\
3504 A 1-byte unsigned integer containing the size in
3505 bytes of a segment selector on the target system.
3508 This header is followed by a series of segment/address pairs.
3509 The segment size is given by the \HFNsegmentselectorsize{} field of the
3510 header, and the address size is given by the \addttindex{address\_size}
3511 field of the header. If the \HFNsegmentselectorsize{} field in the header
3512 is zero, the entries consist only of an addresses.
3514 The \DWATaddrbase{} attribute points to the first entry
3515 following the header. The entries are indexed sequentially
3516 from this base entry, starting from 0.
3519 \section{Range List Table}
3520 \label{app:ranglisttable}
3521 Each \dotdebugrnglists{} and \dotdebugrnglistsdwo{} section
3522 begins with a header containing:
3523 \begin{enumerate}[1. ]
3524 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
3525 \addttindexx{unit\_length}
3526 A 4-byte or 12-byte length containing the length of
3527 the set of entries for this compilation unit, not
3528 including the length field itself. In the 32-bit
3529 DWARF format, this is a 4-byte unsigned integer
3530 (which must be less than \xfffffffzero); in the 64-bit
3531 DWARF format, this consists of the 4-byte value
3532 \wffffffff followed by an 8-byte unsigned integer
3533 that gives the actual length (see
3534 Section \refersec{datarep:32bitand64bitdwarfformats}).
3537 \item \texttt{version} (\HFTuhalf) \\
3538 \addtoindexx{version number!range list table}
3539 A 2-byte version identifier containing the value
3540 \versiondotdebugrnglists{}.
3543 \item \texttt{address\_size} (\HFTubyte) \\
3544 A 1-byte unsigned integer containing the size in
3545 bytes of an address (or the offset portion of an
3546 address for segmented addressing) on the target
3550 \item \HFNsegmentselectorsize{} (\HFTubyte) \\
3551 A 1-byte unsigned integer containing the size in
3552 bytes of a segment selector on the target system.
3554 \item \HFNoffsetentrycount{} (\HFTuword) \\
3555 A 4-byte count of the number of offsets
3556 that follow the header.
3558 This count may be zero.
3562 Immediately following the header is an array of offsets.
3563 This array is followed by a series of range lists.
3566 If the \HFNoffsetentrycount{} is non-zero, there
3568 is one offset for each range list.
3570 of the $i$\textsuperscript{th} offset is the offset
3572 (an unsigned integer)
3575 beginning of the offset array to the location of the
3576 $i$\textsuperscript{th} range list.
3578 In the 32-bit DWARF format, each offset is 4-bytes in size;
3579 in the 64-bit DWARF format, each offset is 8-bytes in size
3580 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
3584 If the \HFNoffsetentrycount{} is zero, then \DWFORMrnglistx{} cannot
3585 be used to access a range list; \DWFORMsecoffset{} must be used
3586 instead. If the \HFNoffsetentrycount{} is non-zero, then \DWFORMrnglistx{}
3587 may be used to access a range list; this is necessary in split units and
3588 otherwise may be more compact than using \DWFORMsecoffset.
3593 described in Section \refersec{chap:noncontiguousaddressranges}.
3596 The segment size is given by the
3597 \HFNsegmentselectorsize{} field of the header, and the address size is
3598 given by the \addttindex{address\_size} field of the header. If the
3599 \HFNsegmentselectorsize{} field in the header is zero, the segment
3600 selector is omitted from the range list entries.
3602 The \DWATrnglistsbase{} attribute points to the first offset
3603 following the header. The range lists are referenced
3604 by the index of the position of their corresponding offset in the
3605 array of offsets, which indirectly specifies the offset to the
3609 \section{Location List Table}
3610 \label{datarep:locationlisttable}
3611 Each \dotdebugloclists{} or \dotdebugloclistsdwo{} section
3612 begins with a header containing:
3613 \begin{enumerate}[1. ]