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.
9 \section{Vendor Extensibility}
10 \label{datarep:vendorextensibility}
11 \addtoindexx{vendor extensibility}
12 \addtoindexx{vendor specific extensions|see{vendor extensibility}}
15 \addtoindexx{extensibility|see{vendor extensibility}}
16 reserve a portion of the DWARF name space and ranges of
17 enumeration values for use for vendor specific extensions,
18 special labels are reserved for tag names, attribute names,
19 base type encodings, location operations, language names,
20 calling conventions and call frame instructions.
22 The labels denoting the beginning and end of the reserved
23 \hypertarget{chap:DWXXXlohiuser}{}
24 value range for vendor specific extensions consist of the
26 (\DWATlouserMARK{}\DWAThiuserMARK{} DW\_AT,
27 \DWATElouserMARK{}\DWATEhiuserMARK{} DW\_ATE,
28 \DWCClouserMARK{}\DWCChiuserMARK{} DW\_CC,
29 \DWCFAlouserMARK{}\DWCFAhiuserMARK{} DW\_CFA
30 \DWENDlouserMARK{}\DWENDhiuserMARK{} DW\_END,
31 \DWLANGlouserMARK{}\DWLANGhiuserMARK{} DW\_LANG,
32 \DWLNElouserMARK{}\DWLNEhiuserMARK{} DW\_LNE,
33 \DWMACROlouserMARK{}\DWMACROhiuserMARK{}DW\_MACRO,
34 \DWOPlouserMARK{}\DWOPhiuserMARK{} DW\_OP or
35 \DWTAGlouserMARK{}\DWTAGhiuserMARK{} DW\_TAG,
36 respectively) followed by
37 \_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 DIE tags, the special
46 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.
57 Vendor defined tags, attributes, base type encodings, location
58 atoms, language names, line number actions, calling conventions
59 and call frame instructions, conventionally use the form
60 \text{prefix\_vendor\_id\_name}, where
61 \textit{vendor\_id}\addtoindexx{vendor id} is some identifying
62 character sequence chosen so as to avoid conflicts with
65 To ensure that extensions added by one vendor may be safely
66 ignored by consumers that do not understand those extensions,
67 the following rules must be followed:
68 \begin{enumerate}[1. ]
70 \item New attributes are added in such a way that a
71 debugger may recognize the format of a new attribute value
72 without knowing the content of that attribute value.
74 \item The semantics of any new attributes do not alter
75 the semantics of previously existing attributes.
77 \item The semantics of any new tags do not conflict with
78 the semantics of previously existing tags.
80 \item New forms of attribute value are not added.
85 \section{Reserved Values}
86 \label{datarep:reservedvalues}
87 \subsection{Error Values}
88 \label{datarep:errorvalues}
89 \addtoindexx{reserved values!error}
92 \addtoindexx{error value}
93 a convenience for consumers of DWARF information, the value
94 0 is reserved in the encodings for attribute names, attribute
95 forms, base type encodings, location operations, languages,
96 line number program opcodes, macro information entries and tag
97 names to represent an error condition or unknown value. DWARF
98 does not specify names for these reserved values, because they
99 do not represent valid encodings for the given type and do
100 not appear in DWARF debugging information.
103 \subsection{Initial Length Values}
104 \label{datarep:initiallengthvalues}
105 \addtoindexx{reserved values!initial length}
107 An \livetarg{datarep:initiallengthvalues}{initial length} field
108 \addtoindexx{initial length field|see{initial length}}
109 is one of the fields that occur at the beginning
110 of those DWARF sections that have a header
114 \dotdebugnames{}) or the length field
115 that occurs at the beginning of the CIE and FDE structures
116 in the \dotdebugframe{} section.
119 In an \addtoindex{initial length} field, the values \wfffffffzero through
120 \wffffffff are reserved by DWARF to indicate some form of
121 extension relative to \DWARFVersionII; such values must not
122 be interpreted as a length field. The use of one such value,
123 \xffffffff, is defined below
124 (see Section \refersec{datarep:32bitand64bitdwarfformats});
126 the other values is reserved for possible future extensions.
130 \section{Relocatable, Split, Executable, Shared and Package Object Files}
131 \label{datarep:executableobjectsandsharedobjects}
133 \subsection{Relocatable Object Files}
134 \label{datarep:relocatableobjectfiles}
135 A DWARF producer (for example, a compiler) typically generates its
136 debugging information as part of a relocatable object file.
137 Relocatable object files are then combined by a linker to form an
138 executable file. During the linking process, the linker resolves
139 (binds) symbolic references between the various object files, and
140 relocates the contents of each object file into a combined virtual
143 The DWARF debugging information is placed in several sections (see
144 Appendix \refersec{app:debugsectionrelationshipsinformative}), and
145 requires an object file format capable of
146 representing these separate sections. There are symbolic references
147 between these sections, and also between the debugging information
148 sections and the other sections that contain the text and data of the
149 program itself. Many of these references require relocation, and the
150 producer must emit the relocation information appropriate to the
151 object file format and the target processor architecture. These
152 references include the following:
155 \item The compilation unit header (see Section
156 \refersec{datarep:unitheaders}) in the \dotdebuginfo{}
157 section contains a reference to the \dotdebugabbrev{} table. This
158 reference requires a relocation so that after linking, it refers to
159 that contribution to the combined \dotdebugabbrev{} section in the
162 \item Debugging information entries may have attributes with the form
163 \DWFORMaddr{} (see Section \refersec{datarep:attributeencodings}).
164 These attributes represent locations
165 within the virtual address space of the program, and require
168 \item Debugging information entries may have attributes with the form
169 \DWFORMsecoffset{} (see Section \refersec{datarep:attributeencodings}).
170 These attributes refer to
171 debugging information in other debugging information sections within
172 the object file, and must be relocated during the linking process.
173 Exception: attributes whose values are relative to a base offset given
174 by \DWATrangesbase{} do not need relocation.
176 \item Debugging information entries may have attributes with the form
177 \DWFORMrefone, \DWFORMreftwo, \DWFORMreffour, \DWFORMrefeight, or
178 \DWFORMrefudata{} (see Section \refersec{datarep:attributeencodings}).
179 These attributes refer to other
180 debugging information entries within the same compilation unit, and
181 are relative to the beginning of the current compilation unit. These
182 values do not need relocation.
184 \item Debugging information entries may have attributes with the form
185 \DWFORMrefaddr{} (see Section \refersec{datarep:attributeencodings}).
186 These attributes refer to
187 debugging information entries that may be outside the current
188 compilation unit. These values require both symbolic binding and
191 \item Debugging information entries may have attributes with the form
192 \DWFORMstrp{} (see Section \refersec{datarep:attributeencodings}).
193 These attributes refer to strings in
194 the \dotdebugstr{} section. These values require relocation.
196 \item Entries in the \dotdebugloc{}, \dotdebugranges{}, and \dotdebugaranges{}
197 sections contain references to locations within the virtual address
198 space of the program, and require relocation.
200 \item In the \dotdebugline{} section, the operand of the \DWLNEsetaddress{}
201 opcode is a reference to a location within the virtual address space
202 of the program, and requires relocation.
204 \item The \dotdebugstroffsets{} section contains a list of string offsets,
205 each of which is an offset of a string in the \dotdebugstr{} section. Each
206 of these offsets requires relocation. Depending on the implementation,
207 these relocations may be implicit (that is, the producer may not need to
208 emit any explicit relocation information for these offsets).
211 \subsection{Split DWARF Object Files}
212 \label{datarep:splitdwarfobjectfiles}
213 \addtoindexx{split DWARF object file}
214 A DWARF producer may partition the debugging
215 information such that the majority of the debugging
216 information can remain in individual object files without
217 being processed by the linker. The first partition contains
218 debugging information that must still be processed by the linker,
219 and includes the following:
222 The line number tables, range tables, frame tables, and
223 accelerated access tables, in the usual sections:
224 \dotdebugline, \dotdebuglinestr, \dotdebugranges, \dotdebugframe,
225 \dotdebugnames{} and \dotdebugaranges,
229 An address table, in the \dotdebugaddr{} section. This table
230 contains all addresses and constants that require
231 link-time relocation, and items in the table can be
232 referenced indirectly from the debugging information via
233 the \DWFORMaddrx{} form, and by the \DWOPaddrx{} and
234 \DWOPconstx{} operators.
236 A skeleton compilation unit, as described in Section
237 \refersec{chap:skeletoncompilationunitentries},
238 in the \dotdebuginfo{} section.
240 An abbreviations table for the skeleton compilation unit,
241 in the \dotdebugabbrev{} section.
243 A string table, in the \dotdebugstr{} section. The string
244 table is necessary only if the skeleton compilation unit
245 uses either indirect string form, \DWFORMstrp{} or
248 A string offsets table, in the \dotdebugstroffsets{}
249 section. The string offsets table is necessary only if
250 the skeleton compilation unit uses the \DWFORMstrx{} form.
252 The attributes contained in the skeleton compilation
253 unit can be used by a DWARF consumer to find the object file
254 or DWARF object file that contains the second partition.
256 The second partition contains the debugging information that
257 does not need to be processed by the linker. These sections
258 may be left in the object files and ignored by the linker
259 (that is, not combined and copied to the executable object), or
260 they may be placed by the producer in a separate DWARF object
261 file. This partition includes the following:
264 The full compilation unit, in the \dotdebuginfodwo{} section.
265 Attributes in debugging information entries may refer to
266 machine addresses indirectly using the \DWFORMaddrx{} form,
267 and location expressions may do so using the \DWOPaddrx{} and
268 \DWOPconstx{} forms. Attributes may refer to range table
269 entries with an offset relative to a base offset in the
270 range table for the compilation unit.
272 \item Separate type units, in the \dotdebuginfodwo{} section.
275 Abbreviations table(s) for the compilation unit and type
276 units, in the \dotdebugabbrevdwo{} section.
278 \item Location lists, in the \dotdebuglocdwo{} section.
281 A \addtoindex{specialized line number table} (for the type units),
282 in the \dotdebuglinedwo{} section. This table
283 contains only the directory and filename lists needed to
284 interpret \DWATdeclfile{} attributes in the debugging
287 \item Macro information, in the \dotdebugmacrodwo{} section.
289 \item A string table, in the \dotdebugstrdwo{} section.
291 \item A string offsets table, in the \dotdebugstroffsetsdwo{}
295 Except where noted otherwise, all references in this document
296 to a debugging information section (for example, \dotdebuginfo),
297 applies also to the corresponding split DWARF section (for example,
300 Split DWARF object files do not get linked with any other files,
301 therefore references between sections must not make use of
302 normal object file relocation information.
304 \subsection{Executable Objects}
305 \label{chap:executableobjects}
306 The relocated addresses in the debugging information for an
307 executable object are virtual addresses.
309 \subsection{Shared Object Files}
310 \label{datarep:sharedobject Files}
312 addresses in the debugging information for a shared object file
313 are offsets relative to the start of the lowest region of
314 memory loaded from that shared object file.
317 \textit{This requirement makes the debugging information for
318 shared object files position independent. Virtual addresses in a
319 shared object file may be calculated by adding the offset to the
320 base address at which the object file was attached. This offset
321 is available in the run\dash time linker\textquoteright s data structures.}
323 \subsection{DWARF Package Files}
324 \label{datarep:dwarfpackagefiles}
325 \textit{Using \splitDWARFobjectfile{s} allows the developer to compile,
326 link, and debug an application quickly with less link-time overhead,
327 but a more convenient format is needed for saving the debug
328 information for later debugging of a deployed application. A
329 DWARF package file can be used to collect the debugging
330 information from the object (or separate DWARF object) files
331 produced during the compilation of an application.}
333 \textit{The package file is typically placed in the same directory as the
334 application, and is given the same name with a \doublequote{\texttt{.dwp}}
335 extension.\addtoindexx{\texttt{.dwp} file extension}}
337 A DWARF package file is itself an object file, using the
338 \addtoindexx{package files}
339 \addtoindexx{DWARF package files}
340 same object file format (including \byteorder) as the
341 corresponding application binary. It consists only of a file
342 header, section table, a number of DWARF debug information
343 sections, and two index sections.
346 Each DWARF package file contains no more than one of each of the
347 following sections, copied from a set of object or DWARF object
348 files, and combined, section by section:
354 \dotdebugstroffsetsdwo
359 The string table section in \dotdebugstrdwo{} contains all the
360 strings referenced from DWARF attributes using the form
361 \DWFORMstrx. Any attribute in a compilation unit or a type
362 unit using this form will refer to an entry in that unit's
363 contribution to the \dotdebugstroffsetsdwo{} section, which in turn
364 will provide the offset of a string in the \dotdebugstrdwo{}
367 The DWARF package file also contains two index sections that
368 provide a fast way to locate debug information by compilation
369 unit signature (\DWATdwoid) for compilation units, or by type
370 signature for type units:
376 \subsubsection{The Compilation Unit (CU) Index Section}
377 The \dotdebugcuindex{} section is a hashed lookup table that maps a
378 compilation unit signature to a set of contributions in the
379 various debug information sections. Each contribution is stored
380 as an offset within its corresponding section and a size.
382 Each \compunitset{} may contain contributions from the
385 \dotdebuginfodwo{} (required)
386 \dotdebugabbrevdwo{} (required)
389 \dotdebugstroffsetsdwo
393 \textit{Note that a \compunitset{} is not able to represent \dotdebugmacinfo{}
394 information from \DWARFVersionIV{} or earlier formats.}
396 \subsubsection{The Type Unit (TU) Index Section}
397 The \dotdebugtuindex{} section is a hashed lookup table that maps a
398 type signature to a set of offsets into the various debug
399 information sections. Each contribution is stored as an offset
400 within its corresponding section and a size.
402 Each \typeunitset{} may contain contributions from the following
405 \dotdebuginfodwo{} (required)
406 \dotdebugabbrevdwo{} (required)
408 \dotdebugstroffsetsdwo
411 \subsubsection{Format of the CU and TU Index Sections}
412 Both index sections have the same format, and serve to map a
413 64-bit signature to a set of contributions to the debug sections.
414 Each index section begins with a header, followed by a hash table of
415 signatures, a parallel table of indexes, a table of offsets, and
416 a table of sizes. The index sections are aligned at 8-byte
417 boundaries in the DWARF package file.
420 The index section header contains the following fields:
421 \begin{enumerate}[1. ]
422 \item \texttt{version} (\HFTuhalf) \\
424 \addtoindexx{version number!CU index information}
425 \addtoindexx{version number!TU index information}
426 (see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
427 This number is specific to the CU and TU index information
428 and is independent of the DWARF version number.
430 The version number is \versiondotdebugcuindex.
432 \item \textit{padding} (\HFTuhalf) \\
435 \item \texttt{column\_count} (\HFTuword) \\
436 The number of columns in the table of section counts that follows.
437 For brevity, the contents of this field is referred to as $C$ below.
439 \item \texttt{unit\_count} (\HFTuword) \\
440 The number of compilation units or type units in the index.
441 For brevity, the contents of this field is referred to as $U$ below.
443 \item \texttt{slot\_count} (\HFTuword) \\
444 The number of slots in the hash table.
445 For brevity, the contents of this field is referred to as $S$ below.
449 \textit{We assume that $U$ and $S$ do not exceed $2^{32}$.}
451 The size of the hash table, $S$, must be $2^k$ such that:
452 \hspace{0.3cm}$2^k\ \ >\ \ 3*U/2$
454 The hash table begins at offset 16 in the section, and consists
455 of an array of $S$ 8-byte slots. Each slot contains a 64-bit
457 % (using the \byteorder{} of the application binary).
459 The parallel table of indices begins immediately after the hash table
460 (at offset \mbox{$16 + 8 * S$} from the beginning of the section), and
461 consists of an array of $S$ 4-byte slots,
462 % (using the byte order of the application binary),
463 corresponding 1-1 with slots in the hash
464 table. Each entry in the parallel table contains a row index into
465 the tables of offsets and sizes.
467 Unused slots in the hash table have 0 in both the hash table
468 entry and the parallel table entry. While 0 is a valid hash
469 value, the row index in a used slot will always be non-zero.
471 Given a 64-bit compilation unit signature or a type signature $X$,
472 an entry in the hash table is located as follows:
473 \begin{enumerate}[1. ]
474 \item Calculate a primary hash $H = X\ \&\ MASK(k)$, where $MASK(k)$ is a
475 mask with the low-order $k$ bits all set to 1.
477 \item Calculate a secondary hash $H' = (((X>>32)\ \&\ MASK(k))\ |\ 1)$.
479 \item If the hash table entry at index $H$ matches the signature, use
480 that entry. If the hash table entry at index $H$ is unused (all
481 zeroes), terminate the search: the signature is not present
484 \item Let $H = (H + H')\ modulo\ S$. Repeat at Step 3.
487 Because $S > U$, and $H'$ and $S$ are relatively prime, the search is
488 guaranteed to stop at an unused slot or find the match.
491 The table of offsets begins immediately following the parallel
492 table (at offset \mbox{$16 + 12 * S$} from the beginning of the section).
493 The table is a two-dimensional array of 4-byte words,
494 %(using the byte order of the application binary),
495 with $C$ columns and $U + 1$
496 rows, in row-major order. Each row in the array is indexed
497 starting from 0. The first row provides a key to the columns:
498 each column in this row provides a section identifier for a debug
499 section, and the offsets in the same column of subsequent rows
500 refer to that section. The section identifiers are shown in
501 Table \referfol{tab:dwarfpackagefilesectionidentifierencodings}.
505 \setlength{\extrarowheight}{0.1cm}
506 \begin{longtable}{l|c|l}
507 \caption{DWARF package file section identifier \mbox{encodings}}
508 \label{tab:dwarfpackagefilesectionidentifierencodings}
509 \addtoindexx{DWARF package files!section identifier encodings} \\
510 \hline \bfseries Section identifier &\bfseries Value &\bfseries Section \\ \hline
512 \bfseries Section identifier &\bfseries Value &\bfseries Section\\ \hline
514 \hline \emph{Continued on next page}
518 \DWSECTINFOTARG & 1 & \dotdebuginfodwo \\
519 \textit{Reserved} & 2 & \\
520 \DWSECTABBREVTARG & 3 & \dotdebugabbrevdwo \\
521 \DWSECTLINETARG & 4 & \dotdebuglinedwo \\
522 \DWSECTLOCTARG & 5 & \dotdebuglocdwo \\
523 \DWSECTSTROFFSETSTARG & 6 & \dotdebugstroffsetsdwo \\
524 %DWSECTMACINFO & & \dotdebugmacinfodwo \\
525 \DWSECTMACROTARG & 7 & \dotdebugmacrodwo \\
529 The offsets provided by the CU and TU index sections are the
530 base offsets for the contributions made by each CU or TU to the
531 corresponding section in the package file. Each CU and TU header
532 contains a \HFNdebugabbrevoffset{} field, used to find the abbreviations
533 table for that CU or TU within the contribution to the
534 \dotdebugabbrevdwo{} section for that CU or TU, and are
535 interpreted as relative to the base offset given in the index
536 section. Likewise, offsets into \dotdebuglinedwo{} from
537 \DWATstmtlist{} attributes are interpreted as relative to
538 the base offset for \dotdebuglinedwo{}, and offsets into other debug
539 sections obtained from DWARF attributes are also
540 interpreted as relative to the corresponding base offset.
542 The table of sizes begins immediately following the table of
543 offsets, and provides the sizes of the contributions made by each
544 CU or TU to the corresponding section in the package file. Like
545 the table of offsets, it is a two-dimensional array of 4-byte
546 words, with $C$ columns and $U$ rows, in row-major order. Each row in
547 the array is indexed starting from 1 (row 0 of the table of
548 offsets also serves as the key for the table of sizes).
550 \subsection{DWARF Supplementary Object Files}
551 \label{datarep:dwarfsupplemetaryobjectfiles}
552 In order to minimize the size of debugging information, it is possible
553 to move duplicate debug information entries, strings and macro entries from
554 several executables or shared object files into a separate
555 \addtoindexi{\textit{supplementary object file}}{supplementary object file} by some
556 post-linking utility; the moved entries and strings can be then referenced
557 from the debugging information of each of those executable or shared object files.
560 A DWARF \addtoindex{supplementary object file} is itself an object file,
561 using the same object
562 file format, \byteorder{}, and size as the corresponding application executables
563 or shared libraries. It consists only of a file header, section table, and
564 a number of DWARF debug information sections. Both the
565 \addtoindex{supplementary object file}
566 and all the executable or shared object files that reference entries or strings in that
567 file must contain a \dotdebugsup{} section that establishes the relationship.
569 The \dotdebugsup{} section contains:
570 \begin{enumerate}[1. ]
571 \item \texttt{version} (\HFTuhalf) \\
572 \addttindexx{version}
573 A 2-byte unsigned integer representing the version of the DWARF
574 information for the compilation unit (see Appendix G). The
575 value in this field is \versiondotdebugsup.
577 \item \texttt{is\_supplementary} (\HFTubyte) \\
578 \addttindexx{is\_supplementary}
579 A 1-byte unsigned integer, which contains the value 1 if it is
580 in the \addtoindex{supplementary object file} that other executable or
581 shared object files refer to, or 0 if it is an executable or shared object
582 referring to a \addtoindex{supplementary object file}.
585 \item \texttt{sup\_filename} (null terminated filename string) \\
586 \addttindexx{sup\_filename}
587 If \addttindex{is\_supplementary} is 0, this contains either an absolute
588 filename for the \addtoindex{supplementary object file}, or a filename
589 relative to the object file containing the \dotdebugsup{} section.
590 If \addttindex{is\_supplementary} is 1, then \addttindex{sup\_filename}
591 is not needed and must be an empty string (a single null byte).
594 \item \texttt{sup\_checksum\_len} (unsigned LEB128) \\
595 \addttindexx{sup\_checksum\_len}
596 Length of the following \addttindex{sup\_checksum} field;
597 his value can be 0 if no checksum is provided.
600 \item \texttt{sup\_checksum} (array of \HFTubyte) \\
601 \addttindexx{sup\_checksum}
602 Some checksum or cryptographic hash function of the \dotdebuginfo{},
603 \dotdebugstr{} and \dotdebugmacro{} sections of the
604 \addtoindex{supplementary object file}, or some unique identifier
605 which the implementation can choose to verify that the supplementary
606 section object file matches what the debug information in the executable
607 or shared object file expects.
610 Debug information entries that refer to an executable's or shared
611 object's addresses must \emph{not} be moved to supplementary files (the
612 addesses will likely not be the same). Similarly,
613 entries referenced from within location expressions or using loclistptr
614 form attributes must not be moved to a \addtoindex{supplementary object file}.
616 Executable or shared object file compilation units can use
617 \DWTAGimportedunit{} with \DWFORMrefsup{} form \DWATimport{} attribute
618 to import entries from the \addtoindex{supplementary object file}, other \DWFORMrefsup{}
619 attributes to refer to them and \DWFORMstrpsup{} form attributes to
620 refer to strings that are used by debug information of multiple
621 executables or shared object files. Within the \addtoindex{supplementary object file}'s
622 debugging sections, form \DWFORMrefsup{} or \DWFORMstrpsup{} are
623 not used, and all reference forms referring to some other sections
624 refer to the local sections in the \addtoindex{supplementary object file}.
626 In macro information, \DWMACROdefinesup{} or
627 \DWMACROundefsup{} opcodes can refer to strings in the
628 \dotdebugstr{} section of the \addtoindex{supplementary object file},
629 or \DWMACROimportsup{}
630 can refer to \dotdebugmacro{} section entries. Within the
631 \dotdebugmacro{} section of a \addtoindex{supplementary object file},
632 \DWMACROdefinestrp{} and \DWMACROundefstrp{}
633 opcodes refer to the local \dotdebugstr{} section in that
634 supplementary file, not the one in
635 the executable or shared object file.
639 \section{32-Bit and 64-Bit DWARF Formats}
640 \label{datarep:32bitand64bitdwarfformats}
641 \hypertarget{datarep:xxbitdwffmt}{}
642 \addtoindexx{32-bit DWARF format}
643 \addtoindexx{64-bit DWARF format}
644 There are two closely related file formats. In the 32-bit DWARF
645 format, all values that represent lengths of DWARF sections
646 and offsets relative to the beginning of DWARF sections are
647 represented using four bytes. In the 64-bit DWARF format, all
648 values that represent lengths of DWARF sections and offsets
649 relative to the beginning of DWARF sections are represented
650 using eight bytes. A special convention applies to the initial
651 length field of certain DWARF sections, as well as the CIE and
652 FDE structures, so that the 32-bit and 64-bit DWARF formats
653 can coexist and be distinguished within a single linked object.
655 The differences between the 32- and 64-bit DWARF formats are
656 detailed in the following:
657 \begin{enumerate}[1. ]
659 \item In the 32-bit DWARF format, an
660 \addtoindex{initial length} field (see
661 \addtoindexx{initial length!encoding}
662 Section \ref{datarep:initiallengthvalues} on page \pageref{datarep:initiallengthvalues})
663 is an unsigned 4-byte integer (which
664 must be less than \xfffffffzero); in the 64-bit DWARF format,
665 an \addtoindex{initial length} field is 12 bytes in size,
668 \item The first four bytes have the value \xffffffff.
670 \item The following eight bytes contain the actual length
671 represented as an unsigned 8-byte integer.
674 \textit{This representation allows a DWARF consumer to dynamically
675 detect that a DWARF section contribution is using the 64-bit
676 format and to adapt its processing accordingly.}
679 \item Section offset and section length
680 \hypertarget{datarep:sectionoffsetlength}{}
681 \addtoindexx{section length!use in headers}
683 \addtoindexx{section offset!use in headers}
684 in the headers of DWARF sections (other than initial length
685 \addtoindexx{initial length}
686 fields) are listed following. In the 32-bit DWARF format these
687 are 4-byte unsigned integer values; in the 64-bit DWARF format,
688 they are 8-byte unsigned integer values.
692 Section &Name & Role \\ \hline
693 \dotdebugaranges{} & \addttindex{debug\_info\_offset} & offset in \dotdebuginfo{} \\
694 \dotdebugframe{}/CIE & \addttindex{CIE\_id} & CIE distinguished value \\
695 \dotdebugframe{}/FDE & \addttindex{CIE\_pointer} & offset in \dotdebugframe{} \\
696 \dotdebuginfo{} & \addttindex{debug\_abbrev\_offset} & offset in \dotdebugabbrev{} \\
697 \dotdebugline{} & \addttindex{header\_length} & length of header itself \\
698 \dotdebugnames{} & entry in array of CUs & offset in \dotdebuginfo{} \\
704 The \texttt{CIE\_id} field in a CIE structure must be 64 bits because
705 it overlays the \texttt{CIE\_pointer} in a FDE structure; this implicit
706 union must be accessed to distinguish whether a CIE or FDE is
707 present, consequently, these two fields must exactly overlay
708 each other (both offset and size).
710 \item Within the body of the \dotdebuginfo{}
711 section, certain forms of attribute value depend on the choice
712 of DWARF format as follows. For the 32-bit DWARF format,
713 the value is a 4-byte unsigned integer; for the 64-bit DWARF
714 format, the value is an 8-byte unsigned integer.
716 \begin{tabular}{lp{6cm}}
717 Form & Role \\ \hline
718 \DWFORMlinestrp & offset in \dotdebuglinestr \\
719 \DWFORMrefaddr & offset in \dotdebuginfo{} \\
720 \DWFORMrefsup & offset in \dotdebuginfo{} section of a \mbox{supplementary} object file \\
721 \addtoindexx{supplementary object file}
722 \DWFORMsecoffset & offset in a section other than \\
723 & \dotdebuginfo{} or \dotdebugstr{} \\
724 \DWFORMstrp & offset in \dotdebugstr{} \\
725 \DWFORMstrpsup & offset in \dotdebugstr{} section of a \mbox{supplementary} object file \\
726 \DWOPcallref & offset in \dotdebuginfo{} \\
731 \item Within the body of the \dotdebugline{} section, certain forms of content
732 description depend on the choice of DWARF format as follows: for the
733 32-bit DWARF format, the value is a 4-byte unsigned integer; for the
734 64-bit DWARF format, the value is a 8-byte unsigned integer.
736 \begin{tabular}{lp{6cm}}
737 Form & Role \\ \hline
738 \DWFORMlinestrp & offset in \dotdebuglinestr
742 \item Within the body of the \dotdebugnames{}
743 sections, the representation of each entry in the array of
744 compilation units (CUs) and the array of local type units
745 (TUs), which represents an offset in the
747 section, depends on the DWARF format as follows: in the
748 32-bit DWARF format, each entry is a 4-byte unsigned integer;
749 in the 64-bit DWARF format, it is a 8-byte unsigned integer.
752 \item In the body of the \dotdebugstroffsets{} and \dotdebugstroffsetsdwo{}
753 sections, the size of entries in the body depend on the DWARF
754 format as follows: in the 32-bit DWARF format, entries are 4-byte
755 unsigned integer values; in the 64-bit DWARF format, they are
756 8-byte unsigned integers.
758 \item In the body of the \dotdebugaddr{}, \dotdebugloc{} and \dotdebugranges{}
759 sections, the contents of the address size fields depends on the
760 DWARF format as follows: in the 32-bit DWARF format, these fields
761 contain 4; in the 64-bit DWARF format these fields contain 8.
765 The 32-bit and 64-bit DWARF format conventions must \emph{not} be
766 intermixed within a single compilation unit.
768 \textit{Attribute values and section header fields that represent
769 addresses in the target program are not affected by these
772 A DWARF consumer that supports the 64-bit DWARF format must
773 support executables in which some compilation units use the
774 32-bit format and others use the 64-bit format provided that
775 the combination links correctly (that is, provided that there
776 are no link\dash time errors due to truncation or overflow). (An
777 implementation is not required to guarantee detection and
778 reporting of all such errors.)
780 \textit{It is expected that DWARF producing compilers will \emph{not} use
781 the 64-bit format \emph{by default}. In most cases, the division of
782 even very large applications into a number of executable and
783 shared object files will suffice to assure that the DWARF sections
784 within each individual linked object are less than 4 GBytes
785 in size. However, for those cases where needed, the 64-bit
786 format allows the unusual case to be handled as well. Even
787 in this case, it is expected that only application supplied
788 objects will need to be compiled using the 64-bit format;
789 separate 32-bit format versions of system supplied shared
790 executable libraries can still be used.}
794 \section{Format of Debugging Information}
795 \label{datarep:formatofdebugginginformation}
797 For each compilation unit compiled with a DWARF producer,
798 a contribution is made to the \dotdebuginfo{} section of
799 the object file. Each such contribution consists of a
800 compilation unit header
801 (see Section \refersec{datarep:compilationunitheader})
803 single \DWTAGcompileunit{} or
804 \DWTAGpartialunit{} debugging
805 information entry, together with its children.
807 For each type defined in a compilation unit, a separate
808 contribution may also be made to the
810 section of the object file. Each
811 such contribution consists of a
812 \addtoindex{type unit} header
813 (see Section \refersec{datarep:typeunitheader})
814 followed by a \DWTAGtypeunit{} entry, together with
817 Each debugging information entry begins with a code that
818 represents an entry in a separate
819 \addtoindex{abbreviations table}. This
820 code is followed directly by a series of attribute values.
822 The appropriate entry in the
823 \addtoindex{abbreviations table} guides the
824 interpretation of the information contained directly in the
825 \dotdebuginfo{} section.
828 Multiple debugging information entries may share the same
829 abbreviation table entry. Each compilation unit is associated
830 with a particular abbreviation table, but multiple compilation
831 units may share the same table.
833 \subsection{Unit Headers}
834 \label{datarep:unitheaders}
835 Unit headers contain a field, \addttindex{unit\_type}, whose value indicates the kind of
836 compilation unit that follows. The encodings for the unit type
837 enumeration are shown in Table \refersec{tab:unitheaderunitkindencodings}.
841 \setlength{\extrarowheight}{0.1cm}
842 \begin{longtable}{l|c}
843 \caption{Unit header unit type encodings}
844 \label{tab:unitheaderunitkindencodings}
845 \addtoindexx{unit header unit type encodings} \\
846 \hline \bfseries Unit header unit type encodings&\bfseries Value \\ \hline
848 \bfseries Unit header unit type encodings&\bfseries Value \\ \hline
850 \hline \emph{Continued on next page}
852 \hline \ddag\ \textit{New in DWARF Version 5}
854 \DWUTcompileTARG~\ddag &0x01 \\
855 \DWUTtypeTARG~\ddag &0x02 \\
856 \DWUTpartialTARG~\ddag &0x03 \\ \hline
861 \subsubsection{Compilation Unit Header}
862 \label{datarep:compilationunitheader}
863 \begin{enumerate}[1. ]
865 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
866 \addttindexx{unit\_length}
868 \addtoindexx{initial length}
869 unsigned integer representing the length
870 of the \dotdebuginfo{}
871 contribution for that compilation unit,
872 not including the length field itself. In the \thirtytwobitdwarfformat,
873 this is a 4-byte unsigned integer (which must be less
874 than \xfffffffzero); in the \sixtyfourbitdwarfformat, this consists
875 of the 4-byte value \wffffffff followed by an 8-byte unsigned
876 integer that gives the actual length
877 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
879 \item \texttt{version} (\HFTuhalf) \\
880 \addttindexx{version}
881 A 2-byte unsigned integer representing the version of the
882 DWARF information for the compilation unit \addtoindexx{version number!compilation unit}
883 (see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
884 The value in this field is \versiondotdebuginfo.
887 \item \texttt{unit\_type} (\HFTubyte) \\
888 \addttindexx{unit\_type}
889 A 1-byte unsigned integer identifying this unit as a compilation unit.
890 The value of this field is
891 \DWUTcompile{} for a {normal compilation} unit or
892 \DWUTpartial{} for a {partial compilation} unit
893 (see Section \refersec{chap:normalandpartialcompilationunitentries}).
895 \textit{This field is new in \DWARFVersionV.}
898 \item \HFNdebugabbrevoffset{} (\livelink{datarep:sectionoffsetlength}{section offset}) \\
900 \addtoindexx{section offset!in .debug\_info header}
901 4-byte or 8-byte unsigned offset into the
903 section. This offset associates the compilation unit with a
904 particular set of debugging information entry abbreviations. In
905 the \thirtytwobitdwarfformat, this is a 4-byte unsigned length;
906 in the \sixtyfourbitdwarfformat, this is an 8-byte unsigned length
907 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
909 \item \texttt{address\_size} (\HFTubyte) \\
910 \addttindexx{address\_size}
911 A 1-byte unsigned integer representing the size in bytes of
912 an address on the target architecture. If the system uses
913 \addtoindexx{address space!segmented}
914 segmented addressing, this value represents the size of the
915 offset portion of an address.
919 \subsubsection{Type Unit Header}
920 \label{datarep:typeunitheader}
922 The header for the series of debugging information entries
923 contributing to the description of a type that has been
924 placed in its own \addtoindex{type unit}, within the
925 \dotdebuginfo{} section,
926 consists of the following information:
927 \begin{enumerate}[1. ]
929 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
930 \addttindexx{unit\_length}
931 A 4-byte or 12-byte unsigned integer
932 \addtoindexx{initial length}
933 representing the length
934 of the \dotdebuginfo{} contribution for that type unit,
935 not including the length field itself. In the \thirtytwobitdwarfformat,
936 this is a 4-byte unsigned integer (which must be
937 less than \xfffffffzero); in the \sixtyfourbitdwarfformat, this
938 consists of the 4-byte value \wffffffff followed by an
939 8-byte unsigned integer that gives the actual length
940 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
943 \item \texttt{version} (\HFTuhalf) \\
944 \addttindexx{version}
945 A 2-byte unsigned integer representing the version of the
946 DWARF information for the
947 type unit\addtoindexx{version number!type unit}
948 (see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
949 The value in this field is \versiondotdebuginfo.
951 \item \texttt{unit\_type} (\HFTubyte) \\
952 \addttindexx{unit\_type}
953 A 1-byte unsigned integer identifying this unit as a type unit.
954 The value of this field is \DWUTtype{} for a type unit
955 (see Section \refersec{chap:typeunitentries}).
957 \textit{This field is new in \DWARFVersionV.}
960 \item \HFNdebugabbrevoffset{} (\livelink{datarep:sectionoffsetlength}{section offset}) \\
962 \addtoindexx{section offset!in .debug\_info header}
963 4-byte or 8-byte unsigned offset into the
965 section. This offset associates the type unit with a
966 particular set of debugging information entry abbreviations. In
967 the \thirtytwobitdwarfformat, this is a 4-byte unsigned length;
968 in the \sixtyfourbitdwarfformat, this is an 8-byte unsigned length
969 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
972 \item \texttt{address\_size} (\HFTubyte) \\
973 \addttindexx{address\_size}
974 A 1-byte unsigned integer representing the size
975 \addtoindexx{size of an address}
977 an address on the target architecture. If the system uses
978 \addtoindexx{address space!segmented}
979 segmented addressing, this value represents the size of the
980 offset portion of an address.
982 \item \texttt{type\_signature} (8-byte unsigned integer) \\
983 \addttindexx{type\_signature}
984 \addtoindexx{type signature}
985 A unique 64-bit signature (see Section
986 \refersec{datarep:typesignaturecomputation})
987 of the type described in this type
990 \textit{An attribute that refers (using
991 \DWFORMrefsigeight{}) to
992 the primary type contained in this
993 \addtoindex{type unit} uses this value.}
995 \item \texttt{type\_offset} (\livelink{datarep:sectionoffsetlength}{section offset}) \\
996 \addttindexx{type\_offset}
997 A 4-byte or 8-byte unsigned offset
998 \addtoindexx{section offset!in .debug\_info header}
999 relative to the beginning
1000 of the \addtoindex{type unit} header.
1001 This offset refers to the debugging
1002 information entry that describes the type. Because the type
1003 may be nested inside a namespace or other structures, and may
1004 contain references to other types that have not been placed in
1005 separate type units, it is not necessarily either the first or
1006 the only entry in the type unit. In the \thirtytwobitdwarfformat,
1007 this is a 4-byte unsigned length; in the \sixtyfourbitdwarfformat,
1008 this is an 8-byte unsigned length
1009 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1013 \subsection{Debugging Information Entry}
1014 \label{datarep:debugginginformationentry}
1016 Each debugging information entry begins with an
1017 unsigned LEB128\addtoindexx{LEB128!unsigned}
1018 number containing the abbreviation code for the entry. This
1019 code represents an entry within the abbreviations table
1020 associated with the compilation unit containing this entry. The
1021 abbreviation code is followed by a series of attribute values.
1023 On some architectures, there are alignment constraints on
1024 section boundaries. To make it easier to pad debugging
1025 information sections to satisfy such constraints, the
1026 abbreviation code 0 is reserved. Debugging information entries
1027 consisting of only the abbreviation code 0 are considered
1030 \subsection{Abbreviations Tables}
1031 \label{datarep:abbreviationstables}
1033 The abbreviations tables for all compilation units
1034 are contained in a separate object file section called
1036 As mentioned before, multiple compilation
1037 units may share the same abbreviations table.
1039 The abbreviations table for a single compilation unit consists
1040 of a series of abbreviation declarations. Each declaration
1041 specifies the tag and attributes for a particular form of
1042 debugging information entry. Each declaration begins with
1043 an unsigned LEB128\addtoindexx{LEB128!unsigned}
1044 number representing the abbreviation
1045 code itself. It is this code that appears at the beginning
1046 of a debugging information entry in the
1048 section. As described above, the abbreviation
1049 code 0 is reserved for null debugging information entries. The
1050 abbreviation code is followed by another unsigned LEB128\addtoindexx{LEB128!unsigned}
1051 number that encodes the entry\textquoteright s tag. The encodings for the
1052 tag names are given in
1053 Table \refersec{tab:tagencodings}.
1056 \setlength{\extrarowheight}{0.1cm}
1057 \begin{longtable}{l|c}
1059 \caption{Tag encodings} \label{tab:tagencodings} \\
1060 \hline \bfseries Tag name&\bfseries Value\\ \hline
1062 \bfseries Tag name&\bfseries Value \\ \hline
1064 \hline \emph{Continued on next page}
1066 \hline \ddag\ \textit{New in DWARF Version 5}
1068 \DWTAGarraytype{} &0x01 \\
1069 \DWTAGclasstype&0x02 \\
1070 \DWTAGentrypoint&0x03 \\
1071 \DWTAGenumerationtype&0x04 \\
1072 \DWTAGformalparameter&0x05 \\
1073 \DWTAGimporteddeclaration&0x08 \\
1075 \DWTAGlexicalblock&0x0b \\
1076 \DWTAGmember&0x0d \\
1077 \DWTAGpointertype&0x0f \\
1078 \DWTAGreferencetype&0x10 \\
1079 \DWTAGcompileunit&0x11 \\
1080 \DWTAGstringtype&0x12 \\
1081 \DWTAGstructuretype&0x13 \\
1082 \DWTAGsubroutinetype&0x15 \\
1083 \DWTAGtypedef&0x16 \\
1084 \DWTAGuniontype&0x17 \\
1085 \DWTAGunspecifiedparameters&0x18 \\
1086 \DWTAGvariant&0x19 \\
1087 \DWTAGcommonblock&0x1a \\
1088 \DWTAGcommoninclusion&0x1b \\
1089 \DWTAGinheritance&0x1c \\
1090 \DWTAGinlinedsubroutine&0x1d \\
1091 \DWTAGmodule&0x1e \\
1092 \DWTAGptrtomembertype&0x1f \\
1093 \DWTAGsettype&0x20 \\
1094 \DWTAGsubrangetype&0x21 \\
1095 \DWTAGwithstmt&0x22 \\
1096 \DWTAGaccessdeclaration&0x23 \\
1097 \DWTAGbasetype&0x24 \\
1098 \DWTAGcatchblock&0x25 \\
1099 \DWTAGconsttype&0x26 \\
1100 \DWTAGconstant&0x27 \\
1101 \DWTAGenumerator&0x28 \\
1102 \DWTAGfiletype&0x29 \\
1103 \DWTAGfriend&0x2a \\
1104 \DWTAGnamelist&0x2b \\
1105 \DWTAGnamelistitem&0x2c \\
1106 \DWTAGpackedtype&0x2d \\
1107 \DWTAGsubprogram&0x2e \\
1108 \DWTAGtemplatetypeparameter&0x2f \\
1109 \DWTAGtemplatevalueparameter&0x30 \\
1110 \DWTAGthrowntype&0x31 \\
1111 \DWTAGtryblock&0x32 \\
1112 \DWTAGvariantpart&0x33 \\
1113 \DWTAGvariable&0x34 \\
1114 \DWTAGvolatiletype&0x35 \\
1115 \DWTAGdwarfprocedure&0x36 \\
1116 \DWTAGrestricttype&0x37 \\
1117 \DWTAGinterfacetype&0x38 \\
1118 \DWTAGnamespace&0x39 \\
1119 \DWTAGimportedmodule&0x3a \\
1120 \DWTAGunspecifiedtype&0x3b \\
1121 \DWTAGpartialunit&0x3c \\
1122 \DWTAGimportedunit&0x3d \\
1123 \DWTAGcondition&\xiiif \\
1124 \DWTAGsharedtype&0x40 \\
1125 \DWTAGtypeunit & 0x41 \\
1126 \DWTAGrvaluereferencetype & 0x42 \\
1127 \DWTAGtemplatealias & 0x43 \\
1128 \DWTAGcoarraytype~\ddag & 0x44 \\
1129 \DWTAGgenericsubrange~\ddag & 0x45 \\
1130 \DWTAGdynamictype~\ddag & 0x46 \\
1131 \DWTAGatomictype~\ddag & 0x47 \\
1132 \DWTAGcallsite~\ddag & 0x48 \\
1133 \DWTAGcallsiteparameter~\ddag & 0x49 \\
1134 \DWTAGlouser&0x4080 \\
1135 \DWTAGhiuser&\xffff \\
1139 Following the tag encoding is a 1-byte value that determines
1140 whether a debugging information entry using this abbreviation
1141 has child entries or not. If the value is
1143 the next physically succeeding entry of any debugging
1144 information entry using this abbreviation is the first
1145 child of that entry. If the 1-byte value following the
1146 abbreviation\textquoteright s tag encoding is
1147 \DWCHILDRENnoTARG, the next
1148 physically succeeding entry of any debugging information entry
1149 using this abbreviation is a sibling of that entry. (Either
1150 the first child or sibling entries may be null entries). The
1151 encodings for the child determination byte are given in
1152 Table \refersec{tab:childdeterminationencodings}
1154 Section \refersec{chap:relationshipofdebugginginformationentries},
1155 each chain of sibling entries is terminated by a null entry.)
1159 \setlength{\extrarowheight}{0.1cm}
1160 \begin{longtable}{l|c}
1161 \caption{Child determination encodings}
1162 \label{tab:childdeterminationencodings}
1163 \addtoindexx{Child determination encodings} \\
1164 \hline \bfseries Children determination name&\bfseries Value \\ \hline
1166 \bfseries Children determination name&\bfseries Value \\ \hline
1168 \hline \emph{Continued on next page}
1172 \DWCHILDRENno&0x00 \\
1173 \DWCHILDRENyes&0x01 \\ \hline
1178 Finally, the child encoding is followed by a series of
1179 attribute specifications. Each attribute specification
1180 consists of two parts. The first part is an
1181 unsigned LEB128\addtoindexx{LEB128!unsigned}
1182 number representing the attribute\textquoteright s name.
1183 The second part is an
1184 unsigned LEB128\addtoindexx{LEB128!unsigned}
1185 number representing the attribute\textquoteright s form.
1186 The series of attribute specifications ends with an
1187 entry containing 0 for the name and 0 for the form.
1190 \DWFORMindirectTARG{} is a special case. For
1191 attributes with this form, the attribute value itself in the
1193 section begins with an unsigned
1194 LEB128 number that represents its form. This allows producers
1195 to choose forms for particular attributes
1196 \addtoindexx{abbreviations table!dynamic forms in}
1198 without having to add a new entry to the abbreviations table.
1200 The attribute form \DWFORMimplicitconstTARG{} is another special case.
1201 For attributes with this form, the attribute specification contains
1202 a third part, which is a signed LEB128\addtoindexx{LEB128!signed}
1203 number. The value of this number is used as the value of the
1204 attribute, and no value is stored in the \dotdebuginfo{} section.
1206 The abbreviations for a given compilation unit end with an
1207 entry consisting of a 0 byte for the abbreviation code.
1210 Appendix \refersec{app:compilationunitsandabbreviationstableexample}
1211 for a depiction of the organization of the
1212 debugging information.}
1215 \subsection{Attribute Encodings}
1216 \label{datarep:attributeencodings}
1218 The encodings for the attribute names are given in
1219 Table \referfol{tab:attributeencodings}.
1222 \setlength{\extrarowheight}{0.1cm}
1223 \begin{longtable}{l|c|l}
1224 \caption{Attribute encodings}
1225 \label{tab:attributeencodings}
1226 \addtoindexx{attribute encodings} \\
1227 \hline \bfseries Attribute name&\bfseries Value &\bfseries Classes \\ \hline
1229 \bfseries Attribute name&\bfseries Value &\bfseries Classes\\ \hline
1231 \hline \emph{Continued on next page}
1233 \hline \ddag\ \textit{New in DWARF Version 5}
1235 \DWATsibling&0x01&\livelink{chap:classreference}{reference}
1236 \addtoindexx{sibling attribute} \\
1237 \DWATlocation&0x02&\livelink{chap:classexprloc}{exprloc},
1238 \livelink{chap:classloclistptr}{loclistptr}
1239 \addtoindexx{location attribute} \\
1240 \DWATname&0x03&\livelink{chap:classstring}{string}
1241 \addtoindexx{name attribute} \\
1242 \DWATordering&0x09&\livelink{chap:classconstant}{constant}
1243 \addtoindexx{ordering attribute} \\
1244 \DWATbytesize&0x0b&\livelink{chap:classconstant}{constant},
1245 \livelink{chap:classexprloc}{exprloc},
1246 \livelink{chap:classreference}{reference}
1247 \addtoindexx{byte size attribute} \\
1248 \textit{Reserved}&0x0c\footnote{Code 0x0c is reserved to allow backward compatible support of the
1249 DW\_AT\_bit\_offset \mbox{attribute} which was
1250 defined in \DWARFVersionIII{} and earlier.}
1251 &\livelink{chap:classconstant}{constant},
1252 \livelink{chap:classexprloc}{exprloc},
1253 \livelink{chap:classreference}{reference}
1254 \addtoindexx{bit offset attribute (Version 3)}
1255 \addtoindexx{DW\_AT\_bit\_offset (deprecated)} \\
1256 \DWATbitsize&0x0d&\livelink{chap:classconstant}{constant},
1257 \livelink{chap:classexprloc}{exprloc},
1258 \livelink{chap:classreference}{reference}
1259 \addtoindexx{bit size attribute} \\
1260 \DWATstmtlist&0x10&\livelink{chap:classlineptr}{lineptr}
1261 \addtoindexx{statement list attribute} \\
1262 \DWATlowpc&0x11&\livelink{chap:classaddress}{address}
1263 \addtoindexx{low PC attribute} \\
1264 \DWAThighpc&0x12&\livelink{chap:classaddress}{address},
1265 \livelink{chap:classconstant}{constant}
1266 \addtoindexx{high PC attribute} \\
1267 \DWATlanguage&0x13&\livelink{chap:classconstant}{constant}
1268 \addtoindexx{language attribute} \\
1269 \DWATdiscr&0x15&\livelink{chap:classreference}{reference}
1270 \addtoindexx{discriminant attribute} \\
1271 \DWATdiscrvalue&0x16&\livelink{chap:classconstant}{constant}
1272 \addtoindexx{discriminant value attribute} \\
1273 \DWATvisibility&0x17&\livelink{chap:classconstant}{constant}
1274 \addtoindexx{visibility attribute} \\
1275 \DWATimport&0x18&\livelink{chap:classreference}{reference}
1276 \addtoindexx{import attribute} \\
1277 \DWATstringlength&0x19&\livelink{chap:classexprloc}{exprloc},
1278 \livelink{chap:classloclistptr}{loclistptr}
1279 \addtoindexx{string length attribute} \\
1280 \DWATcommonreference&0x1a&\livelink{chap:classreference}{reference}
1281 \addtoindexx{common reference attribute} \\
1282 \DWATcompdir&0x1b&\livelink{chap:classstring}{string}
1283 \addtoindexx{compilation directory attribute} \\
1284 \DWATconstvalue&0x1c&\livelink{chap:classblock}{block},
1285 \livelink{chap:classconstant}{constant},
1286 \livelink{chap:classstring}{string}
1287 \addtoindexx{constant value attribute} \\
1288 \DWATcontainingtype&0x1d&\livelink{chap:classreference}{reference}
1289 \addtoindexx{containing type attribute} \\
1290 \DWATdefaultvalue&0x1e&\livelink{chap:classconstant}{constant},
1291 \livelink{chap:classreference}{reference},
1292 \livelink{chap:classflag}{flag}
1293 \addtoindexx{default value attribute} \\
1294 \DWATinline&0x20&\livelink{chap:classconstant}{constant}
1295 \addtoindexx{inline attribute} \\
1296 \DWATisoptional&0x21&\livelink{chap:classflag}{flag}
1297 \addtoindexx{is optional attribute} \\
1298 \DWATlowerbound&0x22&\livelink{chap:classconstant}{constant},
1299 \livelink{chap:classexprloc}{exprloc},
1300 \livelink{chap:classreference}{reference}
1301 \addtoindexx{lower bound attribute} \\
1302 \DWATproducer&0x25&\livelink{chap:classstring}{string}
1303 \addtoindexx{producer attribute} \\
1304 \DWATprototyped&0x27&\livelink{chap:classflag}{flag}
1305 \addtoindexx{prototyped attribute} \\
1306 \DWATreturnaddr&0x2a&\livelink{chap:classexprloc}{exprloc},
1307 \livelink{chap:classloclistptr}{loclistptr}
1308 \addtoindexx{return address attribute} \\
1309 \DWATstartscope&0x2c&\livelink{chap:classconstant}{constant},
1310 \livelink{chap:classrangelistptr}{rangelistptr}
1311 \addtoindexx{start scope attribute} \\
1312 \DWATbitstride&0x2e&\livelink{chap:classconstant}{constant},
1313 \livelink{chap:classexprloc}{exprloc},
1314 \livelink{chap:classreference}{reference}
1315 \addtoindexx{bit stride attribute} \\
1316 \DWATupperbound&0x2f&\livelink{chap:classconstant}{constant},
1317 \livelink{chap:classexprloc}{exprloc},
1318 \livelink{chap:classreference}{reference}
1319 \addtoindexx{upper bound attribute} \\
1320 \DWATabstractorigin&0x31&\livelink{chap:classreference}{reference}
1321 \addtoindexx{abstract origin attribute} \\
1322 \DWATaccessibility&0x32&\livelink{chap:classconstant}{constant}
1323 \addtoindexx{accessibility attribute} \\
1324 \DWATaddressclass&0x33&\livelink{chap:classconstant}{constant}
1325 \addtoindexx{address class attribute} \\
1326 \DWATartificial&0x34&\livelink{chap:classflag}{flag}
1327 \addtoindexx{artificial attribute} \\
1328 \DWATbasetypes&0x35&\livelink{chap:classreference}{reference}
1329 \addtoindexx{base types attribute} \\
1330 \DWATcallingconvention&0x36&\livelink{chap:classconstant}{constant}
1331 \addtoindexx{calling convention attribute} \\
1332 \DWATcount&0x37&\livelink{chap:classconstant}{constant},
1333 \livelink{chap:classexprloc}{exprloc},
1334 \livelink{chap:classreference}{reference}
1335 \addtoindexx{count attribute} \\
1336 \DWATdatamemberlocation&0x38&\livelink{chap:classconstant}{constant},
1337 \livelink{chap:classexprloc}{exprloc},
1338 \livelink{chap:classloclistptr}{loclistptr}
1339 \addtoindexx{data member attribute} \\
1340 \DWATdeclcolumn&0x39&\livelink{chap:classconstant}{constant}
1341 \addtoindexx{declaration column attribute} \\
1342 \DWATdeclfile&0x3a&\livelink{chap:classconstant}{constant}
1343 \addtoindexx{declaration file attribute} \\
1344 \DWATdeclline&0x3b&\livelink{chap:classconstant}{constant}
1345 \addtoindexx{declaration line attribute} \\
1346 \DWATdeclaration&0x3c&\livelink{chap:classflag}{flag}
1347 \addtoindexx{declaration attribute} \\
1348 \DWATdiscrlist&0x3d&\livelink{chap:classblock}{block}
1349 \addtoindexx{discriminant list attribute} \\
1350 \DWATencoding&0x3e&\livelink{chap:classconstant}{constant}
1351 \addtoindexx{encoding attribute} \\
1352 \DWATexternal&\xiiif&\livelink{chap:classflag}{flag}
1353 \addtoindexx{external attribute} \\
1354 \DWATframebase&0x40&\livelink{chap:classexprloc}{exprloc},
1355 \livelink{chap:classloclistptr}{loclistptr}
1356 \addtoindexx{frame base attribute} \\
1357 \DWATfriend&0x41&\livelink{chap:classreference}{reference}
1358 \addtoindexx{friend attribute} \\
1359 \DWATidentifiercase&0x42&\livelink{chap:classconstant}{constant}
1360 \addtoindexx{identifier case attribute} \\
1361 \DWATmacroinfo\footnote{\raggedright Not used in \DWARFVersionV.
1362 Reserved for compatibility and coexistence
1363 with prior DWARF versions.}
1364 &0x43&\livelink{chap:classmacptr}{macptr}
1365 \addtoindexx{macro information attribute (legacy)!encoding} \\
1366 \DWATnamelistitem&0x44&\livelink{chap:classreference}{reference}
1367 \addtoindexx{name list item attribute} \\
1368 \DWATpriority&0x45&\livelink{chap:classreference}{reference}
1369 \addtoindexx{priority attribute} \\
1370 \DWATsegment&0x46&\livelink{chap:classexprloc}{exprloc},
1371 \livelink{chap:classloclistptr}{loclistptr}
1372 \addtoindexx{segment attribute} \\
1373 \DWATspecification&0x47&\livelink{chap:classreference}{reference}
1374 \addtoindexx{specification attribute} \\
1375 \DWATstaticlink&0x48&\livelink{chap:classexprloc}{exprloc},
1376 \livelink{chap:classloclistptr}{loclistptr}
1377 \addtoindexx{static link attribute} \\
1378 \DWATtype&0x49&\livelink{chap:classreference}{reference}
1379 \addtoindexx{type attribute} \\
1380 \DWATuselocation&0x4a&\livelink{chap:classexprloc}{exprloc},
1381 \livelink{chap:classloclistptr}{loclistptr}
1382 \addtoindexx{location list attribute} \\
1383 \DWATvariableparameter&0x4b&\livelink{chap:classflag}{flag}
1384 \addtoindexx{variable parameter attribute} \\
1385 \DWATvirtuality&0x4c&\livelink{chap:classconstant}{constant}
1386 \addtoindexx{virtuality attribute} \\
1387 \DWATvtableelemlocation&0x4d&\livelink{chap:classexprloc}{exprloc},
1388 \livelink{chap:classloclistptr}{loclistptr}
1389 \addtoindexx{vtable element location attribute} \\
1390 \DWATallocated&0x4e&\livelink{chap:classconstant}{constant},
1391 \livelink{chap:classexprloc}{exprloc},
1392 \livelink{chap:classreference}{reference}
1393 \addtoindexx{allocated attribute} \\
1394 \DWATassociated&0x4f&\livelink{chap:classconstant}{constant},
1395 \livelink{chap:classexprloc}{exprloc},
1396 \livelink{chap:classreference}{reference}
1397 \addtoindexx{associated attribute} \\
1398 \DWATdatalocation&0x50&\livelink{chap:classexprloc}{exprloc}
1399 \addtoindexx{data location attribute} \\
1400 \DWATbytestride&0x51&\livelink{chap:classconstant}{constant},
1401 \livelink{chap:classexprloc}{exprloc},
1402 \livelink{chap:classreference}{reference}
1403 \addtoindexx{byte stride attribute} \\
1404 \DWATentrypc&0x52&\livelink{chap:classaddress}{address},
1405 \livelink{chap:classconstant}{constant}
1406 \addtoindexx{entry PC attribute} \\
1407 \DWATuseUTFeight&0x53&\livelink{chap:classflag}{flag}
1408 \addtoindexx{use UTF8 attribute}\addtoindexx{UTF-8} \\
1409 \DWATextension&0x54&\livelink{chap:classreference}{reference}
1410 \addtoindexx{extension attribute} \\
1411 \DWATranges&0x55&\livelink{chap:classrangelistptr}{rangelistptr}
1412 \addtoindexx{ranges attribute} \\
1413 \DWATtrampoline&0x56&\livelink{chap:classaddress}{address},
1414 \livelink{chap:classflag}{flag},
1415 \livelink{chap:classreference}{reference},
1416 \livelink{chap:classstring}{string}
1417 \addtoindexx{trampoline attribute} \\
1418 \DWATcallcolumn&0x57&\livelink{chap:classconstant}{constant}
1419 \addtoindexx{call column attribute} \\
1420 \DWATcallfile&0x58&\livelink{chap:classconstant}{constant}
1421 \addtoindexx{call file attribute} \\
1422 \DWATcallline&0x59&\livelink{chap:classconstant}{constant}
1423 \addtoindexx{call line attribute} \\
1424 \DWATdescription&0x5a&\livelink{chap:classstring}{string}
1425 \addtoindexx{description attribute} \\
1426 \DWATbinaryscale&0x5b&\livelink{chap:classconstant}{constant}
1427 \addtoindexx{binary scale attribute} \\
1428 \DWATdecimalscale&0x5c&\livelink{chap:classconstant}{constant}
1429 \addtoindexx{decimal scale attribute} \\
1430 \DWATsmall{} &0x5d&\livelink{chap:classreference}{reference}
1431 \addtoindexx{small attribute} \\
1432 \DWATdecimalsign&0x5e&\livelink{chap:classconstant}{constant}
1433 \addtoindexx{decimal scale attribute} \\
1434 \DWATdigitcount&0x5f&\livelink{chap:classconstant}{constant}
1435 \addtoindexx{digit count attribute} \\
1436 \DWATpicturestring&0x60&\livelink{chap:classstring}{string}
1437 \addtoindexx{picture string attribute} \\
1438 \DWATmutable&0x61&\livelink{chap:classflag}{flag}
1439 \addtoindexx{mutable attribute} \\
1440 \DWATthreadsscaled&0x62&\livelink{chap:classflag}{flag}
1441 \addtoindexx{thread scaled attribute} \\
1442 \DWATexplicit&0x63&\livelink{chap:classflag}{flag}
1443 \addtoindexx{explicit attribute} \\
1444 \DWATobjectpointer&0x64&\livelink{chap:classreference}{reference}
1445 \addtoindexx{object pointer attribute} \\
1446 \DWATendianity&0x65&\livelink{chap:classconstant}{constant}
1447 \addtoindexx{endianity attribute} \\
1448 \DWATelemental&0x66&\livelink{chap:classflag}{flag}
1449 \addtoindexx{elemental attribute} \\
1450 \DWATpure&0x67&\livelink{chap:classflag}{flag}
1451 \addtoindexx{pure attribute} \\
1452 \DWATrecursive&0x68&\livelink{chap:classflag}{flag}
1453 \addtoindexx{recursive attribute} \\
1454 \DWATsignature{} &0x69&\livelink{chap:classreference}{reference}
1455 \addtoindexx{signature attribute} \\
1456 \DWATmainsubprogram{} &0x6a&\livelink{chap:classflag}{flag}
1457 \addtoindexx{main subprogram attribute} \\
1458 \DWATdatabitoffset{} &0x6b&\livelink{chap:classconstant}{constant}
1459 \addtoindexx{data bit offset attribute} \\
1460 \DWATconstexpr{} &0x6c&\livelink{chap:classflag}{flag}
1461 \addtoindexx{constant expression attribute} \\
1462 \DWATenumclass{} &0x6d&\livelink{chap:classflag}{flag}
1463 \addtoindexx{enumeration class attribute} \\
1464 \DWATlinkagename{} &0x6e&\livelink{chap:classstring}{string}
1465 \addtoindexx{linkage name attribute} \\
1466 \DWATstringlengthbitsize{}~\ddag&0x6f&
1467 \livelink{chap:classconstant}{constant}
1468 \addtoindexx{string length attribute!size of length} \\
1469 \DWATstringlengthbytesize{}~\ddag&0x70&
1470 \livelink{chap:classconstant}{constant}
1471 \addtoindexx{string length attribute!size of length} \\
1472 \DWATrank~\ddag&0x71&
1473 \livelink{chap:classconstant}{constant},
1474 \livelink{chap:classexprloc}{exprloc}
1475 \addtoindexx{rank attribute} \\
1476 \DWATstroffsetsbase~\ddag&0x72&
1477 \livelinki{chap:classstroffsetsptr}{stroffsetsptr}{stroffsetsptr class}
1478 \addtoindexx{string offsets base!encoding} \\
1479 \DWATaddrbase~\ddag &0x73&
1480 \livelinki{chap:classaddrptr}{addrptr}{addrptr class}
1481 \addtoindexx{address table base!encoding} \\
1482 \DWATrangesbase~\ddag&0x74&
1483 \livelinki{chap:classrangelistptr}{rangelistptr}{rangelistptr class}
1484 \addtoindexx{ranges base!encoding} \\
1485 \DWATdwoid~\ddag &0x75&
1486 \livelink{chap:classconstant}{constant}
1487 \addtoindexx{split DWARF object file id!encoding} \\
1488 \DWATdwoname~\ddag &0x76&
1489 \livelink{chap:classstring}{string}
1490 \addtoindexx{split DWARF object file name!encoding} \\
1491 \DWATreference~\ddag &0x77&
1492 \livelink{chap:classflag}{flag} \\
1493 \DWATrvaluereference~\ddag &0x78&
1494 \livelink{chap:classflag}{flag} \\
1495 \DWATmacros~\ddag &0x79&\livelink{chap:classmacptr}{macptr}
1496 \addtoindexx{macro information attribute} \\
1497 \DWATcallallcalls~\ddag &0x7a&\CLASSflag
1498 \addtoindexx{all calls summary attribute} \\
1499 \DWATcallallsourcecalls~\ddag &0x7b &\CLASSflag
1500 \addtoindexx{all source calls summary attribute} \\
1501 \DWATcallalltailcalls~\ddag &0x7c&\CLASSflag
1502 \addtoindexx{all tail calls summary attribute} \\
1503 \DWATcallreturnpc~\ddag &0x7d &\CLASSaddress
1504 \addtoindexx{call return PC attribute} \\
1505 \DWATcallvalue~\ddag &0x7e &\CLASSexprloc
1506 \addtoindexx{call value attribute} \\
1507 \DWATcallorigin~\ddag &0x7f &\CLASSexprloc
1508 \addtoindexx{call origin attribute} \\
1509 \DWATcallparameter~\ddag &0x80 &\CLASSreference
1510 \addtoindexx{call parameter attribute} \\
1511 \DWATcallpc~\ddag &0x81 &\CLASSaddress
1512 \addtoindexx{call PC attribute} \\
1513 \DWATcalltailcall~\ddag &0x82 &\CLASSflag
1514 \addtoindexx{call tail call attribute} \\
1515 \DWATcalltarget~\ddag &0x83 &\CLASSexprloc
1516 \addtoindexx{call target attribute} \\
1517 \DWATcalltargetclobbered~\ddag &0x84 &\CLASSexprloc
1518 \addtoindexx{call target clobbered attribute} \\
1519 \DWATcalldatalocation~\ddag &0x85 &\CLASSexprloc
1520 \addtoindexx{call data location attribute} \\
1521 \DWATcalldatavalue~\ddag &0x86 &\CLASSexprloc
1522 \addtoindexx{call data value attribute} \\
1523 \DWATnoreturn~\ddag &0x87 &\CLASSflag
1524 \addtoindexx{noreturn attribute} \\
1525 \DWATalignment~\ddag &0x88 &\CLASSconstant
1526 \addtoindexx{alignment attribute} \\
1527 \DWATexportsymbols~\ddag &0x89 &\CLASSflag
1528 \addtoindexx{export symbols attribute} \\
1529 \DWATdeleted~\ddag &0x8a &\CLASSflag \addtoindexx{deleted attribute} \\
1530 \DWATdefaulted~\ddag &0x8b &\CLASSconstant \addtoindexx{defaulted attribute} \\
1531 \DWATlouser&0x2000 & --- \addtoindexx{low user attribute encoding} \\
1532 \DWAThiuser&\xiiifff& --- \addtoindexx{high user attribute encoding} \\
1537 The attribute form governs how the value of the attribute is
1538 encoded. There are nine classes of form, listed below. Each
1539 class is a set of forms which have related representations
1540 and which are given a common interpretation according to the
1541 attribute in which the form is used.
1543 Form \DWFORMsecoffsetTARG{}
1545 \addtoindexx{rangelistptr class}
1547 \addtoindexx{macptr class}
1549 \addtoindexx{loclistptr class}
1551 \addtoindexx{lineptr class}
1557 \CLASSrangelistptr{} or
1558 \CLASSstroffsetsptr;
1559 the list of classes allowed by the applicable attribute in
1560 Table \refersec{tab:attributeencodings}
1561 determines the class of the form.
1563 In the form descriptions that follow, some forms are said
1564 to depend in part on the value of an attribute of the
1565 \definition{\associatedcompilationunit}:
1568 In the case of a \splitDWARFobjectfile{}, the associated
1569 compilation unit is the skeleton compilation unit corresponding
1570 to the containing unit.
1571 \item Otherwise, the associated compilation unit
1572 is the containing unit.
1576 Each possible form belongs to one or more of the following classes
1577 (see Table \refersec{tab:classesofattributevalue} for a summary of
1578 the purpose and general usage of each class):
1581 \item \livelinki{chap:classaddress}{address}{address class} \\
1582 \livetarg{datarep:classaddress}{}
1583 Represented as either:
1585 \item An object of appropriate size to hold an
1586 address on the target machine
1588 The size is encoded in the compilation unit header
1589 (see Section \refersec{datarep:compilationunitheader}).
1590 This address is relocatable in a relocatable object file and
1591 is relocated in an executable file or shared object file.
1593 \item An indirect index into a table of addresses (as
1594 described in the previous bullet) in the
1595 \dotdebugaddr{} section (\DWFORMaddrxTARG).
1596 The representation of a \DWFORMaddrxNAME{} value is an unsigned
1597 \addtoindex{LEB128} value, which is interpreted as a zero-based
1598 index into an array of addresses in the \dotdebugaddr{} section.
1599 The index is relative to the value of the \DWATaddrbase{} attribute
1600 of the associated compilation unit.
1605 \item \livelink{chap:classaddrptr}{addrptr} \\
1606 \livetarg{datarep:classaddrptr}{}
1607 This is an offset into the \dotdebugaddr{} section (\DWFORMsecoffset). It
1608 consists of an offset from the beginning of the \dotdebugaddr{} section to the
1609 beginning of the list of machine addresses information for the
1610 referencing entity. It is relocatable in
1611 a relocatable object file, and relocated in an executable or
1612 shared object file. In the \thirtytwobitdwarfformat, this offset
1613 is a 4-byte unsigned value; in the 64-bit DWARF
1614 format, it is an 8-byte unsigned value (see Section
1615 \refersec{datarep:32bitand64bitdwarfformats}).
1617 \textit{This class is new in \DWARFVersionV.}
1620 \item \livelink{chap:classblock}{block} \\
1621 \livetarg{datarep:classblock}{}
1622 Blocks come in four forms:
1624 \begin{myindentpara}{1cm}
1625 A 1-byte length followed by 0 to 255 contiguous information
1626 bytes (\DWFORMblockoneTARG).
1629 \begin{myindentpara}{1cm}
1630 A 2-byte length followed by 0 to 65,535 contiguous information
1631 bytes (\DWFORMblocktwoTARG).
1634 \begin{myindentpara}{1cm}
1635 A 4-byte length followed by 0 to 4,294,967,295 contiguous
1636 information bytes (\DWFORMblockfourTARG).
1639 \begin{myindentpara}{1cm}
1640 An unsigned LEB128\addtoindexx{LEB128!unsigned}
1641 length followed by the number of bytes
1642 specified by the length (\DWFORMblockTARG).
1645 In all forms, the length is the number of information bytes
1646 that follow. The information bytes may contain any mixture
1647 of relocated (or relocatable) addresses, references to other
1648 debugging information entries or data bytes.
1650 \item \livelinki{chap:classconstant}{constant}{constant class} \\
1651 \livetarg{datarep:classconstant}{}
1652 There are eight forms of constants. There are fixed length
1653 constant data forms for one-, two-, four-, eight- and sixteen-byte values
1657 \DWFORMdatafourTARG,
1658 \DWFORMdataeightTARG{} and
1659 \DWFORMdatasixteenTARG).
1660 There are also variable length constant
1661 data forms encoded using LEB128 numbers (see below).
1662 Both signed (\DWFORMsdataTARG) and unsigned
1663 (\DWFORMudataTARG) variable length constants are available.
1664 There is also an implicit constant (\DWFORMimplicitconst),
1665 whose value is provided as part of the abbreviation
1669 The data in \DWFORMdataone,
1672 \DWFORMdataeight{} and
1673 \DWFORMdatasixteen{}
1674 can be anything. Depending on context, it may
1675 be a signed integer, an unsigned integer, a floating\dash point
1676 constant, or anything else. A consumer must use context to
1677 know how to interpret the bits, which if they are target
1678 machine data (such as an integer or floating-point constant)
1679 will be in target machine \byteorder.
1681 \textit{If one of the \DWFORMdataTARG\textless n\textgreater
1682 forms is used to represent a
1683 signed or unsigned integer, it can be hard for a consumer
1684 to discover the context necessary to determine which
1685 interpretation is intended. Producers are therefore strongly
1686 encouraged to use \DWFORMsdata{} or
1687 \DWFORMudata{} for signed and
1688 unsigned integers respectively, rather than
1689 \DWFORMdata\textless n\textgreater.}
1692 \item \livelinki{chap:classexprloc}{exprloc}{exprloc class} \\
1693 \livetarg{datarep:classexprloc}{}
1694 This is an unsigned LEB128\addtoindexx{LEB128!unsigned} length followed by the
1695 number of information bytes specified by the length
1696 (\DWFORMexprlocTARG).
1697 The information bytes contain a DWARF expression
1698 (see Section \refersec{chap:dwarfexpressions})
1699 or location description
1700 (see Section \refersec{chap:locationdescriptions}).
1702 \item \livelinki{chap:classflag}{flag}{flag class} \\
1703 \livetarg{datarep:classflag}{}
1704 A flag \addtoindexx{flag class}
1705 is represented explicitly as a single byte of data
1706 (\DWFORMflagTARG) or
1707 implicitly (\DWFORMflagpresentTARG).
1709 first case, if the \nolink{flag} has value zero, it indicates the
1710 absence of the attribute; if the \nolink{flag} has a non\dash zero value,
1711 it indicates the presence of the attribute. In the second
1712 case, the attribute is implicitly indicated as present, and
1713 no value is encoded in the debugging information entry itself.
1715 \item \livelinki{chap:classlineptr}{lineptr}{lineptr class} \\
1716 \livetarg{datarep:classlineptr}{}
1717 This is an offset into
1718 \addtoindexx{section offset!in class lineptr value}
1720 \dotdebugline{} or \dotdebuglinedwo{} section
1722 It consists of an offset from the beginning of the
1724 section to the first byte of
1725 the data making up the line number list for the compilation
1727 It is relocatable in a relocatable object file, and
1728 relocated in an executable or shared object file. In the
1729 \thirtytwobitdwarfformat, this offset is a 4-byte unsigned value;
1730 in the \sixtyfourbitdwarfformat, it is an 8-byte unsigned value
1731 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1734 \item \livelinki{chap:classloclistptr}{loclistptr}{loclistptr class} \\
1735 \livetarg{datarep:classloclistptr}{}
1736 This is an offset into the
1740 It consists of an offset from the
1741 \addtoindexx{section offset!in class loclistptr value}
1744 section to the first byte of
1745 the data making up the
1746 \addtoindex{location list} for the compilation unit.
1747 It is relocatable in a relocatable object file, and
1748 relocated in an executable or shared object file. In the
1749 \thirtytwobitdwarfformat, this offset is a 4-byte unsigned value;
1750 in the \sixtyfourbitdwarfformat, it is an 8-byte unsigned value
1751 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1754 \item \livelinki{chap:classmacptr}{macptr}{macptr class} \\
1755 \livetarg{datarep:classmacptr}{}
1757 \addtoindexx{section offset!in class macptr value}
1759 \dotdebugmacro{} or \dotdebugmacrodwo{} section
1761 It consists of an offset from the beginning of the
1762 \dotdebugmacro{} or \dotdebugmacrodwo{}
1763 section to the the header making up the
1764 macro information list for the compilation unit.
1765 It is relocatable in a relocatable object file, and
1766 relocated in an executable or shared object file. In the
1767 \thirtytwobitdwarfformat, this offset is a 4-byte unsigned value;
1768 in the \sixtyfourbitdwarfformat, it is an 8-byte unsigned value
1769 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1772 \item \livelinki{chap:classrangelistptr}{rangelistptr}{rangelistptr class} \\
1773 \livetarg{datarep:classrangelistptr}{}
1775 \addtoindexx{section offset!in class rangelistptr value}
1776 offset into the \dotdebugranges{} section
1779 offset from the beginning of the
1780 \dotdebugranges{} section
1781 to the beginning of the non\dash contiguous address ranges
1782 information for the referencing entity.
1783 It is relocatable in
1784 a relocatable object file, and relocated in an executable or
1785 shared object file. In the \thirtytwobitdwarfformat, this offset
1786 is a 4-byte unsigned value; in the 64-bit DWARF
1787 format, it is an 8-byte unsigned value (see Section
1788 \refersec{datarep:32bitand64bitdwarfformats}).
1791 \textit{Because classes
1796 \CLASSrangelistptr{} and
1797 \CLASSstroffsetsptr{}
1798 share a common representation, it is not possible for an
1799 attribute to allow more than one of these classes}
1803 \item \livelinki{chap:classreference}{reference}{reference class} \\
1804 \livetarg{datarep:classreference}{}
1805 There are four types of reference.
1808 \addtoindexx{reference class}
1809 first type of reference can identify any debugging
1810 information entry within the containing unit.
1813 \addtoindexx{section offset!in class reference value}
1814 offset from the first byte of the compilation
1815 header for the compilation unit containing the reference. There
1816 are five forms for this type of reference. There are fixed
1817 length forms for one, two, four and eight byte offsets
1823 and \DWFORMrefeightTARG).
1824 There is also an unsigned variable
1825 length offset encoded form that uses
1826 unsigned LEB128\addtoindexx{LEB128!unsigned} numbers
1827 (\DWFORMrefudataTARG).
1828 Because this type of reference is within
1829 the containing compilation unit no relocation of the value
1832 The second type of reference can identify any debugging
1833 information entry within a
1834 \dotdebuginfo{} section; in particular,
1835 it may refer to an entry in a different compilation unit
1836 from the unit containing the reference, and may refer to an
1837 entry in a different shared object file. This type of reference
1838 (\DWFORMrefaddrTARG)
1839 is an offset from the beginning of the
1841 section of the target executable or shared object file, or, for
1842 references within a \addtoindex{supplementary object file},
1843 an offset from the beginning of the local \dotdebuginfo{} section;
1844 it is relocatable in a relocatable object file and frequently
1845 relocated in an executable or shared object file. For
1846 references from one shared object or static executable file
1847 to another, the relocation and identification of the target
1848 object must be performed by the consumer. In the
1849 \thirtytwobitdwarfformat, this offset is a 4-byte unsigned value;
1850 in the \sixtyfourbitdwarfformat, it is an 8-byte
1852 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1854 \textit{A debugging information entry that may be referenced by
1855 another compilation unit using
1856 \DWFORMrefaddr{} must have a global symbolic name.}
1858 \textit{For a reference from one executable or shared object file to
1859 another, the reference is resolved by the debugger to identify
1860 the executable or shared object file and the offset into that
1861 file\textquoteright s \dotdebuginfo{}
1862 section in the same fashion as the run
1863 time loader, either when the debug information is first read,
1864 or when the reference is used.}
1866 The third type of reference can identify any debugging
1867 information type entry that has been placed in its own
1868 \addtoindex{type unit}. This type of
1869 reference (\DWFORMrefsigeightTARG) is the
1870 \addtoindexx{type signature}
1871 64-bit type signature
1872 (see Section \refersec{datarep:typesignaturecomputation})
1873 that was computed for the type.
1875 The fourth type of reference is a reference from within the
1876 \dotdebuginfo{} section of the executable or shared object file to
1877 a debugging information entry in the \dotdebuginfo{} section of
1878 a \addtoindex{supplementary object file}.
1879 This type of reference (\DWFORMrefsupTARG) is an offset from the
1880 beginning of the \dotdebuginfo{} section in the
1881 \addtoindex{supplementary object file}.
1883 \textit{The use of compilation unit relative references will reduce the
1884 number of link\dash time relocations and so speed up linking. The
1885 use of the second, third and fourth type of reference allows for the
1886 sharing of information, such as types, across compilation
1887 units, while the fourth type further allows for sharing of information
1888 across compilation units from different executables or shared object files.}
1890 \textit{A reference to any kind of compilation unit identifies the
1891 debugging information entry for that unit, not the preceding
1895 \item \livelinki{chap:classstring}{string}{string class} \\
1896 \livetarg{datarep:classstring}{}
1897 A string is a sequence of contiguous non\dash null bytes followed by
1899 \addtoindexx{string class}
1900 A string may be represented:
1902 \setlength{\itemsep}{0em}
1903 \item immediately in the debugging information entry itself
1904 (\DWFORMstringTARG),
1907 \addtoindexx{section offset!in class string value}
1908 offset into a string table contained in
1909 the \dotdebugstr{} section of the object file (\DWFORMstrpTARG),
1910 the \dotdebuglinestr{} section of the object file (\DWFORMlinestrpTARG),
1911 or as an offset into a string table contained in the
1912 \dotdebugstr{} section of a \addtoindex{supplementary object file}
1913 (\DWFORMstrpsupTARG). \DWFORMstrpsupNAME{} offsets from the \dotdebuginfo{}
1914 section of a \addtoindex{supplementary object file}
1915 refer to the local \dotdebugstr{} section of that same file.
1916 In the \thirtytwobitdwarfformat, the representation of a
1917 \DWFORMstrpNAME{}, \DWFORMstrpNAME{} or \DWFORMstrpsupNAME{}
1918 value is a 4-byte unsigned offset; in the \sixtyfourbitdwarfformat,
1919 it is an 8-byte unsigned offset
1920 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
1923 \item as an indirect offset into the string table using an
1924 index into a table of offsets contained in the
1925 \dotdebugstroffsets{} section of the object file (\DWFORMstrxTARG).
1926 The representation of a \DWFORMstrxNAME{} value is an unsigned
1927 \addtoindex{LEB128} value, which is interpreted as a zero-based
1928 index into an array of offsets in the \dotdebugstroffsets{} section.
1929 The offset entries in the \dotdebugstroffsets{} section have the
1930 same representation as \DWFORMstrp{} values.
1932 Any combination of these three forms may be used within a single compilation.
1934 If the \DWATuseUTFeight{}
1935 \addtoindexx{use UTF8 attribute}\addtoindexx{UTF-8} attribute is specified for the
1936 compilation, partial, skeleton or type unit entry, string values are encoded using the
1937 UTF\dash 8 (\addtoindex{Unicode} Transformation Format\dash 8) from the Universal
1938 Character Set standard (ISO/IEC 10646\dash 1:1993).
1939 \addtoindexx{ISO 10646 character set standard}
1940 Otherwise, the string representation is unspecified.
1942 \textit{The \addtoindex{Unicode} Standard Version 3 is fully compatible with
1943 ISO/IEC 10646\dash 1:1993.
1944 \addtoindexx{ISO 10646 character set standard}
1945 It contains all the same characters
1946 and encoding points as ISO/IEC 10646, as well as additional
1947 information about the characters and their use.}
1949 \textit{Earlier versions of DWARF did not specify the representation
1950 of strings; for compatibility, this version also does
1951 not. However, the UTF\dash 8 representation is strongly recommended.}
1954 \item \livelinki{chap:classstroffsetsptr}{stroffsetsptr}{stroffsetsptr class} \\
1955 \livetarg{datarep:classstroffsetsptr}{}
1956 This is an offset into the \dotdebugstroffsets{} section
1957 (\DWFORMsecoffset). It consists of an offset from the beginning of the
1958 \dotdebugstroffsets{} section to the
1959 beginning of the string offsets information for the
1960 referencing entity. It is relocatable in
1961 a relocatable object file, and relocated in an executable or
1962 shared object file. In the \thirtytwobitdwarfformat, this offset
1963 is a 4-byte unsigned value; in the 64-bit DWARF
1964 format, it is an 8-byte unsigned value (see Section
1965 \refersec{datarep:32bitand64bitdwarfformats}).
1967 \textit{This class is new in \DWARFVersionV.}
1971 In no case does an attribute use one of the classes
1976 \CLASSrangelistptr{} or
1977 \CLASSstroffsetsptr{}
1978 to point into either the
1979 \dotdebuginfo{} or \dotdebugstr{} section.
1981 The form encodings are listed in
1982 Table \referfol{tab:attributeformencodings}.
1986 \setlength{\extrarowheight}{0.1cm}
1987 \begin{longtable}{l|c|l}
1988 \caption{Attribute form encodings} \label{tab:attributeformencodings} \\
1989 \hline \bfseries Form name&\bfseries Value &\bfseries Classes \\ \hline
1991 \bfseries Form name&\bfseries Value &\bfseries Classes\\ \hline
1993 \hline \emph{Continued on next page}
1995 \hline \ddag\ \textit{New in DWARF Version 5}
1998 \DWFORMaddr &0x01&\livelink{chap:classaddress}{address} \\
1999 \textit{Reserved} &0x02& \\
2000 \DWFORMblocktwo &0x03&\livelink{chap:classblock}{block} \\
2001 \DWFORMblockfour &0x04&\livelink{chap:classblock}{block} \\
2002 \DWFORMdatatwo &0x05&\livelink{chap:classconstant}{constant} \\
2003 \DWFORMdatafour &0x06&\livelink{chap:classconstant}{constant} \\
2004 \DWFORMdataeight &0x07&\livelink{chap:classconstant}{constant} \\
2005 \DWFORMstring&0x08&\livelink{chap:classstring}{string} \\
2006 \DWFORMblock&0x09&\livelink{chap:classblock}{block} \\
2007 \DWFORMblockone &0x0a&\livelink{chap:classblock}{block} \\
2008 \DWFORMdataone &0x0b&\livelink{chap:classconstant}{constant} \\
2009 \DWFORMflag&0x0c&\livelink{chap:classflag}{flag} \\
2010 \DWFORMsdata&0x0d&\livelink{chap:classconstant}{constant} \\
2011 \DWFORMstrp&0x0e&\livelink{chap:classstring}{string} \\
2012 \DWFORMudata&0x0f&\livelink{chap:classconstant}{constant} \\
2013 \DWFORMrefaddr&0x10&\livelink{chap:classreference}{reference} \\
2014 \DWFORMrefone&0x11&\livelink{chap:classreference}{reference} \\
2015 \DWFORMreftwo&0x12&\livelink{chap:classreference}{reference} \\
2016 \DWFORMreffour&0x13&\livelink{chap:classreference}{reference} \\
2017 \DWFORMrefeight&0x14&\livelink{chap:classreference}{reference} \\
2018 \DWFORMrefudata&0x15&\livelink{chap:classreference}{reference} \\
2019 \DWFORMindirect&0x16&(see Section \refersec{datarep:abbreviationstables}) \\
2020 \DWFORMsecoffset{} &0x17& \CLASSaddrptr, \CLASSlineptr, \CLASSloclistptr, \\
2021 & & \CLASSmacptr, \CLASSrangelistptr, \CLASSstroffsetsptr \\
2022 \DWFORMexprloc{} &0x18&\livelink{chap:classexprloc}{exprloc} \\
2023 \DWFORMflagpresent{} &0x19&\livelink{chap:classflag}{flag} \\
2024 \DWFORMstrx{} \ddag &0x1a&\livelink{chap:classstring}{string} \\
2025 \DWFORMaddrx{} \ddag &0x1b&\livelink{chap:classaddress}{address} \\
2026 \DWFORMrefsup{}~\ddag &0x1c &\livelink{chap:classreference}{reference} \\
2027 \DWFORMstrpsup{}~\ddag &0x1d &\livelink{chap:classstring}{string} \\
2028 \DWFORMdatasixteen~\ddag &0x1e &\CLASSconstant \\
2029 \DWFORMlinestrp~\ddag &0x1f &\CLASSstring \\
2030 \DWFORMrefsigeight &0x20 &\livelink{chap:classreference}{reference} \\
2031 \DWFORMimplicitconst~\ddag &0x21 &\CLASSconstant \\
2037 \section{Variable Length Data}
2038 \label{datarep:variablelengthdata}
2039 \addtoindexx{variable length data|see {LEB128}}
2041 \addtoindexx{Little Endian Base 128|see{LEB128}}
2042 encoded using \doublequote{Little Endian Base 128}
2043 \addtoindexx{little-endian encoding|see{endian attribute}}
2045 \addtoindexx{LEB128}
2046 LEB128 is a scheme for encoding integers
2047 densely that exploits the assumption that most integers are
2050 \textit{This encoding is equally suitable whether the target machine
2051 architecture represents data in big\dash\ endian or little\dash endian
2052 \byteorder. It is \doublequote{little\dash endian} only in the sense that it
2053 avoids using space to represent the \doublequote{big} end of an
2054 unsigned integer, when the big end is all zeroes or sign
2057 Unsigned LEB128\addtoindexx{LEB128!unsigned} (\addtoindex{ULEB128})
2058 numbers are encoded as follows:
2059 \addtoindexx{LEB128!unsigned, encoding as}
2060 start at the low order end of an unsigned integer and chop
2061 it into 7-bit chunks. Place each chunk into the low order 7
2062 bits of a byte. Typically, several of the high order bytes
2063 will be zero; discard them. Emit the remaining bytes in a
2064 stream, starting with the low order byte; set the high order
2065 bit on each byte except the last emitted byte. The high bit
2066 of zero on the last byte indicates to the decoder that it
2067 has encountered the last byte.
2069 The integer zero is a special case, consisting of a single
2072 Table \refersec{tab:examplesofunsignedleb128encodings}
2073 gives some examples of unsigned LEB128\addtoindexx{LEB128!unsigned}
2075 0x80 in each case is the high order bit of the byte, indicating
2076 that an additional byte follows.
2079 The encoding for signed, two\textquoteright{s} complement LEB128
2080 (\addtoindex{SLEB128}) \addtoindexx{LEB128!signed, encoding as}
2081 numbers is similar, except that the criterion for discarding
2082 high order bytes is not whether they are zero, but whether
2083 they consist entirely of sign extension bits. Consider the
2084 4-byte integer -2. The three high level bytes of the number
2085 are sign extension, thus LEB128 would represent it as a single
2086 byte containing the low order 7 bits, with the high order
2087 bit cleared to indicate the end of the byte stream. Note
2088 that there is nothing within the LEB128 representation that
2089 indicates whether an encoded number is signed or unsigned. The
2090 decoder must know what type of number to expect.
2091 Table \refersec{tab:examplesofunsignedleb128encodings}
2092 gives some examples of unsigned LEB128\addtoindexx{LEB128!unsigned}
2093 numbers and Table \refersec{tab:examplesofsignedleb128encodings}
2094 gives some examples of signed LEB128\addtoindexx{LEB128!signed}
2097 \textit{Appendix \refersec{app:variablelengthdataencodingdecodinginformative}
2098 \addtoindexx{LEB128!examples}
2099 gives algorithms for encoding and decoding these forms.}
2103 \setlength{\extrarowheight}{0.1cm}
2104 \begin{longtable}{c|c|c}
2105 \caption{Examples of unsigned LEB128 encodings}
2106 \label{tab:examplesofunsignedleb128encodings}
2107 \addtoindexx{LEB128 encoding!examples}\addtoindexx{LEB128!unsigned} \\
2108 \hline \bfseries Number&\bfseries First byte &\bfseries Second byte \\ \hline
2110 \bfseries Number&\bfseries First Byte &\bfseries Second byte\\ \hline
2112 \hline \emph{Continued on next page}
2118 128& 0 + 0x80 & 1 \\
2119 129& 1 + 0x80 & 1 \\
2120 %130& 2 + 0x80 & 1 \\
2121 12857& 57 + 0x80 & 100 \\
2128 \setlength{\extrarowheight}{0.1cm}
2129 \begin{longtable}{c|c|c}
2130 \caption{Examples of signed LEB128 encodings}
2131 \label{tab:examplesofsignedleb128encodings}
2132 \addtoindexx{LEB128!signed} \\
2133 \hline \bfseries Number&\bfseries First byte &\bfseries Second byte \\ \hline
2135 \bfseries Number&\bfseries First Byte &\bfseries Second byte\\ \hline
2137 \hline \emph{Continued on next page}
2143 127& 127 + 0x80 & 0 \\
2144 -127& 1 + 0x80 & 0x7f \\
2145 128& 0 + 0x80 & 1 \\
2146 -128& 0 + 0x80 & 0x7f \\
2147 129& 1 + 0x80 & 1 \\
2148 -129& 0x7f + 0x80 & 0x7e \\
2155 \section{DWARF Expressions and Location Descriptions}
2156 \label{datarep:dwarfexpressionsandlocationdescriptions}
2157 \subsection{DWARF Expressions}
2158 \label{datarep:dwarfexpressions}
2161 \addtoindexx{DWARF expression!operator encoding}
2162 DWARF expression is stored in a \nolink{block} of contiguous
2163 bytes. The bytes form a sequence of operations. Each operation
2164 is a 1-byte code that identifies that operation, followed by
2165 zero or more bytes of additional data. The encodings for the
2166 operations are described in
2167 Table \refersec{tab:dwarfoperationencodings}.
2170 \setlength{\extrarowheight}{0.1cm}
2171 \begin{longtable}{l|c|c|l}
2172 \caption{DWARF operation encodings} \label{tab:dwarfoperationencodings} \\
2173 \hline & &\bfseries No. of &\\
2174 \bfseries Operation&\bfseries Code &\bfseries Operands &\bfseries Notes\\ \hline
2176 & &\bfseries No. of &\\
2177 \bfseries Operation&\bfseries Code &\bfseries Operands &\bfseries Notes\\ \hline
2179 \hline \emph{Continued on next page}
2181 \hline \ddag\ \textit{New in DWARF Version 5}
2184 \DWOPaddr&0x03&1 & constant address \\
2185 & & &(size is target specific) \\
2187 \DWOPderef&0x06&0 & \\
2189 \DWOPconstoneu&0x08&1&1-byte constant \\
2190 \DWOPconstones&0x09&1&1-byte constant \\
2191 \DWOPconsttwou&0x0a&1&2-byte constant \\
2192 \DWOPconsttwos&0x0b&1&2-byte constant \\
2193 \DWOPconstfouru&0x0c&1&4-byte constant \\
2194 \DWOPconstfours&0x0d&1&4-byte constant \\
2195 \DWOPconsteightu&0x0e&1&8-byte constant \\
2196 \DWOPconsteights&0x0f&1&8-byte constant \\
2197 \DWOPconstu&0x10&1&ULEB128 constant \\
2198 \DWOPconsts&0x11&1&SLEB128 constant \\
2199 \DWOPdup&0x12&0 & \\
2200 \DWOPdrop&0x13&0 & \\
2201 \DWOPover&0x14&0 & \\
2202 \DWOPpick&0x15&1&1-byte stack index \\
2203 \DWOPswap&0x16&0 & \\
2204 \DWOProt&0x17&0 & \\
2205 \DWOPxderef&0x18&0 & \\
2206 \DWOPabs&0x19&0 & \\
2207 \DWOPand&0x1a&0 & \\
2208 \DWOPdiv&0x1b&0 & \\
2209 \DWOPminus&0x1c&0 & \\
2210 \DWOPmod&0x1d&0 & \\
2211 \DWOPmul&0x1e&0 & \\
2212 \DWOPneg&0x1f&0 & \\
2213 \DWOPnot&0x20&0 & \\
2215 \DWOPplus&0x22&0 & \\
2216 \DWOPplusuconst&0x23&1&ULEB128 addend \\
2217 \DWOPshl&0x24&0 & \\
2218 \DWOPshr&0x25&0 & \\
2219 \DWOPshra&0x26&0 & \\
2220 \DWOPxor&0x27&0 & \\
2222 \DWOPbra&0x28&1 & signed 2-byte constant \\
2229 \DWOPskip&0x2f&1&signed 2-byte constant \\ \hline
2231 \DWOPlitzero & 0x30 & 0 & \\
2232 \DWOPlitone & 0x31 & 0& literals 0 .. 31 = \\
2233 \ldots & & &\hspace{0.3cm}(\DWOPlitzero{} + literal) \\
2234 \DWOPlitthirtyone & 0x4f & 0 & \\ \hline
2236 \DWOPregzero & 0x50 & 0 & \\*
2237 \DWOPregone & 0x51 & 0® 0 .. 31 = \\*
2238 \ldots & & &\hspace{0.3cm}(\DWOPregzero{} + regnum) \\*
2239 \DWOPregthirtyone & 0x6f & 0 & \\ \hline
2241 \DWOPbregzero & 0x70 &1 & SLEB128 offset \\*
2242 \DWOPbregone & 0x71 & 1 &base register 0 .. 31 = \\*
2243 ... & & &\hspace{0.3cm}(\DWOPbregzero{} + regnum) \\*
2244 \DWOPbregthirtyone & 0x8f & 1 & \\ \hline
2246 \DWOPregx{} & 0x90 &1&ULEB128 register \\
2247 \DWOPfbreg{} & 0x91&1&SLEB128 offset \\
2248 \DWOPbregx{} & 0x92&2 &ULEB128 register, \\*
2249 & & &SLEB128 offset \\
2250 \DWOPpiece{} & 0x93 &1& ULEB128 size of piece \\
2251 \DWOPderefsize{} & 0x94 &1& 1-byte size of data retrieved \\
2252 \DWOPxderefsize{} & 0x95&1&1-byte size of data retrieved \\
2253 \DWOPnop{} & 0x96 &0& \\
2255 \DWOPpushobjectaddress&0x97&0 & \\
2256 \DWOPcalltwo&0x98&1& 2-byte offset of DIE \\
2257 \DWOPcallfour&0x99&1& 4-byte offset of DIE \\
2258 \DWOPcallref&0x9a&1& 4\dash\ or 8-byte offset of DIE \\
2259 \DWOPformtlsaddress&0x9b &0& \\
2260 \DWOPcallframecfa{} &0x9c &0& \\
2261 \DWOPbitpiece&0x9d &2&ULEB128 size, \\*
2263 \DWOPimplicitvalue{} &0x9e &2&ULEB128 size, \\*
2264 &&&\nolink{block} of that size\\
2265 \DWOPstackvalue{} &0x9f &0& \\
2266 \DWOPimplicitpointer{}~\ddag &0xa0& 2 &4- or 8-byte offset of DIE, \\*
2267 &&&SLEB128 constant offset \\
2268 \DWOPaddrx~\ddag&0xa1&1&ULEB128 indirect address \\
2269 \DWOPconstx~\ddag&0xa2&1&ULEB128 indirect constant \\
2270 \DWOPentryvalue~\ddag&0xa3&2&ULEB128 size, \\*
2271 &&&\nolink{block} of that size\\
2272 \DWOPconsttype~\ddag & 0xa4 & 3 & ULEB128 type entry offset,\\*
2273 & & & 1-byte size, \\*
2274 & & & constant value \\
2275 \DWOPregvaltype~\ddag & 0xa5 & 2 & ULEB128 register number, \\*
2276 &&& ULEB128 constant offset \\
2277 \DWOPdereftype~\ddag & 0xa6 & 2 & 1-byte size, \\*
2278 &&& ULEB128 type entry offset \\
2279 \DWOPxdereftype~\ddag & 0xa7 & 2 & 1-byte size, \\*
2280 &&& ULEB128 type entry offset \\
2281 \DWOPconvert~\ddag & 0xa8 & 1 & ULEB128 type entry offset \\
2282 \DWOPreinterpret~\ddag & 0xa9 & 1 & ULEB128 type entry offset \\
2283 \DWOPlouser{} &0xe0 && \\
2284 \DWOPhiuser{} &\xff && \\
2290 \subsection{Location Descriptions}
2291 \label{datarep:locationdescriptions}
2293 A location description is used to compute the
2294 location of a variable or other entity.
2296 \subsection{Location Lists}
2297 \label{datarep:locationlists}
2299 Each entry in a \addtoindex{location list} is either a location list entry,
2300 a base address selection entry, or an
2301 \addtoindexx{end-of-list entry!in location list}
2305 \subsubsection{Location List Entries in Non-Split Objects}
2306 A \addtoindex{location list} entry consists of two address offsets followed
2307 by an unsigned 2-byte length, followed by a block of contiguous bytes
2308 that contains a DWARF location description. The length
2309 specifies the number of bytes in that block. The two offsets
2310 are the same size as an address on the target machine.
2313 A base address selection entry and an
2314 \addtoindexx{end-of-list entry!in location list}
2315 end-of-list entry each
2316 consist of two (constant or relocated) address offsets. The two
2317 offsets are the same size as an address on the target machine.
2319 For a \addtoindex{location list} to be specified, the base address of
2320 \addtoindexx{base address selection entry!in location list}
2321 the corresponding compilation unit must be defined
2322 (see Section \refersec{chap:normalandpartialcompilationunitentries}).
2324 \subsubsection{Location List Entries in Split Objects}
2325 \label{datarep:locationlistentriesinsplitobjects}
2326 An alternate form for location list entries is used in split objects.
2327 Each entry begins with an unsigned 1-byte code that indicates the kind of entry
2328 that follows. The encodings for these constants are given in
2329 Table \refersec{tab:locationlistentryencodingvalues}.
2333 \setlength{\extrarowheight}{0.1cm}
2334 \begin{longtable}{l|c}
2335 \caption{Location list entry encoding values} \label{tab:locationlistentryencodingvalues} \\
2336 \hline \bfseries Location list entry encoding name&\bfseries Value \\ \hline
2338 \bfseries Location list entry encoding name&\bfseries Value\\ \hline
2340 \hline \emph{Continued on next page}
2344 \DWLLEendoflistentry & 0x0 \\
2345 \DWLLEbaseaddressselectionentry & 0x01 \\
2346 \DWLLEstartendentry & 0x02 \\
2347 \DWLLEstartlengthentry & 0x03 \\
2348 \DWLLEoffsetpairentry & 0x04 \\
2352 \section{Base Type Attribute Encodings}
2353 \label{datarep:basetypeattributeencodings}
2355 The encodings of the
2356 \hypertarget{chap:DWATencodingencodingofbasetype}{}
2357 constants used in the
2358 \DWATencodingDEFN{} attribute\addtoindexx{encoding attribute}
2360 Table \refersec{tab:basetypeencodingvalues}
2363 \setlength{\extrarowheight}{0.1cm}
2364 \begin{longtable}{l|c}
2365 \caption{Base type encoding values} \label{tab:basetypeencodingvalues} \\
2366 \hline \bfseries Base type encoding name&\bfseries Value \\ \hline
2368 \bfseries Base type encoding name&\bfseries Value\\ \hline
2370 \hline \emph{Continued on next page}
2373 \ddag \ \textit{New in \DWARFVersionV}
2375 \DWATEaddress&0x01 \\
2376 \DWATEboolean&0x02 \\
2377 \DWATEcomplexfloat&0x03 \\
2379 \DWATEsigned&0x05 \\
2380 \DWATEsignedchar&0x06 \\
2381 \DWATEunsigned&0x07 \\
2382 \DWATEunsignedchar&0x08 \\
2383 \DWATEimaginaryfloat&0x09 \\
2384 \DWATEpackeddecimal&0x0a \\
2385 \DWATEnumericstring&0x0b \\
2386 \DWATEedited&0x0c \\
2387 \DWATEsignedfixed&0x0d \\
2388 \DWATEunsignedfixed&0x0e \\
2389 \DWATEdecimalfloat & 0x0f \\
2390 \DWATEUTF{} & 0x10 \\
2391 \DWATEUCS~\ddag & 0x11 \\
2392 \DWATEASCII~\ddag & 0x12 \\
2393 \DWATElouser{} & 0x80 \\
2394 \DWATEhiuser{} & \xff \\
2399 The encodings of the constants used in the
2400 \DWATdecimalsign{} attribute
2402 Table \refersec{tab:decimalsignencodings}.
2405 \setlength{\extrarowheight}{0.1cm}
2406 \begin{longtable}{l|c}
2407 \caption{Decimal sign encodings} \label{tab:decimalsignencodings} \\
2408 \hline \bfseries Decimal sign code name&\bfseries Value \\ \hline
2410 \bfseries Decimal sign code name&\bfseries Value\\ \hline
2412 \hline \emph{Continued on next page}
2417 \DWDSunsigned{} & 0x01 \\
2418 \DWDSleadingoverpunch{} & 0x02 \\
2419 \DWDStrailingoverpunch{} & 0x03 \\
2420 \DWDSleadingseparate{} & 0x04 \\
2421 \DWDStrailingseparate{} & 0x05 \\
2427 The encodings of the constants used in the
2428 \DWATendianity{} attribute are given in
2429 Table \refersec{tab:endianityencodings}.
2432 \setlength{\extrarowheight}{0.1cm}
2433 \begin{longtable}{l|c}
2434 \caption{Endianity encodings} \label{tab:endianityencodings}\\
2435 \hline \bfseries Endian code name&\bfseries Value \\ \hline
2437 \bfseries Endian code name&\bfseries Value\\ \hline
2439 \hline \emph{Continued on next page}
2444 \DWENDdefault{} & 0x00 \\
2445 \DWENDbig{} & 0x01 \\
2446 \DWENDlittle{} & 0x02 \\
2447 \DWENDlouser{} & 0x40 \\
2448 \DWENDhiuser{} & \xff \\
2454 \section{Accessibility Codes}
2455 \label{datarep:accessibilitycodes}
2456 The encodings of the constants used in the
2457 \DWATaccessibility{}
2459 \addtoindexx{accessibility attribute}
2461 Table \refersec{tab:accessibilityencodings}.
2464 \setlength{\extrarowheight}{0.1cm}
2465 \begin{longtable}{l|c}
2466 \caption{Accessibility encodings} \label{tab:accessibilityencodings}\\
2467 \hline \bfseries Accessibility code name&\bfseries Value \\ \hline
2469 \bfseries Accessibility code name&\bfseries Value\\ \hline
2471 \hline \emph{Continued on next page}
2476 \DWACCESSpublic&0x01 \\
2477 \DWACCESSprotected&0x02 \\
2478 \DWACCESSprivate&0x03 \\
2484 \section{Visibility Codes}
2485 \label{datarep:visibilitycodes}
2486 The encodings of the constants used in the
2487 \DWATvisibility{} attribute are given in
2488 Table \refersec{tab:visibilityencodings}.
2491 \setlength{\extrarowheight}{0.1cm}
2492 \begin{longtable}{l|c}
2493 \caption{Visibility encodings} \label{tab:visibilityencodings}\\
2494 \hline \bfseries Visibility code name&\bfseries Value \\ \hline
2496 \bfseries Visibility code name&\bfseries Value\\ \hline
2498 \hline \emph{Continued on next page}
2504 \DWVISexported&0x02 \\
2505 \DWVISqualified&0x03 \\
2510 \section{Virtuality Codes}
2511 \label{datarep:vitualitycodes}
2513 The encodings of the constants used in the
2514 \DWATvirtuality{} attribute are given in
2515 Table \refersec{tab:virtualityencodings}.
2518 \setlength{\extrarowheight}{0.1cm}
2519 \begin{longtable}{l|c}
2520 \caption{Virtuality encodings} \label{tab:virtualityencodings}\\
2521 \hline \bfseries Virtuality code name&\bfseries Value \\ \hline
2523 \bfseries Virtuality code name&\bfseries Value\\ \hline
2525 \hline \emph{Continued on next page}
2530 \DWVIRTUALITYnone&0x00 \\
2531 \DWVIRTUALITYvirtual&0x01 \\
2532 \DWVIRTUALITYpurevirtual&0x02 \\
2539 \DWVIRTUALITYnone{} is equivalent to the absence of the
2543 \section{Source Languages}
2544 \label{datarep:sourcelanguages}
2546 The encodings of the constants used
2547 \addtoindexx{language attribute, encoding}
2549 \addtoindexx{language name encoding}
2552 attribute are given in
2553 Table \refersec{tab:languageencodings}.
2555 % If we don't force a following space it looks odd
2557 and their associated values are reserved, but the
2558 languages they represent are not well supported.
2559 Table \refersec{tab:languageencodings}
2561 \addtoindexx{lower bound attribute!default}
2562 default lower bound, if any, assumed for
2563 an omitted \DWATlowerbound{} attribute in the context of a
2564 \DWTAGsubrangetype{} debugging information entry for each
2568 \setlength{\extrarowheight}{0.1cm}
2569 \begin{longtable}{l|c|c}
2570 \caption{Language encodings} \label{tab:languageencodings}\\
2571 \hline \bfseries Language name&\bfseries Value &\bfseries Default Lower Bound \\ \hline
2573 \bfseries Language name&\bfseries Value &\bfseries Default Lower Bound\\ \hline
2575 \hline \emph{Continued on next page}
2578 \dag \ \textit{See text} \\ \ddag \ \textit{New in \DWARFVersionV}
2580 \addtoindexx{ISO-defined language names}
2582 \DWLANGCeightynine &0x0001 &0 \addtoindexx{C:1989 (ISO)} \\
2583 \DWLANGC{} &0x0002 &0 \addtoindexx{C!non-standard} \\
2584 \DWLANGAdaeightythree{} \dag &0x0003 &1 \addtoindexx{Ada:1983 (ISO)} \\
2585 \DWLANGCplusplus{} &0x0004 &0 \addtoindexx{C++:1998 (ISO)} \\
2586 \DWLANGCobolseventyfour{} \dag &0x0005 &1 \addtoindexx{COBOL:1974 (ISO)} \\
2587 \DWLANGCoboleightyfive{} \dag &0x0006 &1 \addtoindexx{COBOL:1985 (ISO)} \\
2588 \DWLANGFortranseventyseven &0x0007 &1 \addtoindexx{FORTRAN:1977 (ISO)} \\
2589 \DWLANGFortranninety &0x0008 &1 \addtoindexx{Fortran:1990 (ISO)} \\
2590 \DWLANGPascaleightythree &0x0009 &1 \addtoindexx{Pascal:1983 (ISO)} \\
2591 \DWLANGModulatwo &0x000a &1 \addtoindexx{Modula-2:1996 (ISO)} \\
2592 \DWLANGJava &0x000b &0 \addtoindexx{Java} \\
2593 \DWLANGCninetynine &0x000c &0 \addtoindexx{C:1999 (ISO)} \\
2594 \DWLANGAdaninetyfive{} \dag &0x000d &1 \addtoindexx{Ada:1995 (ISO)} \\
2595 \DWLANGFortranninetyfive &0x000e &1 \addtoindexx{Fortran:1995 (ISO)} \\
2596 \DWLANGPLI{} \dag &0x000f &1 \addtoindexx{PL/I:1976 (ANSI)}\\
2597 \DWLANGObjC{} &0x0010 &0 \addtoindexx{Objective C}\\
2598 \DWLANGObjCplusplus{} &0x0011 &0 \addtoindexx{Objective C++}\\
2599 \DWLANGUPC{} &0x0012 &0 \addtoindexx{UPC}\\
2600 \DWLANGD{} &0x0013 &0 \addtoindexx{D language}\\
2601 \DWLANGPython{} \dag &0x0014 &0 \addtoindexx{Python}\\
2602 \DWLANGOpenCL{} \dag \ddag &0x0015 &0 \addtoindexx{OpenCL}\\
2603 \DWLANGGo{} \dag \ddag &0x0016 &0 \addtoindexx{Go}\\
2604 \DWLANGModulathree{} \dag \ddag &0x0017 &1 \addtoindexx{Modula-3}\\
2605 \DWLANGHaskell{} \dag \ddag &0x0018 &0 \addtoindexx{Haskell}\\
2606 \DWLANGCpluspluszerothree{} \ddag &0x0019 &0 \addtoindexx{C++:2003 (ISO)}\\
2607 \DWLANGCpluspluseleven{} \ddag &0x001a &0 \addtoindexx{C++:2011 (ISO)}\\
2608 \DWLANGOCaml{} \ddag &0x001b &0 \addtoindexx{OCaml}\\
2609 \DWLANGRust{} \ddag &0x001c &0 \addtoindexx{Rust}\\
2610 \DWLANGCeleven{} \ddag &0x001d &0 \addtoindexx{C:2011 (ISO)}\\
2611 \DWLANGSwift{} \ddag &0x001e &0 \addtoindexx{Swift} \\
2612 \DWLANGJulia{} \ddag &0x001f &1 \addtoindexx{Julia} \\
2613 \DWLANGDylan{} \ddag &0x0020 &0 \addtoindexx{Dylan} \\
2614 \DWLANGCplusplusfourteen{}~\ddag &0x0021 &0 \addtoindexx{C++:2014 (ISO)} \\
2615 \DWLANGFortranzerothree{}~\ddag &0x0022 &1 \addtoindexx{Fortran:2004 (ISO)} \\
2616 \DWLANGFortranzeroeight{}~\ddag &0x0023 &1 \addtoindexx{Fortran:2010 (ISO)} \\
2617 \DWLANGlouser{} &0x8000 & \\
2618 \DWLANGhiuser{} &\xffff & \\
2623 \section{Address Class Encodings}
2624 \label{datarep:addressclassencodings}
2626 The value of the common
2627 \addtoindex{address class} encoding
2631 \section{Identifier Case}
2632 \label{datarep:identifiercase}
2634 The encodings of the constants used in the
2635 \DWATidentifiercase{} attribute are given in
2636 Table \refersec{tab:identifiercaseencodings}.
2640 \setlength{\extrarowheight}{0.1cm}
2641 \begin{longtable}{l|c}
2642 \caption{Identifier case encodings} \label{tab:identifiercaseencodings}\\
2643 \hline \bfseries Identifier case name&\bfseries Value \\ \hline
2645 \bfseries Identifier case name&\bfseries Value\\ \hline
2647 \hline \emph{Continued on next page}
2651 \DWIDcasesensitive&0x00 \\
2653 \DWIDdowncase&0x02 \\
2654 \DWIDcaseinsensitive&0x03 \\
2658 \section{Calling Convention Encodings}
2659 \label{datarep:callingconventionencodings}
2660 The encodings of the constants used in the
2661 \DWATcallingconvention{} attribute are given in
2662 Table \refersec{tab:callingconventionencodings}.
2665 \setlength{\extrarowheight}{0.1cm}
2666 \begin{longtable}{l|c}
2667 \caption{Calling convention encodings} \label{tab:callingconventionencodings}\\
2668 \hline \bfseries Calling convention name&\bfseries Value \\ \hline
2670 \bfseries Calling convention name&\bfseries Value\\ \hline
2672 \hline \emph{Continued on next page}
2674 \hline \ddag\ \textit{New in DWARF Version 5}
2677 \DWCCnormal &0x01 \\
2678 \DWCCprogram&0x02 \\
2679 \DWCCnocall &0x03 \\
2680 \DWCCpassbyreference~\ddag &0x04 \\
2681 \DWCCpassbyvalue~\ddag &0x05 \\
2682 \DWCClouser &0x40 \\
2689 \section{Inline Codes}
2690 \label{datarep:inlinecodes}
2692 The encodings of the constants used in
2693 \addtoindexx{inline attribute}
2695 \DWATinline{} attribute are given in
2696 Table \refersec{tab:inlineencodings}.
2700 \setlength{\extrarowheight}{0.1cm}
2701 \begin{longtable}{l|c}
2702 \caption{Inline encodings} \label{tab:inlineencodings}\\
2703 \hline \bfseries Inline code name&\bfseries Value \\ \hline
2705 \bfseries Inline Code name&\bfseries Value\\ \hline
2707 \hline \emph{Continued on next page}
2712 \DWINLnotinlined&0x00 \\
2713 \DWINLinlined&0x01 \\
2714 \DWINLdeclarednotinlined&0x02 \\
2715 \DWINLdeclaredinlined&0x03 \\
2720 % this clearpage is ugly, but the following table came
2721 % out oddly without it.
2723 \section{Array Ordering}
2724 \label{datarep:arrayordering}
2726 The encodings of the constants used in the
2727 \DWATordering{} attribute are given in
2728 Table \refersec{tab:orderingencodings}.
2732 \setlength{\extrarowheight}{0.1cm}
2733 \begin{longtable}{l|c}
2734 \caption{Ordering encodings} \label{tab:orderingencodings}\\
2735 \hline \bfseries Ordering name&\bfseries Value \\ \hline
2737 \bfseries Ordering name&\bfseries Value\\ \hline
2739 \hline \emph{Continued on next page}
2744 \DWORDrowmajor&0x00 \\
2745 \DWORDcolmajor&0x01 \\
2751 \section{Discriminant Lists}
2752 \label{datarep:discriminantlists}
2754 The descriptors used in
2755 \addtoindexx{discriminant list attribute}
2757 \DWATdiscrlist{} attribute are
2758 encoded as 1-byte constants. The
2759 defined values are given in
2760 Table \refersec{tab:discriminantdescriptorencodings}.
2762 % Odd that the 'Name' field capitalized here, it is not caps elsewhere.
2764 \setlength{\extrarowheight}{0.1cm}
2765 \begin{longtable}{l|c}
2766 \caption{Discriminant descriptor encodings} \label{tab:discriminantdescriptorencodings}\\
2767 \hline \bfseries Descriptor name&\bfseries Value \\ \hline
2769 \bfseries Descriptor name&\bfseries Value\\ \hline
2771 \hline \emph{Continued on next page}
2783 \section{Name Index Table}
2784 \label{datarep:nameindextable}
2785 Each name index table in the \dotdebugnames{} section
2786 begins with a header consisting of:
2787 \begin{enumerate}[1. ]
2788 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
2789 \addttindexx{unit\_length}
2790 A 4-byte or 12-byte initial length field that
2791 contains the size in bytes of this contribution to the \dotdebugnames{}
2792 section, not including the length field itself
2793 (see Section \refersec{datarep:initiallengthvalues}).
2795 \item \texttt{version} (\HFTuhalf) \\
2796 A 2-byte version number\addtoindexx{version number!name index table}
2797 (see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
2798 This number is specific to the name index table and is
2799 independent of the DWARF version number.
2801 The value in this field is \versiondotdebugnames.
2803 \item padding (\HFTuhalf) \\
2805 \item \texttt{comp\_unit\_count} (\HFTuword) \\
2806 The number of CUs in the CU list.
2808 \item \texttt{local\_type\_unit\_count} (\HFTuword) \\
2809 The number of TUs in the first TU list.
2811 \item \texttt{foreign\_type\_unit\_count} (\HFTuword) \\
2812 The number of TUs in the second TU list.
2814 \item \texttt{bucket\_count} (\HFTuword) \\
2815 The number of hash buckets in the hash lookup table.
2816 If there is no hash lookup table, this field contains 0.
2818 \item \texttt{name\_count} (\HFTuword) \\
2819 The number of unique names in the index.
2821 \item \texttt{abbrev\_table\_size} (\HFTuword) \\
2822 The size in bytes of the abbreviations table.
2824 \item \texttt{augmentation\_string\_size} (\HFTuword) \\
2825 The size in bytes of the augmentation string. This value is
2826 rounded up to a multiple of 4.
2828 \item \texttt{augmentation\_string} (\HFTaugstring) \\
2829 A vendor-specific augmentation string, which provides additional
2830 information about the contents of this index. If provided, the string
2831 begins with a 4-character vendor ID. The remainder of the
2832 string is meant to be read by a cooperating consumer, and its
2833 contents and interpretation are not specified here. The
2834 string is padded with null characters to a multiple of
2835 four bytes in length.
2839 The name index attributes and their encodings are listed in Table \referfol{datarep:indexattributeencodings}.
2842 \setlength{\extrarowheight}{0.1cm}
2843 \begin{longtable}{l|c|l}
2844 \caption{Name index attribute encodings} \label{datarep:indexattributeencodings}\\
2845 \hline \bfseries Attribute name&\bfseries Value &\bfseries Form/Class \\ \hline
2847 \bfseries Attribute name&\bfseries Value &\bfseries Form/Class \\ \hline
2849 \hline \emph{Continued on next page}
2852 \ddag \ \textit{New in \DWARFVersionV}
2854 \DWIDXcompileunit~\ddag & 1 & \CLASSconstant \\
2855 \DWIDXtypeunit~\ddag & 2 & \CLASSconstant \\
2856 \DWIDXdieoffset~\ddag & 3 & \CLASSreference \\
2857 \DWIDXparent~\ddag & 4 & \CLASSconstant \\
2858 \DWIDXtypehash~\ddag & 5 & \DWFORMdataeight \\
2859 \DWIDXlouser~\ddag & 0x2000 & \\
2860 \DWIDXhiuser~\ddag & \xiiifff & \\
2864 The abbreviations table ends with an entry consisting of a single 0
2865 byte for the abbreviation code. The size of the table given by
2866 \texttt{abbrev\_table\_size} may include optional padding following the
2869 \section{Defaulted Member Encodings}
2870 \hypertarget{datarep:defaultedmemberencodings}{}
2872 The encodings of the constants used in the \DWATdefaulted{} attribute
2873 are given in Table \referfol{datarep:defaultedattributeencodings}.
2876 \setlength{\extrarowheight}{0.1cm}
2877 \begin{longtable}{l|c}
2878 \caption{Defaulted attribute encodings} \label{datarep:defaultedattributeencodings} \\
2879 \hline \bfseries Defaulted name &\bfseries Value \\ \hline
2881 \bfseries Defaulted name &\bfseries Value \\ \hline
2883 \hline \emph{Continued on next page}
2886 \ddag~\textit{New in \DWARFVersionV}
2888 \DWDEFAULTEDno~\ddag & 0x00 \\
2889 \DWDEFAULTEDinclass~\ddag & 0x01 \\
2890 \DWDEFAULTEDoutofclass~\ddag & 0x02 \\
2895 \section{Address Range Table}
2896 \label{datarep:addrssrangetable}
2898 Each set of entries in the table of address ranges contained
2899 in the \dotdebugaranges{}
2900 section begins with a header containing:
2901 \begin{enumerate}[1. ]
2902 % FIXME The unit length text is not fully consistent across
2905 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
2906 \addttindexx{unit\_length}
2907 A 4-byte or 12-byte length containing the length of the
2908 \addtoindexx{initial length}
2909 set of entries for this compilation unit, not including the
2910 length field itself. In the \thirtytwobitdwarfformat, this is a
2911 4-byte unsigned integer (which must be less than \xfffffffzero);
2912 in the \sixtyfourbitdwarfformat, this consists of the 4-byte value
2913 \wffffffff followed by an 8-byte unsigned integer that gives
2915 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
2917 \item version (\HFTuhalf) \\
2918 A 2-byte version identifier representing the version of the
2919 DWARF information for the address range table
2920 (see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
2922 This value in this field \addtoindexx{version number!address range table} is 2.
2924 \item debug\_info\_offset (\livelink{datarep:sectionoffsetlength}{section offset}) \\
2926 \addtoindexx{section offset!in .debug\_aranges header}
2927 4-byte or 8-byte offset into the
2928 \dotdebuginfo{} section of
2929 the compilation unit header. In the \thirtytwobitdwarfformat,
2930 this is a 4-byte unsigned offset; in the \sixtyfourbitdwarfformat,
2931 this is an 8-byte unsigned offset
2932 (see Section \refersec{datarep:32bitand64bitdwarfformats}).
2934 \item \texttt{address\_size} (\HFTubyte) \\
2935 A 1-byte unsigned integer containing the size in bytes of an
2936 \addttindexx{address\_size}
2938 \addtoindexx{size of an address}
2939 (or the offset portion of an address for segmented
2940 \addtoindexx{address space!segmented}
2941 addressing) on the target system.
2943 \item \HFNsegmentselectorsize{} (\HFTubyte) \\
2944 A 1-byte unsigned integer containing the size in bytes of a
2945 segment selector on the target system.
2949 This header is followed by a series of tuples. Each tuple
2950 consists of a segment, an address and a length.
2951 The segment selector
2952 size is given by the \HFNsegmentselectorsize{} field of the header; the
2953 address and length size are each given by the \addttindex{address\_size}
2954 field of the header.
2955 The first tuple following the header in
2956 each set begins at an offset that is a multiple of the size
2957 of a single tuple (that is, the size of a segment selector
2958 plus twice the \addtoindex{size of an address}).
2959 The header is padded, if
2960 necessary, to that boundary. Each set of tuples is terminated
2961 by a 0 for the segment, a 0 for the address and 0 for the
2962 length. If the \HFNsegmentselectorsize{} field in the header is zero,
2963 the segment selectors are omitted from all tuples, including
2964 the terminating tuple.
2967 \section{Line Number Information}
2968 \label{datarep:linenumberinformation}
2970 The \addtoindexi{version number}{version number!line number information}
2971 in the line number program header is \versiondotdebugline{}
2972 (see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
2974 The boolean values \doublequote{true} and \doublequote{false}
2975 used by the line number information program are encoded
2976 as a single byte containing the value 0
2977 for \doublequote{false,} and a non-zero value for \doublequote{true.}
2980 The encodings for the standard opcodes are given in
2981 \addtoindexx{line number opcodes!standard opcode encoding}
2982 Table \refersec{tab:linenumberstandardopcodeencodings}.
2985 \setlength{\extrarowheight}{0.1cm}
2986 \begin{longtable}{l|c}
2987 \caption{Line number standard opcode encodings} \label{tab:linenumberstandardopcodeencodings}\\
2988 \hline \bfseries Opcode name&\bfseries Value \\ \hline
2990 \bfseries Opcode name&\bfseries Value\\ \hline
2992 \hline \emph{Continued on next page}
2998 \DWLNSadvancepc&0x02 \\
2999 \DWLNSadvanceline&0x03 \\
3000 \DWLNSsetfile&0x04 \\
3001 \DWLNSsetcolumn&0x05 \\
3002 \DWLNSnegatestmt&0x06 \\
3003 \DWLNSsetbasicblock&0x07 \\
3004 \DWLNSconstaddpc&0x08 \\
3005 \DWLNSfixedadvancepc&0x09 \\
3006 \DWLNSsetprologueend&0x0a \\*
3007 \DWLNSsetepiloguebegin&0x0b \\*
3008 \DWLNSsetisa&0x0c \\*
3014 The encodings for the extended opcodes are given in
3015 \addtoindexx{line number opcodes!extended opcode encoding}
3016 Table \refersec{tab:linenumberextendedopcodeencodings}.
3019 \setlength{\extrarowheight}{0.1cm}
3020 \begin{longtable}{l|c}
3021 \caption{Line number extended opcode encodings} \label{tab:linenumberextendedopcodeencodings}\\
3022 \hline \bfseries Opcode name&\bfseries Value \\ \hline
3024 \bfseries Opcode name&\bfseries Value\\ \hline
3026 \hline \emph{Continued on next page}
3028 \hline %\ddag~\textit{New in DWARF Version 5}
3031 \DWLNEendsequence &0x01 \\
3032 \DWLNEsetaddress &0x02 \\
3033 \textit{Reserved} &0x03\footnote{Code 0x03 is reserved to allow backward compatible support of the
3034 DW\_LNE\_define\_file operation which was defined in \DWARFVersionIV{}
3036 \DWLNEsetdiscriminator &0x04 \\
3037 \DWLNElouser &0x80 \\
3038 \DWLNEhiuser &\xff \\
3044 The encodings for the line number header entry formats are given in
3045 \addtoindexx{line number opcodes!file entry format encoding}
3046 Table \refersec{tab:linenumberheaderentryformatencodings}.
3049 \setlength{\extrarowheight}{0.1cm}
3050 \begin{longtable}{l|c}
3051 \caption{Line number header entry format \mbox{encodings}} \label{tab:linenumberheaderentryformatencodings}\\
3052 \hline \bfseries Line number header entry format name&\bfseries Value \\ \hline
3054 \bfseries Line number header entry format name&\bfseries Value\\ \hline
3056 \hline \emph{Continued on next page}
3058 \hline \ddag~\textit{New in DWARF Version 5}
3060 \DWLNCTpath~\ddag & 0x1 \\
3061 \DWLNCTdirectoryindex~\ddag & 0x2 \\
3062 \DWLNCTtimestamp~\ddag & 0x3 \\
3063 \DWLNCTsize~\ddag & 0x4 \\
3064 \DWLNCTMDfive~\ddag & 0x5 \\
3065 \DWLNCTlouser~\ddag & 0x2000 \\
3066 \DWLNCThiuser~\ddag & \xiiifff \\
3071 \section{Macro Information}
3072 \label{datarep:macroinformation}
3073 The \addtoindexi{version number}{version number!macro information}
3074 in the macro information header is \versiondotdebugmacro{}
3075 (see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
3077 The source line numbers and source file indices encoded in the
3078 macro information section are represented as
3079 unsigned LEB128\addtoindexx{LEB128!unsigned} numbers.
3082 The macro information entry type is encoded as a single unsigned byte.
3084 \addtoindexx{macro information entry types!encoding}
3086 Table \refersec{tab:macroinfoentrytypeencodings}.
3090 \setlength{\extrarowheight}{0.1cm}
3091 \begin{longtable}{l|c}
3092 \caption{Macro information entry type encodings} \label{tab:macroinfoentrytypeencodings}\\
3093 \hline \bfseries Macro information entry type name&\bfseries Value \\ \hline
3095 \bfseries Macro information entry type name&\bfseries Value\\ \hline
3097 \hline \emph{Continued on next page}
3099 \hline \ddag~\textit{New in DWARF Version 5}
3102 \DWMACROdefine~\ddag &0x01 \\
3103 \DWMACROundef~\ddag &0x02 \\
3104 \DWMACROstartfile~\ddag &0x03 \\
3105 \DWMACROendfile~\ddag &0x04 \\
3106 \DWMACROdefinestrp~\ddag &0x05 \\
3107 \DWMACROundefstrp~\ddag &0x06 \\
3108 \DWMACROimport~\ddag &0x07 \\
3109 \DWMACROdefinesup~\ddag &0x08 \\
3110 \DWMACROundefsup~\ddag &0x09 \\
3111 \DWMACROimportsup~\ddag &0x0a \\
3112 \DWMACROdefinestrx~\ddag &0x0b \\
3113 \DWMACROundefstrx~\ddag &0x0c \\
3114 \DWMACROlouser~\ddag &0xe0 \\
3115 \DWMACROhiuser~\ddag &\xff \\
3121 \section{Call Frame Information}
3122 \label{datarep:callframeinformation}
3124 In the \thirtytwobitdwarfformat, the value of the CIE id in the
3125 CIE header is \xffffffff; in the \sixtyfourbitdwarfformat, the
3126 value is \xffffffffffffffff.
3128 The value of the CIE \addtoindexi{version number}{version number!call frame information}
3129 is 4 (see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
3131 Call frame instructions are encoded in one or more bytes. The
3132 primary opcode is encoded in the high order two bits of
3133 the first byte (that is, opcode = byte $\gg$ 6). An operand
3134 or extended opcode may be encoded in the low order 6
3135 bits. Additional operands are encoded in subsequent bytes.
3136 The instructions and their encodings are presented in
3137 Table \refersec{tab:callframeinstructionencodings}.
3140 \setlength{\extrarowheight}{0.1cm}
3141 \begin{longtable}{l|c|c|l|l}
3142 \caption{Call frame instruction encodings} \label{tab:callframeinstructionencodings} \\
3143 \hline &\bfseries High 2 &\bfseries Low 6 & & \\
3144 \bfseries Instruction&\bfseries Bits &\bfseries Bits &\bfseries Operand 1 &\bfseries Operand 2\\ \hline
3146 & \bfseries High 2 &\bfseries Low 6 & &\\
3147 \bfseries Instruction&\bfseries Bits &\bfseries Bits &\bfseries Operand 1 &\bfseries Operand 2\\ \hline
3149 \hline \emph{Continued on next page}
3154 \DWCFAadvanceloc&0x1&delta & \\
3155 \DWCFAoffset&0x2®ister&ULEB128 offset \\
3156 \DWCFArestore&0x3®ister & & \\
3157 \DWCFAnop&0&0 & & \\
3158 \DWCFAsetloc&0&0x01&address & \\
3159 \DWCFAadvancelocone&0&0x02&1-byte delta & \\
3160 \DWCFAadvanceloctwo&0&0x03&2-byte delta & \\
3161 \DWCFAadvancelocfour&0&0x04&4-byte delta & \\
3162 \DWCFAoffsetextended&0&0x05&ULEB128 register&ULEB128 offset \\
3163 \DWCFArestoreextended&0&0x06&ULEB128 register & \\
3164 \DWCFAundefined&0&0x07&ULEB128 register & \\
3165 \DWCFAsamevalue&0&0x08 &ULEB128 register & \\
3166 \DWCFAregister&0&0x09&ULEB128 register &ULEB128 offset \\
3167 \DWCFArememberstate&0&0x0a & & \\
3168 \DWCFArestorestate&0&0x0b & & \\
3169 \DWCFAdefcfa&0&0x0c &ULEB128 register&ULEB128 offset \\
3170 \DWCFAdefcfaregister&0&0x0d&ULEB128 register & \\
3171 \DWCFAdefcfaoffset&0&0x0e &ULEB128 offset & \\
3172 \DWCFAdefcfaexpression&0&0x0f &BLOCK \\
3173 \DWCFAexpression&0&0x10&ULEB128 register & BLOCK \\
3175 \DWCFAoffsetextendedsf&0&0x11&ULEB128 register&SLEB128 offset \\
3176 \DWCFAdefcfasf&0&0x12&ULEB128 register&SLEB128 offset \\
3177 \DWCFAdefcfaoffsetsf&0&0x13&SLEB128 offset & \\
3178 \DWCFAvaloffset&0&0x14&ULEB128&ULEB128 \\
3179 \DWCFAvaloffsetsf&0&0x15&ULEB128&SLEB128 \\
3180 \DWCFAvalexpression&0&0x16&ULEB128&BLOCK \\
3181 \DWCFAlouser&0&0x1c & & \\
3182 \DWCFAhiuser&0&\xiiif & & \\
3186 \section{Non-contiguous Address Ranges}
3187 \label{datarep:noncontiguousaddressranges}
3189 Each entry in a \addtoindex{range list}
3190 (see Section \refersec{chap:noncontiguousaddressranges})
3192 \addtoindexx{base address selection entry!in range list}
3194 \addtoindexx{range list}
3195 a base address selection entry, or an end-of-list entry.
3197 A \addtoindex{range list} entry consists of two relative addresses. The
3198 addresses are the same size as addresses on the target machine.
3201 A base address selection entry and an
3202 \addtoindexx{end-of-list entry!in range list}
3203 end-of-list entry each
3204 \addtoindexx{base address selection entry!in range list}
3205 consist of two (constant or relocated) addresses. The two
3206 addresses are the same size as addresses on the target machine.
3208 For a \addtoindex{range list} to be specified, the base address of the
3209 \addtoindexx{base address selection entry!in range list}
3210 corresponding compilation unit must be defined
3211 (see Section \refersec{chap:normalandpartialcompilationunitentries}).
3214 \section{String Offsets Table}
3215 \label{chap:stringoffsetstable}
3216 Each set of entries in the string offsets table contained in the
3217 \dotdebugstroffsets{} or \dotdebugstroffsetsdwo{}
3218 section begins with a header containing:
3219 \begin{enumerate}[1. ]
3220 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
3221 \addttindexx{unit\_length}
3222 A 4-byte or 12-byte length containing the length of
3223 the set of entries for this compilation unit, not
3224 including the length field itself. In the 32-bit
3225 DWARF format, this is a 4-byte unsigned integer
3226 (which must be less than \xfffffffzero); in the 64-bit
3227 DWARF format, this consists of the 4-byte value
3228 \wffffffff followed by an 8-byte unsigned integer
3229 that gives the actual length (see
3230 Section \refersec{datarep:32bitand64bitdwarfformats}).
3233 \item \texttt{version} (\HFTuhalf) \\
3234 A 2-byte version identifier containing the value
3235 \versiondotdebugstroffsets{}
3236 (see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
3238 \item \texttt{padding} (\HFTuhalf) \\
3241 This header is followed by a series of string table offsets
3242 that have the same representation as \DWFORMstrp.
3243 For the 32-bit DWARF format, each offset is 4 bytes long; for
3244 the 64-bit DWARF format, each offset is 8 bytes long.
3246 The \DWATstroffsetsbase{} attribute points to the first
3247 entry following the header. The entries are indexed
3248 sequentially from this base entry, starting from 0.
3250 \section{Address Table}
3251 \label{chap:addresstable}
3252 Each set of entries in the address table contained in the
3253 \dotdebugaddr{} section begins with a header containing:
3254 \begin{enumerate}[1. ]
3255 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
3256 \addttindexx{unit\_length}
3257 A 4-byte or 12-byte length containing the length of
3258 the set of entries for this compilation unit, not
3259 including the length field itself. In the 32-bit
3260 DWARF format, this is a 4-byte unsigned integer
3261 (which must be less than \xfffffffzero); in the 64-bit
3262 DWARF format, this consists of the 4-byte value
3263 \wffffffff followed by an 8-byte unsigned integer
3264 that gives the actual length (see
3265 Section \refersec{datarep:32bitand64bitdwarfformats}).
3268 \item \texttt{version} (\HFTuhalf) \\
3269 A 2-byte version identifier containing the value
3270 \versiondotdebugaddr{}
3271 (see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
3274 \item \texttt{address\_size} (\HFTubyte) \\
3275 A 1-byte unsigned integer containing the size in
3276 bytes of an address (or the offset portion of an
3277 address for segmented addressing) on the target
3281 \item \HFNsegmentselectorsize{} (\HFTubyte) \\
3282 A 1-byte unsigned integer containing the size in
3283 bytes of a segment selector on the target system.
3286 This header is followed by a series of segment/address pairs.
3287 The segment size is given by the \HFNsegmentselectorsize{} field of the
3288 header, and the address size is given by the \addttindex{address\_size}
3289 field of the header. If the \HFNsegmentselectorsize{} field in the header
3290 is zero, the entries consist only of an addresses.
3292 The \DWATaddrbase{} attribute points to the first entry
3293 following the header. The entries are indexed sequentially
3294 from this base entry, starting from 0.
3297 \section{Range List Table}
3298 \label{app:rangelisttable}
3299 Each set of entries in the range list table contained in the
3300 \dotdebugranges{} section begins with a header containing:
3301 \begin{enumerate}[1. ]
3302 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
3303 \addttindexx{unit\_length}
3304 A 4-byte or 12-byte length containing the length of
3305 the set of entries for this compilation unit, not
3306 including the length field itself. In the 32-bit
3307 DWARF format, this is a 4-byte unsigned integer
3308 (which must be less than \xfffffffzero); in the 64-bit
3309 DWARF format, this consists of the 4-byte value
3310 \wffffffff followed by an 8-byte unsigned integer
3311 that gives the actual length (see
3312 Section \refersec{datarep:32bitand64bitdwarfformats}).
3315 \item \texttt{version} (\HFTuhalf) \\
3316 A 2-byte version identifier containing the value
3317 \versiondotdebugranges{}
3318 (see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
3321 \item \texttt{address\_size} (\HFTubyte) \\
3322 A 1-byte unsigned integer containing the size in
3323 bytes of an address (or the offset portion of an
3324 address for segmented addressing) on the target
3328 \item \HFNsegmentselectorsize{} (\HFTubyte) \\
3329 A 1-byte unsigned integer containing the size in
3330 bytes of a segment selector on the target system.
3333 This header is followed by a series of range list entries as
3334 described in Section \refersec{chap:noncontiguousaddressranges}.
3335 The segment size is given by the
3336 \HFNsegmentselectorsize{} field of the header, and the address size is
3337 given by the \addttindex{address\_size} field of the header. If the
3338 \HFNsegmentselectorsize{} field in the header is zero, the segment
3339 selector is omitted from the range list entries.
3341 The \DWATrangesbase{} attribute points to the first entry
3342 following the header. The entries are referenced by a byte
3343 offset relative to this base address.
3346 \section{Location List Table}
3347 \label{datarep:locationlisttable}
3348 Each set of entries in the location list table contained in the
3349 \dotdebugloc{} or \dotdebuglocdwo{} sections begins with a header containing:
3350 \begin{enumerate}[1. ]
3351 \item \texttt{unit\_length} (\livelink{datarep:initiallengthvalues}{initial length}) \\
3352 \addttindexx{unit\_length}
3353 A 4-byte or 12-byte length containing the length of
3354 the set of entries for this compilation unit, not
3355 including the length field itself. In the 32-bit
3356 DWARF format, this is a 4-byte unsigned integer
3357 (which must be less than \xfffffffzero); in the 64-bit
3358 DWARF format, this consists of the 4-byte value
3359 \wffffffff followed by an 8-byte unsigned integer
3360 that gives the actual length (see
3361 Section \refersec{datarep:32bitand64bitdwarfformats}).
3364 \item \texttt{version} (\HFTuhalf) \\
3365 A 2-byte version identifier containing the value
3366 \versiondotdebugloc{}
3367 (see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
3370 \item \texttt{address\_size} (\HFTubyte) \\
3371 A 1-byte unsigned integer containing the size in
3372 bytes of an address (or the offset portion of an
3373 address for segmented addressing) on the target
3377 \item \HFNsegmentselectorsize{} (\HFTubyte) \\
3378 A 1-byte unsigned integer containing the size in
3379 bytes of a segment selector on the target system.
3382 This header is followed by a series of location list entries as
3383 described in Section \refersec{chap:locationlists}.
3384 The segment size is given by the
3385 \HFNsegmentselectorsize{} field of the header, and the address size is
3386 given by the \HFNaddresssize{} field of the header. If the
3387 \HFNsegmentselectorsize{} field in the header is zero, the segment
3388 selector is omitted from range list entries.
3390 The entries are referenced by a byte offset relative to the first
3391 location list following this header.
3394 \section{Dependencies and Constraints}
3395 \label{datarep:dependenciesandconstraints}
3396 The debugging information in this format is intended to
3397 exist in sections of an object file, or an equivalent
3398 separate file or database, having names beginning with
3399 the prefix ".debug\_" (see Appendix
3400 \refersec{app:dwarfsectionversionnumbersinformative}
3401 for a complete list of such names).
3402 Except as specifically specified, this information is not
3403 aligned on 2-, 4- or 8-byte boundaries. Consequently:
3406 \item For the \thirtytwobitdwarfformat{} and a target architecture with
3407 32-bit addresses, an assembler or compiler must provide a way
3408 to produce 2-byte and 4-byte quantities without alignment
3409 restrictions, and the linker must be able to relocate a
3411 \addtoindexx{section offset!alignment of}
3412 section offset that occurs at an arbitrary
3415 \item For the \thirtytwobitdwarfformat{} and a target architecture with
3416 64-bit addresses, an assembler or compiler must provide a
3417 way to produce 2-byte, 4-byte and 8-byte quantities without
3418 alignment restrictions, and the linker must be able to relocate
3419 an 8-byte address or 4-byte
3420 \addtoindexx{section offset!alignment of}
3421 section offset that occurs at an
3422 arbitrary alignment.
3424 \item For the \sixtyfourbitdwarfformat{} and a target architecture with
3425 32-bit addresses, an assembler or compiler must provide a
3426 way to produce 2-byte, 4-byte and 8-byte quantities without
3427 alignment restrictions, and the linker must be able to relocate
3428 a 4-byte address or 8-byte
3429 \addtoindexx{section offset!alignment of}
3430 section offset that occurs at an
3431 arbitrary alignment.
3433 \textit{It is expected that this will be required only for very large
3434 32-bit programs or by those architectures which support
3435 a mix of 32-bit and 64-bit code and data within the same
3438 \item For the \sixtyfourbitdwarfformat{} and a target architecture with
3439 64-bit addresses, an assembler or compiler must provide a
3440 way to produce 2-byte, 4-byte and 8-byte quantities without
3441 alignment restrictions, and the linker must be able to
3442 relocate an 8-byte address or
3443 \addtoindexx{section offset!alignment of}
3444 section offset that occurs at
3445 an arbitrary alignment.
3449 \section{Integer Representation Names}
3450 \label{datarep:integerrepresentationnames}
3451 The sizes of the integers used in the lookup by name, lookup
3452 by address, line number, call frame information and other sections
3454 Table \ref{tab:integerrepresentationnames}.
3458 \setlength{\extrarowheight}{0.1cm}
3459 \begin{longtable}{c|l}
3460 \caption{Integer representation names} \label{tab:integerrepresentationnames}\\
3461 \hline \bfseries Representation name&\bfseries Representation \\ \hline
3463 \bfseries Representation name&\bfseries Representation\\ \hline
3465 \hline \emph{Continued on next page}
3470 \HFTsbyte& signed, 1-byte integer \\
3471 \HFTubyte&unsigned, 1-byte integer \\
3472 \HFTuhalf&unsigned, 2-byte integer \\
3473 \HFTuword&unsigned, 4-byte integer \\
3479 \section{Type Signature Computation}
3480 \label{datarep:typesignaturecomputation}
3482 A type signature is computed only by the DWARF producer;
3483 \addtoindexx{type signature!computation}
3484 it is used by a DWARF consumer to resolve type references to
3485 the type definitions that are contained in
3486 \addtoindexx{type unit}
3490 The type signature for a type T0 is formed from the
3491 \MDfive{}\footnote{\livetarg{def:MDfive}{MD5} Message Digest Algorithm,
3492 R.L. Rivest, RFC 1321, April 1992}
3493 hash of a flattened description of the type. The flattened
3494 description of the type is a byte sequence derived from the
3495 DWARF encoding of the type as follows:
3496 \begin{enumerate}[1. ]
3498 \item Start with an empty sequence S and a list V of visited
3499 types, where V is initialized to a list containing the type
3500 T0 as its single element. Elements in V are indexed from 1,
3503 \item If the debugging information entry represents a type that
3504 is nested inside another type or a namespace, append to S
3505 the type\textquoteright s context as follows: For each surrounding type
3506 or namespace, beginning with the outermost such construct,
3507 append the letter 'C', the DWARF tag of the construct, and
3508 the name (taken from
3509 \addtoindexx{name attribute}
3510 the \DWATname{} attribute) of the type
3511 \addtoindexx{name attribute}
3512 or namespace (including its trailing null byte).
3514 \item Append to S the letter 'D', followed by the DWARF tag of
3515 the debugging information entry.
3517 \item For each of the attributes in
3518 Table \refersec{tab:attributesusedintypesignaturecomputation}
3520 the debugging information entry, in the order listed,
3521 append to S a marker letter (see below), the DWARF attribute
3522 code, and the attribute value.
3525 \caption{Attributes used in type signature computation}
3526 \label{tab:attributesusedintypesignaturecomputation}
3527 \simplerule[\textwidth]
3529 \autocols[0pt]{c}{2}{l}{
3545 \DWATcontainingtype,
3549 \DWATdatamemberlocation,
3570 \DWATrvaluereference,
3574 \DWATstringlengthbitsize,
3575 \DWATstringlengthbytesize,
3580 \DWATvariableparameter,
3583 \DWATvtableelemlocation
3586 \simplerule[\textwidth]
3589 Note that except for the initial
3590 \DWATname{} attribute,
3591 \addtoindexx{name attribute}
3592 attributes are appended in order according to the alphabetical
3593 spelling of their identifier.
3595 If an implementation defines any vendor-specific attributes,
3596 any such attributes that are essential to the definition of
3597 the type are also included at the end of the above list,
3598 in their own alphabetical suborder.
3600 An attribute that refers to another type entry T is processed
3601 as follows: (a) If T is in the list V at some V[x], use the
3602 letter 'R' as the marker and use the unsigned LEB128\addtoindexx{LEB128!unsigned}
3603 encoding of x as the attribute value; otherwise, (b) use the letter 'T'
3604 as the marker, process the type T recursively by performing
3605 Steps 2 through 7, and use the result as the attribute value.
3607 Other attribute values use the letter 'A' as the marker, and
3608 the value consists of the form code (encoded as an unsigned
3609 LEB128 value) followed by the encoding of the value according
3610 to the form code. To ensure reproducibility of the signature,
3611 the set of forms used in the signature com