1 \chapter{Program Scope Entries}
2 \label{chap:programscopeentries}
3 This section describes debugging information entries that
4 relate to different levels of program scope: compilation,
5 module, subprogram, and so on. Except for separate type
6 entries (see Section \refersec{chap:separatetypeunitentries}),
7 these entries may be thought of
8 as bounded by ranges of text addresses within the program.
10 \section{Unit Entries}
11 An object file may contain one or more compilation units,
13 \addtoindexx{unit|see {compilation unit, partial unit \textit{or} type unit}}
14 \addtoindexx{compilation unit}
16 \addtoindexx{normal compilation unit}
17 \addtoindexx{normal compilation unit|see {compilation unit}}
18 normal compilation units,
19 partial compilation units and
20 \addtoindexx{type unit}
22 \addtoindex{partial compilation unit}
23 is related to one or more other compilation units that
25 \addtoindex{type unit} represents
26 a single complete type in a
27 separate unit. Either a normal compilation unit or a
28 \addtoindex{partial compilation unit}
29 may be logically incorporated into another
30 compilation unit using an
31 \addtoindex{imported unit entry}.
33 \subsection[Normal and Partial CU Entries]{Normal and Partial Compilation Unit Entries}
34 \label{chap:normalandpartialcompilationunitentries}
36 A \addtoindex{normal compilation unit} is represented by a debugging
37 information entry with the
38 tag \livetarg{chap:DWTAGcompileunit}{DW\_TAG\_compile\_unit}.
39 A \addtoindex{partial compilation unit} is represented by a debugging information
41 tag \livetarg{chap:DWTAGpartialunit}{DW\_TAG\_partial\_unit}.
43 In a simple normal compilation, a single compilation unit with
45 \livelink{chap:DWTAGcompileunit}{DW\_TAG\_compile\_unit} represents a complete object file
47 \livelink{chap:DWTAGpartialunit}{DW\_TAG\_partial\_unit} is not used.
49 employing the DWARF space compression and duplicate elimination
51 Appendix \refersec{app:usingcompilationunits},
52 multiple compilation units using
54 \livelink{chap:DWTAGcompileunit}{DW\_TAG\_compile\_unit} and/or
55 \livelink{chap:DWTAGpartialunit}{DW\_TAG\_partial\_unit} are
56 used to represent portions of an object file.
58 \textit{A normal compilation unit typically represents the text and
59 data contributed to an executable by a single relocatable
60 object file. It may be derived from several source files,
61 including pre\dash processed \doublequote{include files.}
62 A \addtoindex{partial compilation unit} typically represents a part of the text
63 and data of a relocatable object file, in a manner that can
64 potentially be shared with the results of other compilations
65 to save space. It may be derived from an \doublequote{include file,}
66 template instantiation, or other implementation\dash dependent
67 portion of a compilation. A normal compilation unit can also
68 function in a manner similar to a partial compilation unit
71 A compilation unit entry owns debugging information
72 entries that represent all or part of the declarations
73 made in the corresponding compilation. In the case of a
74 partial compilation unit, the containing scope of its owned
75 declarations is indicated by imported unit entries in one
76 or more other compilation unit entries that refer to that
77 partial compilation unit (see
78 Section \refersec{chap:importedunitentries}).
81 Compilation unit entries may have the following
83 \begin{enumerate}[1. ]
84 \item Either a \livelink{chap:DWATlowpc}{DW\_AT\_low\_pc} and
85 \livelink{chap:DWAThighpc}{DW\_AT\_high\_pc} pair of
86 \addtoindexx{high PC attribute}
88 \addtoindexx{low PC attribute}
90 \addtoindexx{ranges attribute}
92 \livelink{chap:DWATranges}{DW\_AT\_ranges} attribute
93 \addtoindexx{ranges attribute}
95 \addtoindexx{discontiguous address ranges|see{non-contiguous address ranges}}
98 non\dash contiguous address ranges, respectively,
99 of the machine instructions generated for the compilation
100 unit (see Section \refersec{chap:codeaddressesandranges}).
102 A \livelink{chap:DWATlowpc}{DW\_AT\_low\_pc} attribute
106 \addtoindexx{ranges attribute}
108 \livelink{chap:DWATranges}{DW\_AT\_ranges} to specify the
109 \addtoindexx{ranges attribute}
110 default base address for use in
111 \addtoindexx{location list}
112 location lists (see Section
113 \refersec{chap:locationlists}) and range lists
114 \addtoindexx{range list}
115 (see Section \refersec{chap:noncontiguousaddressranges}).
117 \item A \livelink{chap:DWATname}{DW\_AT\_name} attribute
118 \addtoindexx{name attribute}
119 whose value is a null\dash terminated
121 \hypertarget{chap:DWATnamepathnameofcompilationsource}
122 containing the full or relative path name of the primary
123 source file from which the compilation unit was derived.
125 \item A \livelink{chap:DWATlanguage}{DW\_AT\_language} attribute
126 \addtoindexx{language attribute}
127 whose constant value is an
128 \hypertarget{chap:DWATlanguageprogramminglanguage}
130 \addtoindexx{language attribute}
131 indicating the source language of the compilation
132 unit. The set of language names and their meanings are given
133 in Table \refersec{tab:languagenames}.
137 \caption{Language names}
138 \label{tab:languagenames}
141 Language name & Meaning\\ \hline
142 \livetarg{chap:DWLANGAda83}{DW\_LANG\_Ada83} \dag&ISO \addtoindex{Ada}:1983 \addtoindexx{Ada} \\
143 \livetarg{chap:DWLANGAda95}{DW\_LANG\_Ada95} \dag&ISO Ada:1995 \addtoindexx{Ada} \\
144 \livetarg{chap:DWLANGC}{DW\_LANG\_C}&Non-standardized C, such as K\&R \\
145 \livetarg{chap:DWLANGC89}{DW\_LANG\_C89}&ISO C:1989 \\
146 \livetarg{chap:DWLANGC99}{DW\_LANG\_C99} & ISO \addtoindex{C}:1999 \\
147 \livetarg{chap:DWLANGCplusplus}{DW\_LANG\_C\_plus\_plus}&ISO \addtoindex{C++}:1998 \\
148 \livetarg{chap:DWLANGCobol74}{DW\_LANG\_Cobol74}& ISO \addtoindex{Cobol}:1974 \\
149 \livetarg{chap:DWLANGCobol85}{DW\_LANG\_Cobol85} & ISO \addtoindex{Cobol}:1985 \\
150 \livetarg{chap:DWLANGD}{DW\_LANG\_D} \dag & D \addtoindexx{D language} \\
151 \livetarg{chap:DWLANGFortran77}{DW\_LANG\_Fortran77} &ISO \addtoindex{FORTRAN} 77\\
152 \livetarg{chap:DWLANGFortran90}{DW\_LANG\_Fortran90} & ISO \addtoindex{Fortran 90}\\
153 \livetarg{chap:DWLANGFortran95}{DW\_LANG\_Fortran95} & ISO \addtoindex{Fortran 95}\\
154 \livetarg{chap:DWLANGJava}{DW\_LANG\_Java} & \addtoindex{Java}\\
155 \livetarg{chap:DWLANGModula2}{DW\_LANG\_Modula2} & ISO Modula\dash 2:1996 \addtoindexx{Modula-2}\\
156 \livetarg{chap:DWLANGObjC}{DW\_LANG\_ObjC} & \addtoindex{Objective C}\\
157 \livetarg{chap:DWLANGObjCplusplus}{DW\_LANG\_ObjC\_plus\_plus} & \addtoindex{Objective C++}\\
158 \livetarg{chap:DWLANGPascal83}{DW\_LANG\_Pascal83} & ISO \addtoindex{Pascal}:1983\\
159 \livetarg{chap:DWLANGPLI}{DW\_LANG\_PLI} \dag & ANSI \addtoindex{PL/I}:1976\\
160 \livetarg{chap:DWLANGPython}{DW\_LANG\_Python} \dag & \addtoindex{Python}\\
161 \livetarg{chap:DWLANGUPC}{DW\_LANG\_UPC} &\addtoindex{Unified Parallel C}\addtoindexx{UPC}\\ \hline
162 \dag \ \ \textit{Support for these languages is limited.}& \\
166 \item A \livelink{chap:DWATstmtlist}{DW\_AT\_stmt\_list}
167 attribute whose value is
168 \addtoindexx{statement list attribute}
170 \addtoindexx{section offset!in statement list attribute}
172 \hypertarget{chap:DWATstmtlistlinenumberinformationforunit}
173 offset to the line number information for this compilation
176 This information is placed in a separate object file
177 section from the debugging information entries themselves. The
178 value of the statement list attribute is the offset in the
179 \dotdebugline{} section of the first byte of the line number
180 information for this compilation unit
181 (see Section \refersec{chap:linenumberinformation}).
184 \item A \livelink{chap:DWATmacroinfo}{DW\_AT\_macro\_info} attribute
185 \addtoindexx{macro information attribute}
187 \addtoindexx{section offset!in macro information attribute}
189 \hypertarget{chap:DWATmacroinfomacroinformation}
190 offset to the macro information for this compilation unit.
192 This information is placed in a separate object file section
193 from the debugging information entries themselves. The
194 value of the macro information attribute is the offset in
195 the \dotdebugmacinfo{} section of the first byte of the macro
196 information for this compilation unit
197 (see Section \refersec{chap:macroinformation}).
200 \livelink{chap:DWATcompdir}{DW\_AT\_comp\_dir}
202 \hypertarget{chap:DWATcompdircompilationdirectory}
204 null\dash terminated string containing the current working directory
205 of the compilation command that produced this compilation
206 unit in whatever form makes sense for the host system.
208 \item A \livelink{chap:DWATproducer}{DW\_AT\_producer} attribute
209 \addtoindexx{producer attribute}
210 whose value is a null\dash
211 terminated string containing information about the compiler
212 \hypertarget{chap:DWATproducercompileridentification}
213 that produced the compilation unit. The actual contents of
214 the string will be specific to each producer, but should
215 begin with the name of the compiler vendor or some other
216 identifying character sequence that should avoid confusion
217 with other producer values.
220 \item A \livelink{chap:DWATidentifiercase}{DW\_AT\_identifier\_case}
222 \addtoindexx{identifier case attribute}
224 \hypertarget{chap:DWATidentifiercaseidentifiercaserule}
225 constant value is a code describing the treatment
226 of identifiers within this compilation unit. The
227 set of identifier case codes is given in
228 Table \refersec{tab:identifiercasecodes}.
230 \begin{simplenametable}{Identifier case codes}{tab:identifiercasecodes}
231 \livelink{chap:DWIDcasesensitive}{DW\_ID\_case\_sensitive} \\
232 \livelink{chap:DWIDupcase}{DW\_ID\_up\_case} \\
233 \livelink{chap:DWIDdowncase}{DW\_ID\_down\_case} \\
234 \livelink{chap:DWIDcaseinsensitive}{DW\_ID\_case\_insensitive} \\
235 \end{simplenametable}
237 \livetarg{chap:DWIDcasesensitive}{DW\_ID\_case\_sensitive} is the default for all compilation units
238 that do not have this attribute. It indicates that names given
239 as the values of \livelink{chap:DWATname}{DW\_AT\_name} attributes
240 \addtoindexx{name attribute}
241 in debugging information
242 entries for the compilation unit reflect the names as they
243 appear in the source program. The debugger should be sensitive
244 to the case of identifier names when doing identifier lookups.
246 \livetarg{chap:DWIDupcase}{DW\_ID\_up\_case} means that the
247 producer of the debugging
248 information for this compilation unit converted all source
249 names to upper case. The values of the name attributes may not
250 reflect the names as they appear in the source program. The
251 debugger should convert all names to upper case when doing
254 \livetarg{chap:DWIDdowncase}{DW\_ID\_down\_case} means that
255 the producer of the debugging
256 information for this compilation unit converted all source
257 names to lower case. The values of the name attributes may not
258 reflect the names as they appear in the source program. The
259 debugger should convert all names to lower case when doing
262 \livetarg{chap:DWIDcaseinsensitive}{DW\_ID\_case\_insensitive} means that the values of the name
263 attributes reflect the names as they appear in the source
264 program but that a case insensitive lookup should be used to
268 \item A \livelink{chap:DWATbasetypes}{DW\_AT\_base\_types} attribute whose value is a
269 \livelink{chap:classreference}{reference}.
272 \hypertarget{chap:DWATbasetypesprimitivedatatypesofcompilationunit}
274 \addtoindexx{base types attribute}
275 points to a debugging information entry
276 representing another compilation unit. It may be used
277 to specify the compilation unit containing the base type
278 entries used by entries in the current compilation unit
279 (see Section \refersec{chap:basetypeentries}).
282 This attribute provides a consumer a way to find the definition
283 of base types for a compilation unit that does not itself
284 contain such definitions. This allows a consumer, for example,
285 to interpret a type conversion to a base type
286 % getting this link target at the right spot is tricky.
287 \hypertarget{chap:DWATuseUTF8compilationunitusesutf8strings}
290 \item A \livelink{chap:DWATuseUTF8}{DW\_AT\_use\_UTF8} attribute,
291 \addtoindexx{use UTF8 attribute}\addtoindexx{UTF-8}
292 which is a \livelink{chap:classflag}{flag} whose
293 presence indicates that all strings (such as the names of
294 declared entities in the source program) are represented
295 using the UTF\dash 8 representation
296 (see Section \refersec{datarep:attributeencodings}).
299 \item A \livelink{chap:DWATmainsubprogram}{DW\_AT\_main\_subprogram} attribute, which is a \livelink{chap:classflag}{flag}
300 \addtoindexx{main subprogram attribute}
301 whose presence indicates
302 \hypertarget{chap:DWATmainsubprogramunitcontainingmainorstartingsubprogram}
303 that the compilation unit contains a
304 subprogram that has been identified as the starting function
305 of the program. If more than one compilation unit contains
306 this \nolink{flag}, any one of them may contain the starting function.
308 \textit{\addtoindex{Fortran} has a \addtoindex{PROGRAM statement}
310 to specify and provide a user\dash specified name for the main
311 subroutine of a program.
312 \addtoindex{C} uses the name \doublequote{main} to identify
313 the main subprogram of a program. Some other languages provide
314 similar or other means to identify the main subprogram of
319 The base address of a compilation unit is defined as the
320 value of the \livelink{chap:DWATlowpc}{DW\_AT\_low\_pc} attribute, if present; otherwise,
321 it is undefined. If the base address is undefined, then any
322 DWARF entry or structure defined in terms of the base address
323 of that compilation unit is not valid.
326 \subsection{Imported Unit Entries}
327 \label{chap:importedunitentries}
329 \hypertarget{chap:DWATimportimportedunit}
330 place where a normal or partial unit is imported is
331 represented by a debugging information entry with the
332 \addtoindexx{imported unit entry}
333 tag \livetarg{chap:DWTAGimportedunit}{DW\_TAG\_imported\_unit}.
334 An imported unit entry contains
335 \addtoindexx{import attribute}
337 \livelink{chap:DWATimport}{DW\_AT\_import} attribute
338 whose value is a \livelink{chap:classreference}{reference} to the
339 normal or partial compilation unit whose declarations logically
340 belong at the place of the imported unit entry.
342 \textit{An imported unit entry does not necessarily correspond to
343 any entity or construct in the source program. It is merely
344 \doublequote{glue} used to relate a partial unit, or a compilation
345 unit used as a partial unit, to a place in some other
348 \subsection{Separate Type Unit Entries}
349 \label{chap:separatetypeunitentries}
350 An object file may contain any number of separate type
351 unit entries, each representing a single complete type
353 Each \addtoindex{type unit} must be uniquely identified by
354 a 64\dash bit signature, stored as part of the type unit, which
355 can be used to reference the type definition from debugging
356 information entries in other compilation units and type units.
358 A type unit is represented by a debugging information entry
359 with the tag \livetarg{chap:DWTAGtypeunit}{DW\_TAG\_type\_unit}.
360 A \addtoindex{type unit entry} owns debugging
361 information entries that represent the definition of a single
362 type, plus additional debugging information entries that may
363 be necessary to include as part of the definition of the type.
365 A type unit entry may have a
366 \livelink{chap:DWATlanguage}{DW\_AT\_language} attribute,
368 \addtoindexx{language attribute}
369 constant value is an integer code indicating the source
370 language used to define the type. The set of language names
371 and their meanings are given in Table \refersec{tab:languagenames}.
373 A \addtoindex{type unit} entry for a given type T owns a debugging
374 information entry that represents a defining declaration
375 of type T. If the type is nested within enclosing types or
376 namespaces, the debugging information entry for T is nested
377 within debugging information entries describing its containers;
378 otherwise, T is a direct child of the type unit entry.
380 A type unit entry may also own additional debugging information
381 entries that represent declarations of additional types that
382 are referenced by type T and have not themselves been placed in
383 separate type units. Like T, if an additional type U is nested
384 within enclosing types or namespaces, the debugging information
385 entry for U is nested within entries describing its containers;
386 otherwise, U is a direct child of the type unit entry.
388 The containing entries for types T and U are declarations,
389 and the outermost containing entry for any given type T or
390 U is a direct child of the type unit entry. The containing
391 entries may be shared among the additional types and between
392 T and the additional types.
394 \textit{Types are not required to be placed in type units. In general,
395 only large types such as structure, class, enumeration, and
396 union types included from header files should be considered
397 for separate type units. Base types and other small types
398 are not usually worth the overhead of placement in separate
399 type units. Types that are unlikely to be replicated, such
400 as those defined in the main source file, are also better
401 left in the main compilation unit.}
403 \section{Module, Namespace and Importing Entries}
404 \textit{Modules and namespaces provide a means to collect related
405 entities into a single entity and to manage the names of
408 \subsection{Module Entries}
409 \label{chap:moduleentries}
410 \textit{Several languages have the concept of a \doublequote{module.}
411 \addtoindexx{Modula-2}
412 A Modula\dash 2 definition module
413 \addtoindexx{Modula-2!definition module}
414 may be represented by a module
416 \addtoindex{declaration attribute}
417 (\livelink{chap:DWATdeclaration}{DW\_AT\_declaration}). A
418 \addtoindex{Fortran 90} module
419 \addtoindexx{Fortran!module (Fortran 90)}
420 may also be represented by a module entry
421 (but no declaration attribute is warranted because \addtoindex{Fortran}
422 has no concept of a corresponding module body).}
424 A module is represented by a debugging information entry
426 tag \livetarg{chap:DWTAGmodule}{DW\_TAG\_module}.
427 Module entries may own other
428 debugging information entries describing program entities
429 whose declaration scopes end at the end of the module itself.
431 If the module has a name, the module entry has a
432 \livelink{chap:DWATname}{DW\_AT\_name} attribute
433 \addtoindexx{name attribute}
434 whose value is a null\dash terminated string containing
435 the module name as it appears in the source program.
437 The \addtoindex{module entry} may have either a
438 \livelink{chap:DWATlowpc}{DW\_AT\_low\_pc} and
439 \livelink{chap:DWAThighpc}{DW\_AT\_high\_pc}
441 \addtoindexx{high PC attribute}
443 \addtoindexx{low PC attribute}
445 \livelink{chap:DWATranges}{DW\_AT\_ranges} attribute
446 \addtoindexx{ranges attribute}
447 whose values encode the contiguous or non\dash contiguous address
448 ranges, respectively, of the machine instructions generated for
449 the module initialization code
450 (see Section \refersec{chap:codeaddressesandranges}).
451 \hypertarget{chap:DWATentrypcentryaddressofmoduleinitialization}
453 \addtoindexx{entry pc attribute!for module initialization}
455 \livelink{chap:DWATentrypc}{DW\_AT\_entry\_pc} attribute whose value is the address of
456 the first executable instruction of that initialization code
457 (see Section \refersec{chap:entryaddress}).
460 \hypertarget{chap:DWATprioritymodulepriority}
461 the module has been assigned a priority, it may have
462 \addtoindexx{priority attribute}
464 \livelink{chap:DWATpriority}{DW\_AT\_priority} attribute.
465 The value of this attribute is a
466 reference to another debugging information entry describing
467 a variable with a constant value. The value of this variable
468 is the actual constant value of the module\textquoteright s priority,
469 represented as it would be on the target architecture.
471 \subsection{Namespace Entries}
472 \label{chap:namespaceentries}
473 \textit{\addtoindex{C++} has the notion of a namespace, which provides a way to
474 \addtoindexx{namespace (C++)}
475 implement name hiding, so that names of unrelated things
476 do not accidentally clash in the
477 \addtoindex{global namespace} when an
478 application is linked together.}
480 A namespace is represented by a debugging information entry
482 tag \livetarg{chap:DWTAGnamespace}{DW\_TAG\_namespace}.
483 A namespace extension is
484 \hypertarget{chap:DWATextensionpreviousnamespaceextensionororiginalnamespace}
486 \livelink{chap:DWTAGnamespace}{DW\_TAG\_namespace} entry
488 \addtoindexx{extension attribute}
490 \livelink{chap:DWATextension}{DW\_AT\_extension}
491 attribute referring to the previous extension, or if there
492 is no previous extension, to the original
493 \livelink{chap:DWTAGnamespace}{DW\_TAG\_namespace}
494 entry. A namespace extension entry does not need to duplicate
495 information in a previous extension entry of the namespace
496 nor need it duplicate information in the original namespace
497 entry. (Thus, for a namespace with a name,
498 a \livelink{chap:DWATname}{DW\_AT\_name} attribute
499 \addtoindexx{name attribute}
500 need only be attached directly to the original
501 \livelink{chap:DWTAGnamespace}{DW\_TAG\_namespace} entry.)
504 Namespace and namespace extension entries may own
505 \addtoindexx{namespace extension entry}
507 \addtoindexx{namespace declaration entry}
508 debugging information entries describing program entities
509 whose declarations occur in the namespace.
511 \textit{For \addtoindex{C++}, such
512 owned program entities may be declarations,
513 including certain declarations that are also object or
514 function definitions.}
516 If a type, variable, or function declared in a namespace is
517 defined outside of the body of the namespace declaration,
518 that type, variable, or function definition entry has a
519 \livelink{chap:DWATspecification}{DW\_AT\_specification} attribute
520 \addtoindexx{specification attribute}
521 whose value is a \livelink{chap:classreference}{reference} to the
522 debugging information entry representing the declaration of
523 the type, variable or function. Type, variable, or function
525 \livelink{chap:DWATspecification}{DW\_AT\_specification} attribute
526 \addtoindexx{specification attribute}
528 to duplicate information provided by the declaration entry
529 referenced by the specification attribute.
531 \textit{The \addtoindex{C++} \addtoindex{global namespace}
533 \addtoindexx{global namespace|see{namespace (C++), global}}
535 \addtoindexx{namespace (C++)!global}
537 \texttt{::f}, for example) is not explicitly represented in
538 DWARF with a namespace entry (thus mirroring the situation
539 in \addtoindex{C++} source).
540 Global items may be simply declared with no
541 reference to a namespace.}
543 \textit{The \addtoindex{C++}
544 compilation unit specific \doublequote{unnamed namespace} may
545 \addtoindexx{namespace (C++)!unnamed}
546 \addtoindexx{unnamed namespace|see {namespace (C++), unnamed}}
547 be represented by a namespace entry with no name attribute in
548 the original namespace declaration entry (and therefore no name
549 attribute in any namespace extension entry of this namespace).
552 \textit{A compiler emitting namespace information may choose to
553 explicitly represent namespace extensions, or to represent the
554 final namespace declaration of a compilation unit; this is a
555 quality\dash of\dash implementation issue and no specific requirements
556 are given here. If only the final namespace is represented,
557 \addtoindexx{namespace (C++)!using declaration}
558 it is impossible for a debugger to interpret using declaration
559 references in exactly the manner defined by the
560 \addtoindex{C++} language.
563 \textit{Emitting all namespace declaration information in all
564 compilation units can result in a significant increase in the
565 size of the debug information and significant duplication of
566 information across compilation units.
567 The \addtoindex{C++} namespace std,
569 \addtoindexx{namespace (C++)!std}
570 is large and will probably be referenced in
571 every \addtoindex{C++} compilation unit.
574 \textit{For a \addtoindex{C++} namespace example,
575 see Appendix \refersec{app:namespaceexample}.
580 \subsection{Imported (or Renamed) Declaration Entries}
581 \label{chap:importedorrenameddeclarationentries}
582 \textit{Some languages support the concept of importing into or making
583 accessible in a given unit declarations made in a different
584 module or scope. An imported declaration may sometimes be
589 imported declaration is represented by one or
590 \addtoindexx{imported declaration entry}
591 more debugging information entries with the
592 tag \livetarg{chap:DWTAGimporteddeclaration}{DW\_TAG\_imported\_declaration}.
594 \hypertarget{chap:DWATimportimporteddeclaration}
596 is imported, there is one imported declaration entry for
598 \addtoindexx{import attribute}
599 Each imported declaration entry has a
600 \livelink{chap:DWATimport}{DW\_AT\_import} attribute,
601 whose value is a \livelink{chap:classreference}{reference} to the
602 debugging information entry representing the declaration that
605 An imported declaration may also have a
606 \livelink{chap:DWATname}{DW\_AT\_name}
608 \addtoindexx{name attribute}
609 whose value is a null\dash terminated string containing the
610 name, as it appears in the source program, by which the
611 imported entity is to be known in the context of the imported
612 declaration entry (which may be different than the name of
613 the entity being imported). If no name is present, then the
614 name by which the entity is to be known is the same as the
615 name of the entity being imported.
617 An imported declaration entry with a name attribute may be
618 used as a general means to rename or provide an alias for
619 \addtoindexx{alias declaration|see{imported declaration entry}}
620 an entity, regardless of the context in which the importing
621 declaration or the imported entity occurs.
623 \textit{A \addtoindex{C++} namespace alias may be represented by an imported
624 \hypertarget{chap:DWATimportnamespacealias}
626 \addtoindexx{namespace (C++)!alias}
627 with a name attribute whose value is
628 a null\dash terminated string containing the alias name as it
629 appears in the source program and an import attribute whose
630 value is a \livelink{chap:classreference}{reference} to the applicable original namespace or
631 namespace extension entry.
634 \textit{A \addtoindex{C++} using declaration may be represented by one or more
635 \hypertarget{chap:DWATimportnamespaceusingdeclaration}
637 \addtoindexx{namespace (C++)!using declaration}
638 declaration entries. When the using declaration
639 refers to an overloaded function, there is one imported
640 declaration entry corresponding to each overloading. Each
641 imported declaration entry has no name attribute but it does
642 have an import attribute that refers to the entry for the
643 entity being imported. (\addtoindex{C++}
644 provides no means to \doublequote{rename}
645 an imported entity, other than a namespace).
648 \textit{A \addtoindex{Fortran} use statement
649 \addtoindexx{Fortran!use statement}
650 \addtoindexx{use statement|see {Fortran, use statement}}
651 with an \doublequote{only list} may be
652 represented by a series of imported declaration entries,
653 one (or more) for each entity that is imported. An entity
654 \addtoindexx{renamed declaration|see{imported declaration entry}}
655 that is renamed in the importing context may be represented
656 by an imported declaration entry with a name attribute that
657 specifies the new local name.
660 \subsection{Imported Module Entries}
661 \label{chap:importedmoduleentries}
663 \textit{Some languages support the concept of importing into or making
664 accessible in a given unit all of the declarations contained
665 within a separate module or namespace.
668 An imported module declaration is represented by a debugging
669 information entry with
670 \addtoindexx{imported module attribute}
672 \addtoindexx{imported module entry}
673 tag \livetarg{chap:DWTAGimportedmodule}{DW\_TAG\_imported\_module}.
675 imported module entry contains a
676 \livelink{chap:DWATimport}{DW\_AT\_import} attribute
677 \addtoindexx{import attribute}
678 whose value is a \livelink{chap:classreference}{reference}
679 to the module or namespace entry
680 containing the definition and/or declaration entries for
681 the entities that are to be imported into the context of the
682 imported module entry.
684 An imported module declaration may own a set of imported
685 declaration entries, each of which refers to an entry in the
686 module whose corresponding entity is to be known in the context
687 of the imported module declaration by a name other than its
688 name in that module. Any entity in the module that is not
689 renamed in this way is known in the context of the imported
690 module entry by the same name as it is declared in the module.
692 \textit{A \addtoindex{C++} using directive
693 \addtoindexx{namespace (C++)!using directive}
694 \addtoindexx{using directive|see {namespace (C++), using directive}}
695 may be represented by an imported module
696 \hypertarget{chap:DWATimportnamespaceusingdirective}
697 entry, with an import attribute referring to the namespace
698 entry of the appropriate extension of the namespace (which
699 might be the original namespace entry) and no owned entries.
702 \textit{A \addtoindex{Fortran} use statement
703 \addtoindexx{Fortran!use statement}
704 with a \doublequote{rename list} may be
705 represented by an imported module entry with an import
706 attribute referring to the module and owned entries
707 corresponding to those entities that are renamed as part of
711 \textit{A \addtoindex{Fortran} use statement
712 \addtoindexx{Fortran!use statement}
713 with neither a \doublequote{rename list} nor
714 an \doublequote{only list} may be represented by an imported module
715 entry with an import attribute referring to the module and
716 no owned child entries.
719 \textit{A use statement with an \doublequote{only list} is represented by a
720 series of individual imported declaration entries as described
721 in Section \refersec{chap:importedorrenameddeclarationentries}.
724 \textit{A \addtoindex{Fortran} use statement for an entity in a module that is
725 \addtoindexx{Fortran!use statement}
726 itself imported by a use statement without an explicit mention
727 may be represented by an imported declaration entry that refers
728 to the original debugging information entry. For example, given
745 \textit{the imported declaration entry for Q within module C refers
746 directly to the variable declaration entry for X in module A
747 because there is no explicit representation for X in module B.
750 \textit{A similar situation arises for a \addtoindex{C++} using declaration
751 \addtoindexx{namespace (C++)!using declaration}
752 \addtoindexx{using declaration|see {namespace (C++), using declaration}}
753 that imports an entity in terms of a namespace alias. See
754 Appendix \refersec{app:namespaceexample}
758 \section{Subroutine and Entry Point Entries}
759 \label{chap:subroutineandentrypointentries}
761 The following tags exist to describe
762 debugging information entries
763 \addtoindexx{function entry|see{subroutine entry}}
765 \addtoindexx{subroutine entry}
767 \addtoindexx{subprogram entry}
769 % FIXME: is entry point entry the right index 'entry'?
770 \addtoindexx{entry point entry}
773 \begin{tabular}{lp{9.0cm}}
774 \livetarg{chap:DWTAGsubprogram}{DW\_TAG\_subprogram} & A subroutine or function \\
775 \livelink{chap:DWTAGinlinedsubroutine}{DW\_TAG\_inlined\_subroutine} & A particular inlined
776 \addtoindexx{inlined subprogram entry}
777 instance of a subroutine or function \\
778 \livetarg{chap:DWTAGentrypoint}{DW\_TAG\_entry\_point} & An alternate entry point \\
781 \subsection{General Subroutine and Entry Point Information}
782 \label{chap:generalsubroutineandentrypointinformation}
783 The subroutine or entry point entry has a \livelink{chap:DWATname}{DW\_AT\_name}
784 attribute whose value is a null-terminated string containing the
785 subroutine or entry point name as it appears in the source program.
786 It may also have a \livelink{chap:DWATlinkagename}{DW\_AT\_linkage\_name} attribute as
787 described in Section \refersec{chap:linkagenames}.
789 If the name of the subroutine described by an entry with the
790 \addtoindexx{subprogram entry}
791 tag \livelink{chap:DWTAGsubprogram}{DW\_TAG\_subprogram}
792 is visible outside of its containing
793 \hypertarget{chap:DWATexternalexternalsubroutine}
794 compilation unit, that entry has
795 \addtoindexx{external attribute}
797 \livelink{chap:DWATexternal}{DW\_AT\_external} attribute,
798 which is a \livelink{chap:classflag}{flag}.
800 \textit{Additional attributes for functions that are members of a
801 class or structure are described in
802 Section \refersec{chap:memberfunctionentries}.
806 \hypertarget{chap:DWATmainsubprogrammainorstartingsubprogram}
809 \livelink{chap:DWATmainsubprogram}{DW\_AT\_main\_subprogram}
811 \addtoindexx{main subprogram attribute}
813 a \livelink{chap:classflag}{flag} whose presence indicates that the
814 subroutine has been identified as the starting function of
815 the program. If more than one subprogram contains this
817 any one of them may be the starting subroutine of the program.
819 \textit{\addtoindex{Fortran} has a \addtoindex{PROGRAM statement}
820 which is used to specify
821 and provide a user\dash supplied name for the main subroutine of
825 \textit{A common debugger feature is to allow the debugger user to call
826 a subroutine within the subject program. In certain cases,
827 however, the generated code for a subroutine will not obey
828 the standard calling conventions for the target architecture
829 and will therefore not be safe to call from within a debugger.
832 A subroutine entry may
833 \hypertarget{chap:DWATcallingconventionsubprogramcallingconvention}
835 \livelink{chap:DWATcallingconvention}{DW\_AT\_calling\_convention}
836 attribute, whose value is an
837 \livelink{chap:classconstant}{integer constant}. The set of
838 calling convention codes is given in
839 Table \refersec{tab:callingconventioncodes}.
841 \begin{simplenametable}[1.4in]{Calling convention codes}{tab:callingconventioncodes}
842 \addtoindex{DW\_CC\_normal} \\
843 \addtoindex{DW\_CC\_program} \\
844 \addtoindex{DW\_CC\_nocall} \\
845 \end{simplenametable}
847 If this attribute is not present, or its value is the constant
848 \livetarg{chap:DWCCnormal}{DW\_CC\_normal}, then the subroutine may be safely called by
849 obeying the \doublequote{standard} calling conventions of the target
850 architecture. If the value of the calling convention attribute
851 is the constant \livetarg{chap:DWCCnocall}{DW\_CC\_nocall}, the subroutine does not obey
852 standard calling conventions, and it may not be safe for the
853 debugger to call this subroutine.
855 If the semantics of the language of the compilation unit
856 containing the subroutine entry distinguishes between ordinary
857 subroutines and subroutines that can serve as the \doublequote{main
858 program,} that is, subroutines that cannot be called
859 directly according to the ordinary calling conventions,
860 then the debugging information entry for such a subroutine
861 may have a calling convention attribute whose value is the
862 constant \livetarg{chap:DWCCprogram}{DW\_CC\_program}.
864 \textit{The \livelink{chap:DWCCprogram}{DW\_CC\_program}
865 value is intended to support \addtoindex{Fortran} main
866 \addtoindexx{Fortran!main program}
867 programs which in some implementations may not be callable
868 or which must be invoked in a special way. It is not intended
869 as a way of finding the entry address for the program.
872 \textit{In \addtoindex{C}
873 there is a difference between the types of functions
874 declared using function prototype style declarations and
875 those declared using non\dash prototype declarations.
878 A subroutine entry declared with a function prototype style
880 \addtoindexx{prototyped attribute}
882 \livelink{chap:DWATprototyped}{DW\_AT\_prototyped} attribute, which is
883 a \livelink{chap:classflag}{flag}.
885 \textit{The \addtoindex{Fortran}
886 language allows the keywords \texttt{elemental}, \texttt{pure}
887 and \texttt{recursive} to be included as part of the declaration of
888 a subroutine; these attributes reflect that usage. These
889 attributes are not relevant for languages that do not support
890 similar keywords or syntax. In particular, the \livelink{chap:DWATrecursive}{DW\_AT\_recursive}
891 attribute is neither needed nor appropriate in languages such
893 where functions support recursion by default.
897 \hypertarget{chap:DWATelementalelementalpropertyofasubroutine}
899 \addtoindexx{elemental attribute}
901 \livelink{chap:DWATelemental}{DW\_AT\_elemental} attribute, which
902 is a \livelink{chap:classflag}{flag}.
903 The attribute indicates whether the subroutine
904 or entry point was declared with the \doublequote{elemental} keyword
908 \hypertarget{chap:DWATpurepurepropertyofasubroutine}
909 subprogram entry may have
910 \addtoindexx{pure attribute}
912 \livelink{chap:DWATpure}{DW\_AT\_pure} attribute, which is
913 a \livelink{chap:classflag}{flag}.
914 The attribute indicates whether the subroutine was
915 declared with the \doublequote{pure} keyword or property.
918 \hypertarget{chap:DWATrecursiverecursivepropertyofasubroutine}
919 subprogram entry may have a
920 \livelink{chap:DWATrecursive}{DW\_AT\_recursive} attribute, which
921 is a \livelink{chap:classflag}{flag}.
922 The attribute indicates whether the subroutine
923 or entry point was declared with the \doublequote{recursive} keyword
928 \subsection{Subroutine and Entry Point Return Types}
929 \label{chap:subroutineandentrypointreturntypes}
932 \hypertarget{chap:DWATtypetypeofsubroutinereturn}
933 the subroutine or entry point
934 \addtoindexx{return type of subroutine}
935 is a function that returns a
936 value, then its debugging information entry has
937 \addtoindexx{type attribute}
938 a \livelink{chap:DWATtype}{DW\_AT\_type} attribute
939 to denote the type returned by that function.
941 \textit{Debugging information entries for
942 \addtoindex{C} void functions should
943 not have an attribute for the return type. }
946 \subsection{Subroutine and Entry Point Locations}
947 \label{chap:subroutineandentrypointlocations}
949 A subroutine entry may have either a \livelink{chap:DWATlowpc}{DW\_AT\_low\_pc} and
950 \livelink{chap:DWAThighpc}{DW\_AT\_high\_pc} pair of attributes or a \livelink{chap:DWATranges}{DW\_AT\_ranges} attribute
951 \addtoindexx{ranges attribute}
953 \addtoindexx{high PC attribute}
955 \addtoindexx{low PC attribute}
956 encode the contiguous or non\dash contiguous address
957 ranges, respectively, of the machine instructions generated
958 for the subroutine (see
959 Section \refersec{chap:codeaddressesandranges}).
962 \hypertarget{chap:DWATentrypcentryaddressofsubprogram}
963 subroutine entry may also have
964 \addtoindexx{entry pc attribute!for subroutine}
966 \livelink{chap:DWATentrypc}{DW\_AT\_entry\_pc} attribute
967 whose value is the address of the first executable instruction
968 of the subroutine (see
969 Section \refersec{chap:entryaddress}).
971 An entry point has a \livelink{chap:DWATlowpc}{DW\_AT\_low\_pc} attribute whose value is the
972 relocated address of the first machine instruction generated
976 \livelink{chap:DWATentrypc}{DW\_AT\_entry\_pc} attribute
977 \addtoindexx{entry pc attribute!for subroutine}
979 also seem appropriate
980 for this purpose, historically the
981 \livelink{chap:DWATlowpc}{DW\_AT\_low\_pc} attribute
983 \livelink{chap:DWATentrypc}{DW\_AT\_entry\_pc} was introduced (in
984 \addtoindex{DWARF Version 3}).
985 There is insufficient reason to change this.}
991 \addtoindexx{address class!attribute}
993 \hypertarget{chap:DWATaddressclasssubroutineorsubroutinetype}
995 \livelink{chap:DWATsegment}{DW\_AT\_segment}
997 \livelink{chap:DWATaddressclass}{DW\_AT\_address\_class} attributes,
998 as appropriate, to specify
999 which segments the code for the subroutine resides in and
1000 the addressing mode to be used in calling that subroutine.
1002 A subroutine entry representing a subroutine declaration
1003 that is not also a definition does not have code address or
1007 \subsection{Declarations Owned by Subroutines and Entry Points}
1008 \label{chap:declarationsownedbysubroutinesandentrypoints}
1010 The declarations enclosed by a subroutine or entry point are
1011 represented by debugging information entries that are owned
1012 by the subroutine or entry point entry. Entries representing
1013 \addtoindexx{formal parameter}
1014 the formal parameters of the subroutine or entry point appear
1015 in the same order as the corresponding declarations in the
1019 \textit{There is no ordering requirement for entries for declarations
1020 that are children of subroutine or entry point entries but
1021 that do not represent formal parameters. The formal parameter
1022 entries may be interspersed with other entries used by formal
1023 parameter entries, such as type entries.}
1025 The unspecified parameters of a variable parameter list are
1026 represented by a debugging information entry\addtoindexx{unspecified parameters entry}
1028 \livetarg{chap:DWTAGunspecifiedparameters}{DW\_TAG\_unspecified\_parameters}.
1030 The entry for a subroutine that includes a
1031 \addtoindex{Fortran}
1032 \addtoindexx{Fortran!common block}
1033 \livelink{chap:fortrancommonblock}{common}
1034 \livelink{chap:commonblockentry}{block}
1035 \addtoindexx{common block|see{Fortran common block}}
1036 has a child entry with the
1037 tag \livetarg{chap:DWTAGcommoninclusion}{DW\_TAG\_common\_inclusion}.
1039 \hypertarget{chap:commonreferencecommonblockusage}
1040 common inclusion entry has a
1041 \livelink{chap:DWATcommonreference}{DW\_AT\_common\_reference} attribute
1042 whose value is a \livelink{chap:classreference}{reference}
1043 to the debugging information entry
1044 for the common \nolink{block} being included
1045 (see Section \refersec{chap:commonblockentries}).
1047 \subsection{Low-Level Information}
1048 \label{chap:lowlevelinformation}
1051 \hypertarget{chap:DWATreturnaddrsubroutinereturnaddresssavelocation}
1052 subroutine or entry point entry may have
1053 \addtoindexx{return address attribute}
1055 \livelink{chap:DWATreturnaddr}{DW\_AT\_return\_addr}
1056 attribute, whose value is a location description. The location
1057 calculated is the place where the return address for the
1058 subroutine or entry point is stored.
1061 \hypertarget{chap:DWATframebasesubroutineframebaseaddress}
1062 subroutine or entry point entry may also have
1063 \addtoindexx{frame base attribute}
1065 \livelink{chap:DWATframebase}{DW\_AT\_frame\_base} attribute, whose value is a location
1066 description that computes the \doublequote{frame base} for the
1067 subroutine or entry point. If the location description is
1068 a simple register location description, the given register
1069 contains the frame base address. If the location description is
1070 a DWARF expression, the result of evaluating that expression
1071 is the frame base address. Finally, for a
1072 \addtoindex{location list},
1073 this interpretation applies to each location description
1074 contained in the list of \addtoindex{location list} entries.
1076 \textit{The use of one of the \livelink{chap:DWOPreg}{DW\_OP\_reg}~\textless~n~\textgreater
1078 context is equivalent to using
1079 \livelink{chap:DWOPbreg}{DW\_OP\_breg}~\textless~n~\textgreater(0)
1081 compact. However, these are not equivalent in general.}
1084 \textit{The frame base for a procedure is typically an address fixed
1085 relative to the first unit of storage allocated for the
1086 procedure\textquoteright s stack frame. The \livelink{chap:DWATframebase}{DW\_AT\_frame\_base} attribute
1087 can be used in several ways:}
1088 \begin{enumerate}[1. ]
1089 \item \textit{In procedures that need
1090 \addtoindexx{location list}
1091 location lists to locate local
1092 variables, the \livelink{chap:DWATframebase}{DW\_AT\_frame\_base} can hold the needed location
1093 list, while all variables\textquoteright\ location descriptions can be
1094 simpler ones involving the frame base.}
1096 \item \textit{It can be used in resolving \doublequote{up\dash level} addressing
1097 within nested routines.
1098 (See also \livelink{chap:DWATstaticlink}{DW\_AT\_static\_link}, below)}
1099 %The -See also- here is ok, the DW\_AT should be
1100 %a hyperref to the def itself, which is earlier in this document.
1104 \textit{Some languages support nested subroutines. In such languages,
1105 it is possible to reference the local variables of an
1106 outer subroutine from within an inner subroutine. The
1107 \livelink{chap:DWATstaticlink}{DW\_AT\_static\_link} and \livelink{chap:DWATframebase}{DW\_AT\_frame\_base} attributes allow
1108 debuggers to support this same kind of referencing.}
1111 \hypertarget{chap:DWATstaticlinklocationofuplevelframe}
1113 \addtoindexx{address!uplevel|see {static link attribute}}
1114 \addtoindexx{uplevel address|see {static link attribute}}
1115 subroutine or entry point is nested, it may have a
1116 \livelink{chap:DWATstaticlink}{DW\_AT\_static\_link}
1117 attribute, whose value is a location
1118 description that computes the frame base of the relevant
1119 instance of the subroutine that immediately encloses the
1120 subroutine or entry point.
1122 In the context of supporting nested subroutines, the
1123 \livelink{chap:DWATframebase}{DW\_AT\_frame\_base} attribute value should obey the following
1126 \begin{enumerate}[1. ]
1127 \item It should compute a value that does not change during the
1128 life of the procedure, and
1130 \item The computed value should be unique among instances of
1131 the same subroutine. (For typical \livelink{chap:DWATframebase}{DW\_AT\_frame\_base} use, this
1132 means that a recursive subroutine\textquoteright s stack frame must have
1133 non\dash zero size.)
1136 \textit{If a debugger is attempting to resolve an up\dash level reference
1137 to a variable, it uses the nesting structure of DWARF to
1138 determine which subroutine is the lexical parent and the
1139 \livelink{chap:DWATstaticlink}{DW\_AT\_static\_link} value to identify the appropriate active
1140 frame of the parent. It can then attempt to find the reference
1141 within the context of the parent.}
1145 \subsection{Types Thrown by Exceptions}
1146 \label{chap:typesthrownbyexceptions}
1148 \textit{In \addtoindex{C++} a subroutine may declare a set of types which
1149 it may validly throw.}
1151 If a subroutine explicitly declares that it may throw
1152 \addtoindexx{exception thrown|see{thrown type entry}}
1154 \addtoindexx{thrown exception|see{thrown type entry}}
1155 exception of one or more types, each such type is
1156 represented by a debugging information entry with
1157 \addtoindexx{thrown type entry}
1159 \livetarg{chap:DWTAGthrowntype}{DW\_TAG\_thrown\_type}.
1160 Each such entry is a child of the entry
1161 representing the subroutine that may throw this type. Each
1162 thrown type entry contains
1163 \addtoindexx{type attribute}
1164 a \livelink{chap:DWATtype}{DW\_AT\_type} attribute, whose
1165 value is a \livelink{chap:classreference}{reference}
1166 to an entry describing the type of the
1167 exception that may be thrown.
1169 \subsection{Function Template Instantiations}
1170 \label{chap:functiontemplateinstantiations}
1172 \textit{In \addtoindex{C++}, a function template is a generic definition of
1173 a function that is instantiated differently for calls with
1174 values of different types. DWARF does not represent the generic
1175 template definition, but does represent each instantiation.}
1177 A \addtoindex{template instantiation} is represented by a debugging
1178 information entry with the
1179 \addtoindexx{subprogram entry!use for template instantiation}
1180 tag \livelink{chap:DWTAGsubprogram}{DW\_TAG\_subprogram}.
1182 exceptions, such an entry will contain the same attributes and
1183 will have the same types of child entries as would an entry
1184 for a subroutine defined explicitly using the instantiation
1185 types. The exceptions are:
1187 \begin{enumerate}[1. ]
1188 \item Each formal parameterized type declaration appearing in the
1189 template definition is represented by a debugging information
1191 \addtoindexx{template type parameter entry}
1192 tag \livetarg{chap:DWTAGtemplatetypeparameter}{DW\_TAG\_template\_type\_parameter}.
1194 such entry has a \livelink{chap:DWATname}{DW\_AT\_name} attribute,
1195 \addtoindexx{name attribute}
1197 null\dash terminated string containing the name of the formal
1198 type parameter as it appears in the source program. The
1199 \addtoindexx{formal type parameter|see{template type parameter entry}}
1200 template type parameter entry also has
1201 \addtoindexx{type attribute}
1202 a \livelink{chap:DWATtype}{DW\_AT\_type} attribute
1203 describing the actual type by which the formal is replaced
1204 for this instantiation.
1206 \item The subprogram entry and each of its child entries reference
1207 a template type parameter entry in any circumstance where
1208 the template definition referenced a formal parameterized type.
1210 \item If the compiler has generated a special compilation unit
1211 to hold the template instantiation and that compilation unit
1212 has a different name from the compilation unit containing
1213 the template definition, the name attribute for the debugging
1214 information entry representing that compilation unit is empty
1217 \item If the subprogram entry representing the template
1218 instantiation or any of its child entries contain declaration
1219 coordinate attributes, those attributes refer to the source
1220 for the template definition, not to any source generated
1221 artificially by the compiler for this instantiation.
1226 \subsection{Inlinable and Inlined Subroutines}
1227 A declaration or a definition of an inlinable subroutine
1228 is represented by a debugging information entry with the
1230 \livelink{chap:DWTAGsubprogram}{DW\_TAG\_subprogram}.
1232 \addtoindexx{subprogram entry!use in inlined subprogram}
1234 \hypertarget{chap:DWATinlineinlinedsubroutine}
1235 explicitly declared to be available for inline expansion or
1236 that was expanded inline implicitly by the compiler has
1237 \addtoindexx{inline attribute}
1239 \livelink{chap:DWATinline}{DW\_AT\_inline} attribute whose value is an
1240 \livelink{chap:classconstant}{integer constant}. The
1241 set of values for the \livelink{chap:DWATinline}{DW\_AT\_inline} attribute is given in
1242 Table \refersec{tab:inlinecodes}.
1246 \caption{Inline codes}
1247 \label{tab:inlinecodes}
1248 \begin{tabular}{l|p{8cm}}
1250 Name&Meaning\\ \hline
1251 \livetarg{chap:DWINLnotinlined}{DW\_INL\_not\_inlined} & Not declared inline nor inlined by the
1252 \mbox{compiler} (equivalent to the absence of the
1253 containing \livelink{chap:DWATinline}{DW\_AT\_inline} attribute) \\
1254 \livetarg{chap:DWINLinlined}{DW\_INL\_inlined} & Not declared inline but inlined by the \mbox{compiler} \\
1255 \livetarg{chap:DWINLdeclarednotinlined}{DW\_INL\_declared\_not\_inlined} & Declared inline but
1256 not inlined by the \mbox{compiler} \\
1257 \livetarg{chap:DWINLdeclaredinlined}{DW\_INL\_declared\_inlined} & Declared inline and inlined by the
1263 \textit{In \addtoindex{C++}, a function or a constructor declared with
1264 \addttindex{constexpr} is implicitly declared inline. The abstract inline
1265 instance (see below) is represented by a debugging information
1266 entry with the tag \livelink{chap:DWTAGsubprogram}{DW\_TAG\_subprogram}. Such an entry has a
1267 \livelink{chap:DWATinline}{DW\_AT\_inline} attribute whose value is \livelink{chap:DWINLinlined}{DW\_INL\_inlined}.}
1270 \subsubsection{Abstract Instances}
1271 \label{chap:abstractinstances}
1272 Any debugging information entry that is owned (either
1273 \hypertarget{chap:DWATinlineabstracttinstance}
1274 directly or indirectly) by a debugging information entry
1276 \livelink{chap:DWATinline}{DW\_AT\_inline} attribute is referred to
1277 \addtoindexx{abstract instance!entry}
1278 as an \doublequote{abstract instance entry.}
1279 Any subroutine entry
1281 \addtoindexx{inline attribute}
1282 a \livelink{chap:DWATinline}{DW\_AT\_inline} attribute whose value is other
1283 than \livelink{chap:DWINLnotinlined}{DW\_INL\_not\_inlined}
1285 \addtoindexx{abstract instance!root}
1286 an \doublequote{abstract instance root.}
1287 Any set of abstract instance entries that are all
1288 children (either directly or indirectly) of some abstract
1289 instance root, together with the root itself, is known as
1290 \addtoindexx{abstract instance!tree}
1291 an \doublequote{abstract instance tree.} However, in the case where
1292 an abstract instance tree is nested within another abstract
1293 instance tree, the entries in the
1294 \addtoindex{nested abstract instance}
1295 tree are not considered to be entries in the outer abstract
1298 Each abstract instance root is either part of a larger
1299 \addtoindexx{abstract instance!root}
1300 tree (which gives a context for the root) or
1301 \addtoindexx{specification attribute}
1303 \livelink{chap:DWATspecification}{DW\_AT\_specification}
1304 to refer to the declaration in context.
1306 \textit{For example, in \addtoindex{C++} the context might be a namespace
1307 declaration or a class declaration.}
1309 \textit{Abstract instance trees are defined so that no entry is part
1310 of more than one abstract instance tree. This simplifies the
1311 following descriptions.}
1313 A debugging information entry that is a member of an abstract
1314 instance tree should not contain any attributes which describe
1315 aspects of the subroutine which vary between distinct inlined
1316 expansions or distinct out\dash of\dash line expansions. For example,
1317 \addtoindexx{entry pc attribute!and abstract instance}
1318 the \livelink{chap:DWATlowpc}{DW\_AT\_low\_pc},
1319 \livelink{chap:DWAThighpc}{DW\_AT\_high\_pc},
1320 \livelink{chap:DWATranges}{DW\_AT\_ranges},
1321 \livelink{chap:DWATentrypc}{DW\_AT\_entry\_pc},
1322 \livelink{chap:DWATlocation}{DW\_AT\_location},
1323 \livelink{chap:DWATreturnaddr}{DW\_AT\_return\_addr},
1324 \livelink{chap:DWATstartscope}{DW\_AT\_start\_scope},
1326 \livelink{chap:DWATsegment}{DW\_AT\_segment}
1328 \addtoindexx{location attribute!and abstract instance}
1330 \addtoindexx{ranges attribute!and abstract instance}
1332 \addtoindexx{high PC attribute!and abstract instance}
1334 \addtoindexx{low PC attribute!and abstract instance}
1336 \addtoindexx{segment attribute!and abstract instance}
1338 \addtoindexx{return address attribute!and abstract instance}
1340 \addtoindexx{segment attribute!and abstract instance}
1342 \addtoindexx{start scope attribute!and abstract instance}
1346 \textit{It would not make sense normally to put these attributes into
1347 abstract instance entries since such entries do not represent
1348 actual (concrete) instances and thus do not actually exist at
1349 run\dash time. However,
1350 see Appendix \refersec{app:inlineouteronenormalinner}
1351 for a contrary example.}
1353 The rules for the relative location of entries belonging to
1354 abstract instance trees are exactly the same as for other
1355 similar types of entries that are not abstract. Specifically,
1356 the rule that requires that an entry representing a declaration
1357 be a direct child of the entry representing the scope of the
1358 declaration applies equally to both abstract and non\dash abstract
1359 entries. Also, the ordering rules for formal parameter entries,
1360 member entries, and so on, all apply regardless of whether
1361 or not a given entry is abstract.
1363 \subsubsection{Concrete Inlined Instances}
1364 \label{chap:concreteinlinedinstances}
1366 Each inline expansion of a subroutine is represented
1367 by a debugging information entry with the
1368 tag \livetarg{chap:DWTAGinlinedsubroutine}{DW\_TAG\_inlined\_subroutine}.
1369 Each such entry should be a direct
1370 child of the entry that represents the scope within which
1371 the inlining occurs.
1373 Each inlined subroutine entry may have either a
1374 \livelink{chap:DWATlowpc}{DW\_AT\_low\_pc}
1375 and \livelink{chap:DWAThighpc}{DW\_AT\_high\_pc} pair
1377 \addtoindexx{high PC attribute}
1379 \addtoindexx{low PC attribute}
1381 \addtoindexx{ranges attribute}
1383 \livelink{chap:DWATranges}{DW\_AT\_ranges}
1384 attribute whose values encode the contiguous or non\dash contiguous
1385 address ranges, respectively, of the machine instructions
1386 generated for the inlined subroutine (see
1387 Section \refersec{chap:codeaddressesandranges}).
1389 \hypertarget{chap:DWATentrypcentryaddressofinlinedsubprogram}
1390 inlined subroutine entry may
1391 \addtoindexx{inlined subprogram entry!in concrete instance}
1393 \addtoindexx{inlined subprogram entry}
1395 \addtoindexx{entry pc attribute!for inlined subprogram}
1397 \livelink{chap:DWATentrypc}{DW\_AT\_entry\_pc}
1398 attribute, representing the first executable instruction of
1399 the inline expansion (see
1400 Section \refersec{chap:entryaddress}).
1402 % Positions of the 3 targets here is a bit arbitrary.
1404 \hypertarget{chap:DWATcalllinelinenumberofinlinedsubroutinecall}
1406 \hypertarget{chap:DWATcallcolumncolumnpositionofinlinedsubroutinecall}
1408 \hypertarget{chap:DWATcallfilefilecontaininginlinedsubroutinecall}
1409 may also have \livelink{chap:DWATcallfile}{DW\_AT\_call\_file},
1410 \livelink{chap:DWATcallline}{DW\_AT\_call\_line} and \livelink{chap:DWATcallcolumn}{DW\_AT\_call\_column} attributes,
1412 value is an \livelink{chap:classconstant}{integer constant}.
1413 These attributes represent the
1414 source file, source line number, and source column number,
1415 respectively, of the first character of the statement or
1416 expression that caused the inline expansion. The call file,
1417 call line, and call column attributes are interpreted in
1418 the same way as the declaration file, declaration line, and
1419 declaration column attributes, respectively (see
1420 Section \refersec{chap:declarationcoordinates}).
1422 \textit{The call file, call line and call column coordinates do not
1423 describe the coordinates of the subroutine declaration that
1424 was inlined, rather they describe the coordinates of the call.
1427 An inlined subroutine entry
1428 \hypertarget{chap:DWATconstexprcompiletimeconstantfunction}
1430 \livelink{chap:DWATconstexpr}{DW\_AT\_const\_expr}
1431 attribute, which is a \livelink{chap:classflag}{flag}
1432 whose presence indicates that the
1433 subroutine has been evaluated as a compile\dash time constant. Such
1434 an entry may also have a \livelink{chap:DWATconstvalue}{DW\_AT\_const\_value} attribute,
1435 whose value may be of any form that is appropriate for the
1436 representation of the subroutine's return value. The value of
1437 this attribute is the actual return value of the subroutine,
1438 represented as it would be on the target architecture.
1440 \textit{In \addtoindex{C++}, if a function or a constructor declared with
1441 \addttindex{constexpr}
1442 is called with constant expressions, then the corresponding
1443 concrete inlined instance has a
1444 \livelink{chap:DWATconstexpr}{DW\_AT\_const\_expr} attribute,
1445 as well as a \livelink{chap:DWATconstvalue}{DW\_AT\_const\_value} attribute whose value represents
1446 the actual return value of the concrete inlined instance.}
1448 Any debugging information entry that is owned (either
1449 directly or indirectly) by a debugging information entry
1450 with the tag \livelink{chap:DWTAGinlinedsubroutine}{DW\_TAG\_inlined\_subroutine} is referred to as a
1451 \doublequote{concrete inlined instance entry.} Any entry that has
1453 \livelink{chap:DWTAGinlinedsubroutine}{DW\_TAG\_inlined\_subroutine}
1454 is known as a \doublequote{concrete inlined instance root.}
1455 Any set of concrete inlined instance
1456 entries that are all children (either directly or indirectly)
1457 of some concrete inlined instance root, together with the root
1458 itself, is known as a \doublequote{concrete inlined instance tree.}
1459 However, in the case where a concrete inlined instance tree
1460 is nested within another concrete instance tree, the entries
1461 in the \addtoindex{nested concrete inline instance} tree
1462 are not considered to
1463 be entries in the outer concrete instance tree.
1465 \textit{Concrete inlined instance trees are defined so that no entry
1466 is part of more than one concrete inlined instance tree. This
1467 simplifies later descriptions.}
1469 Each concrete inlined instance tree is uniquely associated
1470 with one (and only one) abstract instance tree.
1472 \textit{Note, however, that the reverse is not true. Any given abstract
1473 instance tree may be associated with several different concrete
1474 inlined instance trees, or may even be associated with zero
1475 concrete inlined instance trees.}
1477 Concrete inlined instance entries may omit attributes that
1478 are not specific to the concrete instance (but present in
1479 the abstract instance) and need include only attributes that
1480 are specific to the concrete instance (but omitted in the
1481 abstract instance). In place of these omitted attributes, each
1482 \hypertarget{chap:DWATabstractorigininlineinstance}
1483 concrete inlined instance entry
1484 \addtoindexx{abstract origin attribute}
1486 \livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin}
1487 attribute that may be used to obtain the missing information
1488 (indirectly) from the associated abstract instance entry. The
1489 value of the abstract origin attribute is a reference to the
1490 associated abstract instance entry.
1492 If an entry within a concrete inlined instance tree contains
1493 attributes describing the
1494 \addtoindexx{declaration coordinates!in concrete instance}
1495 \livelink{chap:declarationcoordinates}{declaration coordinates}
1496 of that entry, then those attributes should refer to the file, line
1497 and column of the original declaration of the subroutine,
1498 not to the point at which it was inlined. As a consequence,
1499 they may usually be omitted from any entry that has an abstract
1503 For each pair of entries that are associated via a
1504 \addtoindexx{abstract origin attribute}
1505 \livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} attribute, both members of the pair
1506 have the same tag. So, for example, an entry with the tag
1507 \livelink{chap:DWTAGvariable}{DW\_TAG\_variable} can only be associated with another entry
1508 that also has the tag \livelink{chap:DWTAGvariable}{DW\_TAG\_variable}. The only exception
1509 to this rule is that the root of a concrete instance tree
1510 (which must always have the tag \livelink{chap:DWTAGinlinedsubroutine}{DW\_TAG\_inlined\_subroutine})
1511 can only be associated with the root of its associated abstract
1512 instance tree (which must have the tag \livelink{chap:DWTAGsubprogram}{DW\_TAG\_subprogram}).
1514 In general, the structure and content of any given concrete
1515 inlined instance tree will be closely analogous to the
1516 structure and content of its associated abstract instance
1517 tree. There are a few exceptions:
1519 \begin{enumerate}[1. ]
1520 \item An entry in the concrete instance tree may be omitted if
1522 \addtoindexx{abstract origin attribute}
1523 \livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} attribute and either
1524 has no children, or its children are omitted. Such entries
1525 would provide no useful information. In C\dash like languages,
1526 such entries frequently include types, including structure,
1527 union, class, and interface types; and members of types. If any
1528 entry within a concrete inlined instance tree needs to refer
1529 to an entity declared within the scope of the relevant inlined
1530 subroutine and for which no concrete instance entry exists,
1531 the reference should refer to the abstract instance entry.
1533 \item Entries in the concrete instance tree which are associated
1534 with entries in the abstract instance tree such that neither
1535 has a \livelink{chap:DWATname}{DW\_AT\_name} attribute,
1536 \addtoindexx{name attribute}
1537 and neither is referenced by
1538 any other debugging information entry, may be omitted. This
1539 may happen for debugging information entries in the abstract
1540 instance trees that became unnecessary in the concrete instance
1541 tree because of additional information available there. For
1542 example, an anonymous variable might have been created and
1543 described in the abstract instance tree, but because of
1544 the actual parameters for a particular inlined expansion,
1545 it could be described as a constant value without the need
1546 for that separate debugging information entry.
1548 \item A concrete instance tree may contain entries which do
1549 not correspond to entries in the abstract instance tree
1550 to describe new entities that are specific to a particular
1551 inlined expansion. In that case, they will not have associated
1552 entries in the abstract instance tree, should not contain
1553 \addtoindexx{abstract origin attribute}
1554 \livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin} attributes, and must contain all their
1555 own attributes directly. This allows an abstract instance tree
1556 to omit debugging information entries for anonymous entities
1557 that are unlikely to be needed in most inlined expansions. In
1558 any expansion which deviates from that expectation, the
1559 entries can be described in its concrete inlined instance tree.
1563 \subsubsection{Out-of-Line Instances of Inlined Subroutines}
1564 \label{chap:outoflineinstancesofinlinedsubroutines}
1565 Under some conditions, compilers may need to generate concrete
1566 executable instances of inlined subroutines other than at
1567 points where those subroutines are actually called. Such
1568 concrete instances of inlined subroutines are referred to as
1569 \doublequote{concrete out\dash of\dash line instances.}
1571 \textit{In \addtoindex{C++}, for example,
1572 taking the address of a function declared
1573 to be inline can necessitate the generation of a concrete
1574 out\dash of\dash line instance of the given function.}
1576 The DWARF representation of a concrete out\dash of\dash line instance
1577 of an inlined subroutine is essentially the same as for a
1578 concrete inlined instance of that subroutine (as described in
1579 the preceding section). The representation of such a concrete
1580 % It is critical that the hypertarget and livelink be
1581 % separated to avoid problems with latex.
1582 out\dash of\dash line
1583 \addtoindexx{abstract origin attribute}
1585 \hypertarget{chap:DWATabstractoriginoutoflineinstance}
1587 \livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin}
1588 attributes in exactly the same way as they are used for
1589 a concrete inlined instance (that is, as references to
1590 corresponding entries within the associated abstract instance
1593 The differences between the DWARF representation of a
1594 concrete out\dash of\dash line instance of a given subroutine and the
1595 representation of a concrete inlined instance of that same
1596 subroutine are as follows:
1598 \begin{enumerate}[1. ]
1599 \item The root entry for a concrete out\dash of\dash line instance
1600 of a given inlined subroutine has the same tag as does its
1601 associated (abstract) inlined subroutine entry (that is, tag
1602 \livelink{chap:DWTAGsubprogram}{DW\_TAG\_subprogram} rather than \livelink{chap:DWTAGinlinedsubroutine}{DW\_TAG\_inlined\_subroutine}).
1604 \item The root entry for a concrete out\dash of\dash line instance tree
1605 is normally owned by the same parent entry that also owns
1606 the root entry of the associated abstract instance. However,
1607 it is not required that the abstract and out\dash of\dash line instance
1608 trees be owned by the same parent entry.
1612 \subsubsection{Nested Inlined Subroutines}
1613 \label{nestedinlinedsubroutines}
1614 Some languages and compilers may permit the logical nesting of
1615 a subroutine within another subroutine, and may permit either
1616 the outer or the nested subroutine, or both, to be inlined.
1618 For a non\dash inlined subroutine nested within an inlined
1619 subroutine, the nested subroutine is described normally in
1620 both the abstract and concrete inlined instance trees for
1621 the outer subroutine. All rules pertaining to the abstract
1622 and concrete instance trees for the outer subroutine apply
1623 also to the abstract and concrete instance entries for the
1627 For an inlined subroutine nested within another inlined
1628 subroutine, the following rules apply to their abstract and
1629 \addtoindexx{abstract instance!nested}
1630 \addtoindexx{concrete instance!nested}
1631 concrete instance trees:
1633 \begin{enumerate}[1. ]
1634 \item The abstract instance tree for the nested subroutine is
1635 described within the abstract instance tree for the outer
1636 subroutine according to the rules in
1637 Section \refersec{chap:abstractinstances}, and
1638 without regard to the fact that it is within an outer abstract
1641 \item Any abstract instance tree for a nested subroutine is
1642 always omitted within the concrete instance tree for an
1645 \item A concrete instance tree for a nested subroutine is
1646 always omitted within the abstract instance tree for an
1649 \item The concrete instance tree for any inlined or
1650 \addtoindexx{out-of-line instance}
1652 \addtoindexx{out-of-line-instance|see{concrete out-of-line-instance}}
1653 expansion of the nested subroutine is described within a
1654 concrete instance tree for the outer subroutine according
1656 Sections \refersec{chap:concreteinlinedinstances} or
1657 \refersec{chap:outoflineinstancesofinlinedsubroutines}
1659 and without regard to the fact that it is within an outer
1660 concrete instance tree.
1663 See Appendix \refersec{app:inliningexamples}
1664 for discussion and examples.
1666 \subsection{Trampolines}
1667 \label{chap:trampolines}
1669 \textit{A trampoline is a compiler\dash generated subroutine that serves as
1670 \hypertarget{chap:DWATtrampolinetargetsubroutine}
1671 an intermediary in making a call to another subroutine. It may
1672 adjust parameters and/or the result (if any) as appropriate
1673 to the combined calling and called execution contexts.}
1675 A trampoline is represented by a debugging information entry
1676 \addtoindexx{trampoline (subprogam) entry}
1677 with the tag \livelink{chap:DWTAGsubprogram}{DW\_TAG\_subprogram} or \livelink{chap:DWTAGinlinedsubroutine}{DW\_TAG\_inlined\_subroutine}
1679 \addtoindexx{trampoline attribute}
1680 a \livelink{chap:DWATtrampoline}{DW\_AT\_trampoline} attribute.
1682 attribute indicates the target subroutine of the trampoline,
1683 that is, the subroutine to which the trampoline passes
1684 control. (A trampoline entry may but need not also have a
1685 \livelink{chap:DWATartificial}{DW\_AT\_artificial} attribute.)
1688 The value of the trampoline attribute may be represented
1689 using any of the following forms, which are listed in order
1693 \item If the value is of class reference, then the value
1694 specifies the debugging information entry of the target
1697 \item If the value is of class address, then the value is
1698 the relocated address of the target subprogram.
1700 \item If the value is of class string, then the value is the
1701 (possibly mangled) \addtoindexx{mangled names}
1702 name of the target subprogram.
1704 \item If the value is of class \livelink{chap:classflag}{flag}, then the value true
1705 indicates that the containing subroutine is a trampoline but
1706 that the target subroutine is not known.
1710 The target subprogram may itself be a trampoline. (A sequence
1711 of trampolines necessarily ends with a non\dash trampoline
1714 \textit{In \addtoindex{C++}, trampolines may be used
1715 to implement derived virtual
1716 member functions; such trampolines typically adjust the
1717 \addtoindexx{this parameter}
1718 implicit this pointer parameter in the course of passing
1720 Other languages and environments may use trampolines
1721 in a manner sometimes known as transfer functions or transfer
1724 \textit{Trampolines may sometimes pass control to the target
1725 subprogram using a branch or jump instruction instead of a
1726 call instruction, thereby leaving no trace of their existence
1727 in the subsequent execution context. }
1729 \textit{This attribute helps make it feasible for a debugger to arrange
1730 that stepping into a trampoline or setting a breakpoint in
1731 a trampoline will result in stepping into or setting the
1732 breakpoint in the target subroutine instead. This helps to
1733 hide the compiler generated subprogram from the user. }
1735 \textit{If the target subroutine is not known, a debugger may choose
1736 to repeatedly step until control arrives in a new subroutine
1737 which can be assumed to be the target subroutine. }
1741 \section{Lexical Block Entries}
1742 \label{chap:lexicalblockentries}
1745 lexical \livetargi{chap:lexicalblock}{block}{lexical block}
1747 \addtoindexx{lexical block}
1748 a bracketed sequence of source statements
1749 that may contain any number of declarations. In some languages
1750 (including \addtoindex{C} and \addtoindex{C++}),
1751 \nolink{blocks} can be nested within other
1752 \nolink{blocks} to any depth.}
1754 % We do not need to link to the preceding paragraph.
1755 A lexical \nolink{block} is represented by a debugging information
1757 tag \livetarg{chap:DWTAGlexicalblock}{DW\_TAG\_lexical\_block}.
1759 The lexical \livetargi{chap:lexicalblockentry}{block}{lexical block entry}
1761 either a \livelink{chap:DWATlowpc}{DW\_AT\_low\_pc} and
1762 \livelink{chap:DWAThighpc}{DW\_AT\_high\_pc} pair of
1764 \addtoindexx{high PC attribute}
1766 \addtoindexx{low PC attribute}
1768 \livelink{chap:DWATranges}{DW\_AT\_ranges} attribute
1769 \addtoindexx{ranges attribute}
1770 whose values encode the contiguous or non-contiguous address
1771 ranges, respectively, of the machine instructions generated
1772 for the lexical \nolink{block}
1773 (see Section \refersec{chap:codeaddressesandranges}).
1775 If a name has been given to the
1776 lexical \nolink{block}
1778 program, then the corresponding
1779 lexical \nolink{block} entry has a
1780 \livelink{chap:DWATname}{DW\_AT\_name} attribute whose
1781 \addtoindexx{name attribute}
1782 value is a null\dash terminated string
1783 containing the name of the lexical \nolink{block}
1787 \textit{This is not the same as a \addtoindex{C} or
1788 \addtoindex{C++} label (see below).}
1790 The lexical \nolink{block} entry owns
1791 debugging information entries that
1792 describe the declarations within that lexical \nolink{block}.
1794 one such debugging information entry for each local declaration
1795 of an identifier or inner lexical \nolink{block}.
1797 \section{Label Entries}
1798 \label{chap:labelentries}
1799 \textit{A label is a way of identifying a source statement. A labeled
1800 statement is usually the target of one or more \doublequote{go to}
1804 A label is represented by a debugging information entry with
1805 \addtoindexx{label entry}
1807 tag \livetarg{chap:DWTAGlabel}{DW\_TAG\_label}.
1808 The entry for a label should be owned by
1809 the debugging information entry representing the scope within
1810 which the name of the label could be legally referenced within
1813 The label entry has a \livelink{chap:DWATlowpc}{DW\_AT\_low\_pc} attribute whose value
1814 is the relocated address of the first machine instruction
1815 generated for the statement identified by the label in
1816 the source program. The label entry also has a
1817 \livelink{chap:DWATname}{DW\_AT\_name} attribute
1818 \addtoindexx{name attribute}
1819 whose value is a null-terminated string containing
1820 the name of the label as it appears in the source program.
1823 \section{With Statement Entries}
1824 \label{chap:withstatemententries}
1826 \textit{Both \addtoindex{Pascal} and
1827 \addtoindexx{Modula-2}
1828 Modula\dash 2 support the concept of a \doublequote{with}
1829 statement. The with statement specifies a sequence of
1830 executable statements within which the fields of a record
1831 variable may be referenced, unqualified by the name of the
1834 A with statement is represented by a
1835 \addtoindexi{debugging information entry}{with statement entry}
1836 with the tag \livetarg{chap:DWTAGwithstmt}{DW\_TAG\_with\_stmt}.
1838 A with statement entry may have either a
1839 \livelink{chap:DWATlowpc}{DW\_AT\_low\_pc} and
1840 \livelink{chap:DWAThighpc}{DW\_AT\_high\_pc} pair of attributes
1841 \addtoindexx{high PC attribute}
1843 \addtoindexx{low PC attribute}
1844 a \livelink{chap:DWATranges}{DW\_AT\_ranges} attribute
1845 \addtoindexx{ranges attribute}
1846 whose values encode the contiguous or non\dash contiguous address
1847 ranges, respectively, of the machine instructions generated
1848 for the with statement
1849 (see Section \refersec{chap:codeaddressesandranges}).
1851 The with statement entry has
1852 \addtoindexx{type attribute}
1853 a \livelink{chap:DWATtype}{DW\_AT\_type} attribute, denoting
1854 the type of record whose fields may be referenced without full
1855 qualification within the body of the statement. It also has
1856 \addtoindexx{location attribute}
1857 a \livelink{chap:DWATlocation}{DW\_AT\_location} attribute, describing how to find the base
1858 address of the record object referenced within the body of
1861 \section{Try and Catch Block Entries}
1862 \label{chap:tryandcatchblockentries}
1864 \textit{In \addtoindex{C++} a lexical \livelink{chap:lexicalblock}{block} may be
1865 designated as a \doublequote{catch \nolink{block}.}
1866 A catch \livetargi{chap:catchblock}{block}{catch block} is an
1867 exception handler that handles
1868 exceptions thrown by an immediately
1869 preceding \doublequote{try \livelink{chap:tryblock}{block}.}
1870 A catch \livelink{chap:catchblock}{block}
1871 designates the type of the exception that it
1874 A try \livetargi{chap:tryblock}{block}{try block} is represented
1875 by a debugging information entry
1876 \addtoindexx{try block entry}
1877 with the tag \livetarg{chap:DWTAGtryblock}{DW\_TAG\_try\_block}.
1878 A catch \livelink{chap:catchblock}{block} is represented by
1879 a debugging information entry with
1880 \addtoindexx{catch block entry}
1881 the tag \livetarg{chap:DWTAGcatchblock}{DW\_TAG\_catch\_block}.
1883 % nolink as we have links just above and do not have a combo link for both
1884 Both try and catch \nolink{block} entries may have either a
1885 \livelink{chap:DWATlowpc}{DW\_AT\_low\_pc} and
1886 \livelink{chap:DWAThighpc}{DW\_AT\_high\_pc} pair of attributes
1887 \addtoindexx{high PC attribute}
1889 \addtoindexx{low PC attribute}
1891 \livelink{chap:DWATranges}{DW\_AT\_ranges} attribute
1892 \addtoindexx{ranges attribute}
1893 whose values encode the contiguous
1894 or non\dash contiguous address ranges, respectively, of the
1895 machine instructions generated for the \livelink{chap:lexicalblock}{block}
1897 \refersec{chap:codeaddressesandranges}).
1899 Catch \livelink{chap:catchblock}{block} entries have at
1900 least one child entry, an
1901 entry representing the type of exception accepted by
1902 that catch \livelink{chap:catchblock}{block}.
1903 This child entry has one of
1904 \addtoindexx{formal parameter entry!in catch block}
1906 \addtoindexx{unspecified parameters entry!in catch block}
1908 \livelink{chap:DWTAGformalparameter}{DW\_TAG\_formal\_parameter} or
1909 \livelink{chap:DWTAGunspecifiedparameters}{DW\_TAG\_unspecified\_parameters},
1910 and will have the same form as other parameter entries.
1912 The siblings immediately following
1913 a try \livelink{chap:tryblock}{block} entry are its
1914 corresponding catch \livelink{chap:catchblock}{block} entries.