\begin{longtable}{ll}
\textbf{Date} & \textbf{Issue Incorporated or Other Change} \\ \hline \\
\endhead
+10/10-11/20/2016& Miscellaneous editorial tweaks during public review \\
10/6/2016 & Prepare Public Review Draft, delete bullet 7 in 7.4, other tweaks. \\
9/13/2016 & Final edits for committee vote \\
9/4/2016 & Further Appendix F cleanups \\
\begin{figure}[ht]
\textit{File wa.h}
-\begin{lstlisting}[numbers=none]
+\begin{nlnlisting}
struct A {
int i;
};
-\end{lstlisting}
+\end{nlnlisting}
\textit{File wa.c}
-\begin{lstlisting}[numbers=none]
+\begin{nlnlisting}
#include "wa.h";
int
f(A &a)
{
return a.i + 2;
}
-\end{lstlisting}
+\end{nlnlisting}
\caption{Duplicate elimination example \#1: C++ Source}
\label{fig:duplicateeliminationexample1csource}
\end{figure}
\begin{figure}[ht]
\textit{File CommonStuff.f\hspace{1pt}h}
\addtoindexx{Fortran}
-\begin{lstlisting}[numbers=none]
+\begin{nlnlisting}
IMPLICIT INTEGER(A-Z)
COMMON /Common1/ C(100)
PARAMETER(SEVEN = 7)
-\end{lstlisting}
+\end{nlnlisting}
\textit{File Func.f}
-\begin{lstlisting}[numbers=none]
+\begin{nlnlisting}
FUNCTION FOO (N)
INCLUDE 'CommonStuff.fh'
FOO = C(N + SEVEN)
RETURN
END
-\end{lstlisting}
+\end{nlnlisting}
\caption{Duplicate elimination example \#2: Fortran source}
\label{fig:duplicateeliminationexample2fortransource}
\end{figure}
\begin{figure}
\textit{File Main.f}
-\begin{lstlisting}[numbers=none]
+\begin{nlnlisting}
INCLUDE 'CommonStuff.fh'
C(50) = 8
PRINT *, 'Result = ', FOO(50 - SEVEN)
END
-\end{lstlisting}
+\end{nlnlisting}
\caption{Duplicate elimination example \#2: companion source }
\label{fig:duplicateeliminationexample2companionsource}
\end{figure}
in Figure \refersec{fig:typesignatureexamplescsource}.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
namespace N {
struct B;
struct C c;
};
}
-\end{lstlisting}
+\end{nlnlisting}
\caption{Type signature examples: C++ source}
\label{fig:typesignatureexamplescsource}
\end{figure}
are 4-byte unsigned integer values; in the 64-bit DWARF format,
they are 8-byte unsigned integer values.
+\begin{nolinenumbersenv}
\begin{center}
\begin{tabular}{lll}
Section &Name & Role \\ \hline
& or local TUs & \\
\end{tabular}
\end{center}
+\end{nolinenumbersenv}
\needlines{4}
The \texttt{CIE\_id} field in a CIE structure must be 64 bits because
of DWARF format as follows. For the 32-bit DWARF format,
the value is a 4-byte unsigned integer; for the 64-bit DWARF
format, the value is an 8-byte unsigned integer.
+
\begin{center}
+\begin{nolinenumbersenv}
\begin{tabular}{lp{6cm}}
Form & Role \\ \hline
\DWFORMlinestrp & offset in \dotdebuglinestr \\
\DWFORMstrpsup & offset in \dotdebugstr{} section of a \mbox{supplementary} object file \\
\DWOPcallref & offset in \dotdebuginfo{} \\
\end{tabular}
+\end{nolinenumbersenv}
\end{center}
\needlines{5}
description depend on the choice of DWARF format as follows: for the
32-bit DWARF format, the value is a 4-byte unsigned integer; for the
64-bit DWARF format, the value is a 8-byte unsigned integer.
+
\begin{center}
+\begin{nolinenumbersenv}
\begin{tabular}{lp{6cm}}
Form & Role \\ \hline
\DWFORMlinestrp & offset in \dotdebuglinestr
\end{tabular}
+\end{nolinenumbersenv}
\end{center}
\item Within the body of the \dotdebugnames{}
that location is then added to the base to determine the location of
the target range list of entries.
\item
-An offset into the \dotdebugloclists{} section (\DWFORMsecoffset).
+\bb
+An offset into the \dotdebugrnglists{} section (\DWFORMsecoffset).
The operand consists of a byte
-offset\addtoindexx{section offset!in class loclist value}
-from the beginning of the \dotdebugloclists{} section.
+offset\addtoindexx{section offset!in class rnglist value}
+\eb
+from the beginning of the \dotdebugrnglists{} section.
It is relocatable in a relocatable object file, and
relocated in an executable or shared object file. In the
\thirtytwobitdwarfformat, this offset is a 4-byte unsigned value;
section of a \addtoindex{supplementary object file}
refer to the local \dotdebugstr{} section of that same file.
In the \thirtytwobitdwarfformat, the representation of a
-\DWFORMstrpNAME{}, \DWFORMstrpNAME{} or \DWFORMstrpsupNAME{}
+\DWFORMstrpNAME{},
+\bb
+\DWFORMlinestrpNAME{}
+\eb
+or \DWFORMstrpsupNAME{}
value is a 4-byte unsigned offset; in the \sixtyfourbitdwarfformat,
it is an 8-byte unsigned offset
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
Immediately following the header is an array of offsets.
This array is followed by a series of range lists.
-
-There is one offset for each range list. The contents
-of the $i$\textsuperscript{th} offset is the offset from the
+
+There is one offset for each range list.
+The contents
+of the $i$\textsuperscript{th} offset is the offset
+\bb
+(an unsigned integer)
+\eb
+from the
beginning of the offset array to the location of the
-$i$\textsuperscript{th} range list. Range lists are
+$i$\textsuperscript{th} range list.
+\bb
+In the 32-bit DWARF format, each offset is 4-bytes in size;
+in the 64-bit DWARF format, each offset is 8-bytes in size
+(see Section \refersec{datarep:32bitand64bitdwarfformats}).
+\eb
+
+Range lists are
described in Section \refersec{chap:noncontiguousaddressranges}.
The segment size is given by the
This array is followed by a series of location lists.
There is one offset for each location list. The contents
-of the $i$\textsuperscript{th} offset is the offset from the
+of the $i$\textsuperscript{th} offset is the offset
+\bb
+(an unsigned integer)
+\eb
+from the
beginning of the offset array to the location of the
-$i$\textsuperscript{th} location list. Location lists are
+$i$\textsuperscript{th} location list.
+\bb
+In the 32-bit DWARF format, each offset is 4-bytes in size;
+in the 64-bit DWARF format, each offset is 8-bytes in size
+(see Section \refersec{datarep:32bitand64bitdwarfformats}).
+\eb
+
+
+Location lists are
described in Section \refersec{chap:locationlists}.
The segment size is given by the
\hrefself{http://stackoverflow.com/questions/10696223/reason-for-5381-number-in-djb-hash-function)}.}
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
uint32_t /* must be a 32-bit integer type */
hash(unsigned char *str)
return hash;
}
-\end{lstlisting}
+\end{nlnlisting}
\caption{Name Table Hash Function Definition}
\label{fig:nametablehashfunctiondefinition}
\end{figure}
%j
\itembfnl{(j) \dotdebuginfo{} to \dotdebugloclists}
An attribute value of class \CLASSloclist{}
-(specifically form \DWFORMloclistx or \DWFORMsecoffset)
+(specifically form \DWFORMloclistx{} or \DWFORMsecoffset)
is an index or offset within the \dotdebugloclists{}
section of a \addtoindex{location list}.
\itembfnl{(jo) \dotdebuginfodwo{} to \dotdebugloclistsdwo}
An attribute value of class
-\CLASSloclist{} (specifically with form \DWFORMloclistx
+\CLASSloclist{} (specifically with form \DWFORMloclistx{}
or \DWFORMsecoffset)
is an index or offset within the \dotdebugloclistsdwo{}
section of a \addtoindex{location list.}
% If draft is in the document class list, pix are just suggested
% by an outline, the pic does not appear as a picture.
%
-\newcommand{\docdate}{October 6, 2016}
+\newcommand{\docdate}{November 20, 2016}
%
\usepackage{ifthen}
\newcommand{\ifthen}[2]{\ifthenelse{#1}{#2}{}}
\newboolean{isdraft}\setboolean{isdraft}{true}
- \newboolean{uselinenos}\setboolean{uselinenos}{false}
+ \newboolean{uselinenumbers}\setboolean{uselinenumbers}{true}
\newboolean{usechangesummary}\setboolean{usechangesummary}{false}
-\newcommand{\draftmark}{\ifthenelse{\boolean{isdraft}}{*** PUBLIC REVIEW DRAFT ***}{}}
+\newcommand{\draftmark}{\ifthenelse{\boolean{isdraft}}{*** PRE-PUBLIC RELEASE DRAFT ***}{}}
%
\usepackage[T1]{fontenc}
\usepackage{palatino}
\usepackage{graphicx} % For pictures
\usepackage{epstopdf} % Autoconvert .eps to .pdf
\epstopdfsetup{suffix=-generated} % Mark generaed PDF as such
-\usepackage{lineno} % line numbers
+\usepackage[pagewise]{lineno} % line numbers
+ \pagewiselinenumbers
+ \setlength\linenumbersep{3em}
+ \renewcommand\linenumberfont{\normalfont\itshape\tiny}
+ \nolinenumbers
\usepackage{longtable} % For multipage tables
\usepackage{hhline} % Single column horizontal lines
\usepackage{varioref} % defines \vref
pdftitle={\dwf\ Version 5}
}
-% An environment to create a listing-like (boxed) presentation for DWARF examples
-% Use like \begin{lstlisting}...\end{lstlisting}. Does not do line numbers (boo)
-% but does full LaTex processing within its scope (unlike \verb).
+% An environment to create a listing-like (boxed) presentation for
+% DWARF examples Use like \begin{nlnlisting}...\end{nlnlisting}.
+% Does not do line numbers but does full LaTex processing within its
+% scope (unlike \verb).
\newsavebox{\savedwf}
-\newenvironment{dwflisting}{\begin{lrbox}{\savedwf}
- \begin{minipage}{\textwidth}\footnotesize}
- {\end{minipage}\end{lrbox}\fbox{\usebox{\savedwf}}}
+\newenvironment{dwflisting}
+ {\nolinenumbers\begin{lrbox}{\savedwf}\begin{minipage}{\textwidth}\footnotesize}
+ {\end{minipage}\end{lrbox}\fbox{\usebox{\savedwf}}
+ \condlinenumbers}
+
+% Conditionally turn on line numbers
+\newcommand{\condlinenumbers}{\ifthen{\boolean{uselinenumbers}}{\linenumbers}}
+
+% An environment that turns off line numbers then conditionally turns
+% them back on at the end
+\newenvironment{nolinenumbersenv}
+ {\nolinenumbers}
+ {\par\condlinenumbers}
+
+% An environment like lstlisting that is wrapped to prevent the
+% contents of the listing from having line numbers generated by
+% the lineno package
+\lstnewenvironment{nlnlisting} % listing-specific newenvironment command
+ {\nolinenumbers}
+ {\condlinenumbers}
+
% A helper to annotate the parts of a multipage figure
\newcommand{\figurepart}[2]{\raggedleft{\textit{\tiny{part #1 of #2}}}}
% Complement of \isundefined
\newcommand{\isdefined}[1]{\not{\isundefined{#1}}}
-\newcommand{\uselinenos}{\ifthen{\boolean{uselinenos}}{\linenumbers*}}
-
% Preferred changebar aliases
\newcommand{\bb}{\cbstart} % Begin (change) bar
\newcommand{\eb}{\cbend} % End (change) bar
% Define the levels of sectionality that are numbered.
\setcounter{secnumdepth}{5}
-\uselinenos\include{introduction} \emptypage
-\uselinenos\include{generaldescription} %\emptypage
-\uselinenos\include{programscope} \emptypage
-\uselinenos\include{dataobject} \emptypage
-\uselinenos\include{typeentries} \emptypage
-\uselinenos\include{otherdebugginginformation} %\emptypage
-\uselinenos\include{datarepresentation} %\emptypage
+\condlinenumbers\include{introduction} \emptypage
+\condlinenumbers\include{generaldescription} %\emptypage
+\condlinenumbers\include{programscope} \emptypage
+\condlinenumbers\include{dataobject} \emptypage
+\condlinenumbers\include{typeentries} \emptypage
+\condlinenumbers\include{otherdebugginginformation} %\emptypage
+\condlinenumbers\include{datarepresentation} %\emptypage
% The \appendix command toggles us into appendix chapters
\appendix
-\uselinenos\include{attributesbytag} %\emptypage
-\uselinenos\include{debugsectionrelationships} \emptypage
-\uselinenos\include{encodingdecoding} \emptypage
-\uselinenos\include{examples} %\emptypage
-\uselinenos\include{compression} \emptypage
-\uselinenos\include{splitobjects} \emptypage
-\uselinenos\include{sectionversionnumbers} \emptypage
+\condlinenumbers\include{attributesbytag} %\emptypage
+\condlinenumbers\include{debugsectionrelationships} \emptypage
+\condlinenumbers\include{encodingdecoding} \emptypage
+\condlinenumbers\include{examples} %\emptypage
+\condlinenumbers\include{compression} \emptypage
+\condlinenumbers\include{splitobjects} \emptypage
+\condlinenumbers\include{sectionversionnumbers} \emptypage
\nolinenumbers
\include{gnulicense} \emptypage
% Maybe someday the selected glossary concept will be of interest...
\vspace{2cm}
\begin{figure}[hb]
-\begin{lstlisting}
+\begin{nlnlisting}
do
{
byte = low order 7 bits of value;
set high order bit of byte;
emit byte;
} while (value != 0);
-\end{lstlisting}
+\end{nlnlisting}
\caption{Algorithm to encode an unsigned integer}
\addtoindexx{LEB128!unsigned, encoding as}
\end{figure}
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
more = 1;
negative = (value < 0);
size = no. of bits in signed integer;
set high order bit of byte;
emit byte;
}
-\end{lstlisting}
+\end{nlnlisting}
\caption{Algorithm to encode a signed integer}
\addtoindexx{LEB128!signed, encoding as}
\end{figure}
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
result = 0;
shift = 0;
while(true)
break;
shift += 7;
}
-\end{lstlisting}
+\end{nlnlisting}
\caption{Algorithm to decode an unsigned LEB128 integer}
\addtoindexx{LEB128!unsigned, decoding of}
\end{figure}
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
result = 0;
shift = 0;
size = number of bits in signed integer;
if ((shift <size) && (sign bit of byte is set))
/* sign extend */
result |= - (1 << shift);
-\end{lstlisting}
+\end{nlnlisting}
\caption{Algorithm to decode a signed LEB128 integer}
\addtoindexx{LEB128!signed, decoding of}
\end{figure}
The figure corresponds to the following two trivial source files:
File myfile.c
-\begin{lstlisting}[numbers=none]
+\begin{nlnlisting}
typedef char* POINTER;
-\end{lstlisting}
+\end{nlnlisting}
File myfile2.c
-\begin{lstlisting}[numbers=none]
+\begin{nlnlisting}
typedef char* strp;
-\end{lstlisting}
+\end{nlnlisting}
% Ensures we get the following float out before we go on.
\clearpage
4
"POINTER"
\textit{e2 (debug info offset)}
-\vspace{0.01cm}
\hrule
+\vspace{0.01cm}
0
\end{alltt}
%
Figure \referfol{fig:fortranarrayexamplesourcefragment}.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
TYPE array_ptr
REAL :: myvar
REAL, DIMENSION (:), POINTER :: ap
DO I = 1, 20
ALLOCATE(arrayvar(i)%ap(i+10))
END DO
-\end{lstlisting}
+\end{nlnlisting}
\caption{Fortran array example: source fragment}
\label{fig:fortranarrayexamplesourcefragment}
\end{figure}
input to the debugger.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
struct desc {
long el_len; // Element length
void * base; // Address of raw data
long stride;
} dims[63];
};
-\end{lstlisting}
+\end{nlnlisting}
\caption{Fortran array example: descriptor representation}
\label{fig:fortranarrayexampledescriptorrepresentation}
\end{figure}
\needlines{6}
The \addtoindex{Fortran} derived type \texttt{array\_ptr} can now be re-described
in C-like terms that expose some of the representation as in
-
-\begin{lstlisting}[numbers=none]
+\par % Needed to end paragraph before listing so that it gets a line number
+\begin{nlnlisting}
struct array_ptr {
float myvar;
desc<1> ap;
};
-\end{lstlisting}
+\end{nlnlisting}
Similarly for variable \texttt{arrayvar}:
-\begin{lstlisting}[numbers=none]
+\par % Needed to end paragraph before listing so that it gets a line number
+\begin{nlnlisting}
desc<1> arrayvar;
-\end{lstlisting}
+\end{nlnlisting}
\textit{
Recall that \texttt{desc\textless 1\textgreater}
indicates the 1\dash dimensional version of \texttt{desc}.
}
-%\newpage
Finally, the following notation is useful:
\begin{enumerate}[1. ]
\item sizeof(type): size in bytes of entities of the given type
the program is stopped immediately following completion
of the do loop. Suppose further that the user enters the
following debug command:
+\par % Needed to end paragraph before listing so that it gets a line number
\vspace{2mm}
-\begin{lstlisting}[numbers=none]
+\begin{nlnlisting}
debug> print arrayvar(5)%ap(2)
-\end{lstlisting}
+\end{nlnlisting}
Interpretation of this expression proceeds as follows:
\begin{enumerate}[1. ]
illustrated in Figure \refersec{fig:FortranscalarcoarrayDWARFdescription}.
\begin{figure}[!ht]
-\begin{lstlisting}
+\begin{nlnlisting}
INTEGER x[*]
-\end{lstlisting}
+\end{nlnlisting}
\caption{Fortran scalar coarray: source fragment}
\label{fig:Fortranscalarcoarraysourcefragment}
\end{figure}
illustrated in Figure \refersec{fig:FortranarraycoarrayDWARFdescription}.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
INTEGER x(10)[*]
-\end{lstlisting}
+\end{nlnlisting}
\caption{Fortran array coarray: source fragment}
\label{fig:Fortranarraycoarraysourcefragment}
\end{figure}
illustrated in Figure \referfol{fig:FortranmultidimensionalcoarrayDWARFdescription}.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
INTEGER x(10,11,12)[2,3,*]
-\end{lstlisting}
+\end{nlnlisting}
\caption{Fortran multidimensional coarray: source fragment}
\label{fig:Fortranmultidimensionalcoarraysourcefragment}
\end{figure}
29113:2012 \emph{Further Interoperability of Fortran with C}}
\begin{figure}[!ht]
-\begin{lstlisting}
+\begin{nlnlisting}
SUBROUTINE Foo(x)
REAL :: x(..)
! x has n dimensions
END SUBROUTINE
-\end{lstlisting}
+\end{nlnlisting}
\caption{Declaration of a Fortran 2008 assumed-rank array}
\label{fig:assumedrankdecl}
\end{figure}
like the one shown in Figure~\ref{fig:arraydesc}.
\begin{figure}[!ht]
-\begin{lstlisting}
+\begin{nlnlisting}
struct array_descriptor {
void *base_addr;
int rank;
int stride;
int flags;
}
-\end{lstlisting}
+\end{nlnlisting}
\caption{One of many possible layouts for an array descriptor}
\label{fig:arraydesc}
\end{figure}
Figure~\refersec{fig:assumedrankdwarfparser}.
\begin{figure}[!ht]
-\begin{lstlisting}
+\begin{nlnlisting}
typedef struct {
int lower, upper, stride;
} dims_t;
}
return result;
}
-\end{lstlisting}
+\end{nlnlisting}
\caption{How to interpret the DWARF from Figure~\ref{fig:assumedrankdwarf}}
\label{fig:assumedrankdwarfparser}
\end{figure}
several variables.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
PROGRAM Sample
TYPE :: dt (l)
END SUBROUTINE
END Sample
-\end{lstlisting}
+\end{nlnlisting}
\caption{Fortran dynamic type example: source}
\label{fig:fortrandynamictypeexamplesource}
\end{figure}
were defined in the enclosing structure \texttt{foo}.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
struct foo {
int a;
struct {
t.b = 2;
}
-\end{lstlisting}
+\end{nlnlisting}
\caption{Anonymous structure example: source fragment}
\label{fig:anonymousstructureexamplesourcefragment}
\end{figure}
parameterized array, one embedded in a record.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
M : INTEGER := <exp>;
VEC1 : array (1..M) of INTEGER;
subtype TEENY is INTEGER range 1..100;
end record;
OBJ2B : REC2;
-\end{lstlisting}
+\end{nlnlisting}
\caption{Ada example: source fragment}
\label{fig:adaexamplesourcefragment}
\end{figure}
\addtoindex{bit fields}.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
TYPE T : PACKED RECORD { bit size is 2 }
F5 : BOOLEAN; { bit offset is 0 }
F6 : BOOLEAN; { bit offset is 1 }
F4 : PACKED ARRAY [0..1] OF T; { bit offset is 33 }
F7 : T; { bit offset is 37 }
END;
-\end{lstlisting}
+\end{nlnlisting}
\caption{Packed record example: source fragment}
\label{fig:packedrecordexamplesourcefragment}
\end{figure}
This section illustrates one possible representation of the
following \addtoindex{C} structure definition in both big-
and little-endian \byteorder{s}:
-
-\begin{lstlisting}
+\par % Needed to end paragraph before listing so that it gets a line number
+\begin{nlnlisting}
struct S {
int j:5;
int k:6;
int m:5;
int n:8;
};
-\end{lstlisting}
+\end{nlnlisting}
Figures \ref{fig:bigendiandatabitoffsets} and
\refersec{fig:littleendiandatabitoffsets}
is appropriate.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
namespace {
int i;
}
j = 4;
return myfunc2(3) + j + i + a + 2;
}
-\end{lstlisting}
+\end{nlnlisting}
\caption{Namespace example \#1: source fragment}
\label{fig:namespaceexample1sourcefragment}
\end{figure}
in the enclosing namespace, \texttt{A}.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
namespace A {
inline namespace B { // (1) inline namespace
int a;
using A::a;
a = 2;
}
-\end{lstlisting}
+\end{nlnlisting}
\caption{Namespace example \#2: source fragment}
\label{fig:namespaceexample2sourcefragment}
\end{figure}
is appropriate.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
class A
{
void func1(int x1);
static void func3(int x3);
};
void A::func1(int x) {}
-\end{lstlisting}
+\end{nlnlisting}
\caption{Member function example: source fragment}
\label{fig:memberfunctionexamplesourcefragment}
\end{figure}
is appropriate.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
class A {
public:
void f() const &&;
// The type of pointer is "void (A::*)() const &&".
auto pointer_to_member_function = &A::f;
}
-\end{lstlisting}
+\end{nlnlisting}
\caption{Reference- and rvalue-reference-qualification example: source \mbox{fragment}}
\label{fig:memberfunctionrefqualexamplesourcefragment}
\end{figure}
Suppose the line number header includes the following
(header fields not needed are not shown):
\begin{center}
+\begin{nolinenumbersenv}
\begin{tabular}{lr}
\addttindex{opcode\_base} & 13 \\
\addttindex{line\_base} & -3 \\
\addttindex{minimum\_instruction\_length} & 1 \\
\addttindex{maximum\_operations\_per\_instruction} & 1 \\
\end{tabular}
+\end{nolinenumbersenv}
\end{center}
This means that
we can use a special opcode whenever two successive rows in
Figure \refersec{fig:linenumberprogramexamplemachinecode}.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
1: int
2: main()
0x239: push pb
0x24b: pop bp
0x24c: ret
7: 0x24d:
-\end{lstlisting}
+\end{nlnlisting}
\caption{Line number program example: machine code}
\label{fig:linenumberprogramexamplemachinecode}
\end{figure}
source register with the constant.
\item There are eight 4-byte registers:
-\newline
+\par
+\begin{nolinenumbersenv}
\begin{tabular}{p{5mm}l}
& R0 always 0 \\
& R1 holds return address on call \\
& R4-R6 preserved on call \\
& R7 stack pointer \\
\end{tabular}
+\end{nolinenumbersenv}
\item The stack grows in the negative direction.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
;; start prologue
foo sub R7, R7, <fs> ; Allocate frame
foo+4 store R1, R7, (<fs>-4) ; Save the return address
foo+76 add R7, R7, <fs> ; Deallocate frame
foo+80 jump R1 ; Return
foo+84
-\end{lstlisting}
+\end{nlnlisting}
\caption{Call frame information example: machine code fragments}
\label{fig:callframeinformationexamplemachinecodefragments}
\end{figure}
The following notations apply in
Table \refersec{tab:callframeinformationexampleconceptualmatrix}:
-\newline
+\par
+\begin{nolinenumbersenv}
\begin{tabular}{p{5mm}l}
&1. R8 is the return address \\
&2. s = same\_value rule \\
&5. cN = offset(N) rule \\
&6. a = architectural rule \\
\end{tabular}
+\end{nolinenumbersenv}
\begin{centering}
\setlength{\extrarowheight}{0.1cm}
\end{longtable}
\end{centering}
+\bbeb
-The following notations apply in
-Table \refersec{tab:callframeinformationexampleframedescriptionentryencoding}:
-\newline
-\begin{tabular}{p{5mm}l}
-&\texttt{<fs> =} frame size \\
-&\texttt{<caf> =} code alignment factor \\
-&\texttt{<daf> =} data alignment factor \\
-\end{tabular}
-
-
+\needlines{10}
\begin{centering}
\setlength{\extrarowheight}{0.1cm}
\begin{longtable}{l|ll}
\caption{Call frame information example: frame description entry encoding}
\label{tab:callframeinformationexampleframedescriptionentryencoding} \\
- \hline \bfseries Address &\bfseries Value &\bfseries Comment \\ \hline
+ \hline \bfseries Address &\bfseries Value &\bfseries Comment\dag \\ \hline
\endfirsthead
- \bfseries Address &\bfseries Value &\bfseries Comment \\ \hline
+ \bfseries Address &\bfseries Value &\bfseries Comment\dag \\ \hline
\endhead
\hline \emph{Continued on next page}
\endfoot
fde+43&\DWCFAnop&padding \\
fde+44 && \\
\end{longtable}
+\bb
+\dag The following notations apply:
+\texttt{<fs> =} frame size,
+\texttt{<caf> =} code alignment factor, and
+\texttt{<daf> =} data alignment factor.
+\eb
\end{centering}
\needlines{6}
containing subprogram \texttt{OUTER}.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
inline procedure OUTER (OUTER_FORMAL : integer) =
begin
OUTER_LOCAL : integer;
! Call OUTER
!
OUTER(7);
-\end{lstlisting}
+\end{nlnlisting}
\caption{Inlining examples: pseudo-source fragmment}
\label{fig:inliningexamplespseudosourcefragment}
\end{figure}
Figure \refersec{fig:constantexpressionsdwarfdescription}.
\begin{figure}[ht]
-\begin{lstlisting}[numbers=none]
+\begin{nlnlisting}
constexpr double mass = 9.8;
constexpr int square (int x) { return x * x; }
float arr[square(9)]; // square() called and inlined
-\end{lstlisting}
+\end{nlnlisting}
\caption{Constant expressions: C++ source} \label{fig:constantexpressionscsource}
\end{figure}
Figure \refersec{fig:unicodecharacterexampledwarfdescription}.
\begin{figure}[!ht]
-\begin{lstlisting}[numbers=none]
+\begin{nlnlisting}
// C++ source
//
char16_t chr_a = u'h';
char32_t chr_b = U'h';
-\end{lstlisting}
+\end{nlnlisting}
\caption{Unicode character example: source}
\label{fig:unicodecharacterexamplesource}
\end{figure}
Figure \refersec{fig:ctypesafeenumerationexampledwarf}.
\begin{figure}[ht]
-\begin{lstlisting}[numbers=none]
+\begin{nlnlisting}
// C++ source
//
enum class E { E1, E2=100 };
E e1;
-\end{lstlisting}
+\end{nlnlisting}
\caption{Type-safe enumeration example: source}
\label{fig:ctypesafeenumerationexamplesource}
\end{figure}
Figure \refersec{fig:ctemplateexample1dwarf}.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
// C++ source
//
template<class T>
T comp;
};
wrapper<int> obj;
-\end{lstlisting}
+\end{nlnlisting}
\caption{C++ template example \#1: source}
\label{fig:ctemplateexample1source}
\end{figure}
Figure \refersec{fig:ctemplateexample2dwarf}.
\begin{figure}[!ht]
-\begin{lstlisting}
+\begin{nlnlisting}
// C++ source
//
template<class T>
}
wrapper<int> obj;
consume(obj);
-\end{lstlisting}
+\end{nlnlisting}
\caption{C++ template example \#2: source}
\label{fig:ctemplateexample2source}
\end{figure}
Figure \refersec{fig:ctemplatealiasexample1dwarf}.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
// C++ source, template alias example 1
//
template<typename T, typename U>
};
template<typename V> using Beta = Alpha<V,V>;
Beta<long> b;
-\end{lstlisting}
+\end{nlnlisting}
\caption{C++ template alias example \#1: source}
\label{fig:ctemplatealiasexample1source}
\end{figure}
Figure \refersec{fig:ctemplatealiasexample2dwarf}.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
// C++ source, template alias example 2
//
template<class TX> struct X { };
template<class T> using Z = Y<T>;
X<Y<int>> y;
X<Z<int>> z;
-\end{lstlisting}
+\end{nlnlisting}
\caption{C++ template alias example \#2: source}
\label{fig:ctemplatealiasexample2source}
\end{figure}
Figure \refersec{fig:cimplicitpointerexample1dwarf}.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
struct S { short a; char b, c; };
volatile int v;
void foo (int x)
foo (v+1);
return 0;
}
-\end{lstlisting}
+\end{nlnlisting}
\caption{C implicit pointer example \#1: source}
\label{fig:cimplicitpointerexample1source}
\end{figure}
\begin{figure}[ht]
\addtoindexx{ISO 10646 character set standard}
-\begin{lstlisting}
+\begin{nlnlisting}
program character_kind
use iso_fortran_env
implicit none
open (output_unit, encoding='UTF-8')
write (*,*) trim (hello_world)
end program character_kind
-\end{lstlisting}
+\end{nlnlisting}
\caption{String type example: source}
\label{fig:stringtypeexamplesource}
\end{figure}
Consider the \addtoindex{C} source in Figure \referfol{fig:callsiteexample1source}.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
extern void fn1 (long int, long int, long int);
}
return z;
}
-\end{lstlisting}
+\end{nlnlisting}
\caption{Call Site Example \#1: Source}
\label{fig:callsiteexample1source}
\end{figure}
pseudo-\linebreak[0]assembly notation in Figure \refersec{fig:callsiteexample1code}.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
fn2:
L1:
%reg2 = 7 ! Load the 3rd argument to fn1
! register
%reg3 = %reg3 + 32 ! Leave stack frame
return
-\end{lstlisting}
+\end{nlnlisting}
\caption{Call Site Example \#1: Code}
\label{fig:callsiteexample1code}
\end{figure}
including \texttt{n} over which the following
location description applies):
-%\begin{figure}[ht]
+\nolinenumbers
\begin{dwflisting}
\begin{alltt}
\end{alltt}
\end{dwflisting}
-%\end{figure}
\vspace*{0.7\baselineskip}
+\condlinenumbers
Similarly, the variable \texttt{q} in \texttt{fn2} then might have this location list:
-
+\par\nolinenumbers
\begin{dwflisting}
\begin{alltt}
\end{dwflisting}
\vspace*{0.7\baselineskip}
+\condlinenumbers
Variables \texttt{b} and \texttt{c} each have a location list similar to
that for variable \texttt{a},
except for a different label between the two ranges and they
parameters can be handled.
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
subroutine fn4 (n)
integer :: n, x
x = n
x = 5
call fn4 (x)
end subroutine fn5
-\end{lstlisting}
+\end{nlnlisting}
\caption{Call site example \#2: source}
\label{fig:callsiteexample2source}
\end{figure}
\clearpage
Possible generated code for this source is shown using a suggestive
pseudo-\linebreak[0]assembly notation in Figure \refersec{fig:callsiteexample2code}.
+\par % Needed to end paragraph before listing so that it gets a line number
\begin{figure}[ht]
-\begin{lstlisting}
+\begin{nlnlisting}
fn4:
%reg2 = [%reg0] ! Load value of n (passed by reference)
%reg3 = %reg3 + 8 ! Leave stack frame
return
-\end{lstlisting}
+\end{nlnlisting}
\caption{Call site example \#2: code}
\label{fig:callsiteexample2code}
\end{figure}
The location description for variable \texttt{x} in function
\texttt{fn4} might be:
-\begin{lstlisting}
+\par % Needed to end paragraph before listing so that it gets a line number
+\begin{nlnlisting}
DW_OP_entry_value 4 DW_OP_breg0 0 DW_OP_deref_size 4 DW_OP_stack_value
-\end{lstlisting}
+\end{nlnlisting}
The call sites in (just) function \texttt{fn5} might be as shown in
Figure \refersec{fig:callsiteexample2dwarf}.
\begin{figure}[ht]
\textit{File a.c}
-\begin{lstlisting}
+\begin{nlnlisting}
#include "a.h"
#define FUNCTION_LIKE_MACRO(x) 4+x
#include "b.h"
-\end{lstlisting}
+\end{nlnlisting}
\vspace{7mm}
\textit{File a.h}
-\begin{lstlisting}
+\begin{nlnlisting}
#define LONGER_MACRO 1
#define B 2
#include "b.h"
#define B 3
-\end{lstlisting}
+\end{nlnlisting}
\vspace{7mm}
\textit{File b.h}
-\begin{lstlisting}
+\begin{nlnlisting}
#undef B
#define D 3
#define FUNCTION_LIKE_MACRO(x) 4+x
-\end{lstlisting}
+\end{nlnlisting}
\caption{Macro example: source}
\label{ref:macroexamplesource}
\end{figure}
\DWTAGformalparameter,
\DWTAGfriend,
\DWTAGgenericsubrange,
+\bb
+\DWTAGimmutabletype,
+\eb
\DWTAGimporteddeclaration,
\DWTAGimportedmodule,
\DWTAGimportedunit,
\DWTAGinterfacetype,
\DWTAGlabel,
\DWTAGlexicalblock,
-\DWTAGmodule,
+\bb
\DWTAGmember,
+\DWTAGmodule,
+\eb
\DWTAGnamelist,
\DWTAGnamelistitem,
\DWTAGnamespace,
&\livelinki{chap:DWATrangesnoncontiguousrangeofcodeaddresses}
{Non-contiguous range of code addresses}
{non-contiguous range of code addresses} \\
-\DWATrnglistsbaseTARG
-&\livelinki{chap:DWATrnglistsbase}
- {Base offset for range lists}
- {ranges lists} \\
+\bbeb
\DWATrankTARG
&\livelinki{chap:DWATrankofdynamicarray}
{Dynamic number of array dimensions}
{recursive property of a subroutine} \\
\DWATreferenceTARG
&\livelink{chap:DWATreferenceofnonstaticmember}
- {\&-qualified non-static member function} \textit{(\addtoindex{C++})} \\
+ {\&-qualified non-static member function} \textit{(\addtoindex{C++})} \\
\DWATreturnaddrTARG
&\livelinki{chap:DWATreturnaddrsubroutinereturnaddresssavelocation}
- {Subroutine return address save location}
- {subroutine return address save location} \\
+ {Subroutine return address save location}
+ {subroutine return address save location} \\
+\bb
+\DWATrnglistsbaseTARG
+&\livelinki{chap:DWATrnglistsbase}
+ {Base offset for range lists}
+ {ranges lists}
+\eb
+ \\
\DWATrvaluereferenceTARG
&\livelink{chap:DWATrvaluereferenceofnonstaticmember}
{\&\&-qualified non-static member function} \textit{(\addtoindex{C++})} \\
\addtoindexx{loclistsptr|see {\textit{also} loclistsptr class}}
\addtoindexx{loclist|see {\textit{also} loclist class}}
\addtoindexx{macptr|see {\textit{also} macptr class}}
+\addtoindexx{reference|see {\textit{also} reference class}}
\addtoindexx{rnglistsptr|see {\textit{also} rnglistsptr class}}
\addtoindexx{rnglist|see {\textit{also} rnglist class}}
-\addtoindexx{reference|see {\textit{also} reference class}}
\addtoindexx{string|see {\textit{also} string class}}
\addtoindexx{stroffsetsptr|see {\textit{also} stroffsetsptr class}}
information.
\\
-\hypertarget{chap:classrnglist}{}
-\livelinki{datarep:classrnglist}{rnglist}{rnglist class},
-\hypertarget{chap:classrnglistsptr}{}
-\livelinki{datarep:classrnglistsptr}{rnglistsptr}{rnglistsptr class}
-&Specifies a location in the DWARF section that holds
-non-contiguous address ranges.
-\\
-
\hypertarget{chap:classreference}{}
\livelinki{datarep:classreference}{reference}{reference class}
-&Refers to one of the debugging information
+&\bbeb
+Refers to one of the debugging information
entries that \mbox{describe} the program. There are four types of
\mbox{reference}. The first is an offset relative to the beginning
of the \mbox{compilation} unit in which the reference occurs and must
a \addtoindex{supplementary object file}.
\\
+\bb
+\hypertarget{chap:classrnglist}{}
+\livelinki{datarep:classrnglist}{rnglist}{rnglist class},
+\hypertarget{chap:classrnglistsptr}{}
+\livelinki{datarep:classrnglistsptr}{rnglistsptr}{rnglistsptr class}
+&Specifies a location in the DWARF section that holds
+non-contiguous address ranges.
+\eb
+\\
+
\hypertarget{chap:classstring}{}
\livelinki{datarep:classstring}{string}{string class}
& A null-terminated sequence of zero or more
\needlines{10}
\textit{As an example, consider the following fragment of \addtoindex{C} code:}
-\begin{lstlisting}
+\begin{nlnlisting}
void myfunc()
{
int x;
g(x);
}
}
-\end{lstlisting}
+\end{nlnlisting}
\textit{\addtoindex{C} scoping rules require that the
\section{AGGREGATION WITH INDEPENDENT WORKS}
\label{gnu:aggregationwithindependentworks}
-A compilation of the Document or its derivatives withall tail and normal calls are described
+A compilation of the Document or its derivatives with
+\bbeb
other separate and independent documents or works, in
or on a volume of a storage or distribution medium, is
called an \doublequote{aggregate} if the copyright resulting from
Instead, the goal is to create a method
of communicating an accurate picture of the source program
to any debugger in a form that is extensible to different
-languages while retaining compatibility.
+languages while retaining compatibility.unittype
The design of the
debugging information format is open-ended, allowing for
\begin{itemize}
\item The compilation unit header (in the \dotdebuginfo{} section) has
a new \HFNunittype{} field.
+\bb
+In addition, the \HFNdebugabbrevoffset{} and \HFNaddresssize{} fields are reordered.
+\eb
\needlines{4}
\item New operand forms for attribute values are defined
(\DWFORMaddrxNAME, \DWFORMdatasixteenNAME, \DWFORMimplicitconstNAME,
considered incompatible additions.}
\item The line number table header is substantially revised.
\needlines{4}
-\item A location list entry
-with the address range \mbox{(0, \textit{maximum-address})} is defined
-as the new default location list entry.
+\item
+\bb
+The \dotdebugloc{} and \dotdebugranges{} sections are replaced
+by new \dotdebugloclists{} and \dotdebugrnglists{} sections, respectively.
+These new sections have a new (and more efficient) list structure.
+Attributes that reference the predecessor sections must be interpreted
+differently to access the new sections. The new sections encode the same
+information as their predecessors, except that a new default location
+list entry is added.
+\eb
\item In a string type, the \DWATbytesizeNAME{} attribute is re-defined
to always describe the size of the string type.
(Previously it described the size of the optional string length data
Similar comments apply to replacement of the \dotdebugpubnames{}
and \dotdebugpubtypes{} sections with the new \dotdebugnames{}
-section, as well as \dotdebugloc{} and \dotdebugranges{} with
-\dotdebugloclists{} and \dotdebugrnglists{}, respectively.
+section.
+\bbeb
\needlines{4}
\section{Changes from Version 3 to Version 4}
This attribute points to the beginning of the compilation
unit's contribution to the \dotdebugaddr{} section.
Indirect references (using \DWFORMaddrx, \DWOPaddrx,
-\DWOPconstx, \DWLLEbaseaddressx{},
-\DWLLEstartxendx{} or \DWLLEstartxlength)
+\DWOPconstx,
+\bb
+\DWLLEbaseaddressx{}, \DWLLEstartxendx{}, \DWLLEstartxlength{},
+\DWRLEbaseaddressx{}, \DWRLEstartxendx{} or \DWRLEstartxlength)
+\eb
within the compilation unit are interpreted as indices
relative to this base.
\item \hypertarget{chap:DWATrnglistsbaseforrnglists}{}
A \DWATrnglistsbaseDEFN\addtoindexx{ranges table base attribute}
attribute, whose value is of class \CLASSrnglistsptr.
-This attribute points to the base of the compilation
+This attribute points to the
+\bb
+beginning of the offsets table (immediately following the header)
+\eb
+of the compilation
unit's contribution to the \dotdebugrnglists{} section.
References to range lists (using \DWFORMrnglistx)
within the compilation unit are
interpreted relative to this base.
\item \hypertarget{chap:DWATloclistsbaseinlocationlist}{}
-A \DWATloclistsbase{}\addtoindexx{location table base attribute}
+A \DWATloclistsbaseDEFN{}\addtoindexx{location table base attribute}
attribute, whose value is of class \CLASSloclistsptr.
-This attribute points to the base of the compilation
+This attribute points to the
+\bb
+beginning of the offsets table (immediately following the header)
+\eb
+of the compilation
unit's contribution to the \dotdebugloclists{} section. References
to location lists (using \DWFORMloclistx) within the compilation
unit are interpreted relative to this base.
\addtoindexx{Fortran!use statement}
itself imported by a use statement without an explicit mention
may be represented by an imported declaration entry that refers
-to the original debugging information entry. For example, given
-}
+to the original debugging information entry. For example, given}
+\par % Needed to end paragraph before listing so that it gets a line number
\vspace{2mm}
-\begin{lstlisting}
+\begin{nlnlisting}
module A
integer X, Y, Z
end module
use B, only Q => X
end module
-\end{lstlisting}
+\end{nlnlisting}
\textit{the imported declaration entry for Q within module C refers
directly to the variable declaration entry for X in module A
because there is no explicit representation for X in module B.
\addtoindexx{entry point entry}
points:
+\nolinenumbers
\begin{tabular}{lp{9.0cm}}
\DWTAGsubprogramTARG{} & A subroutine or function \\
\DWTAGinlinedsubroutine{} & A particular inlined
instance of a subroutine or function \\
\DWTAGentrypointTARG{} & An alternate entry point \\
\end{tabular}
-
+\par\condlinenumbers
\needlines{6}
\subsection{General Subroutine and Entry Point Information}
\needlines{4}
\textit{Consider the following example \addtoindex{C} code:}
-\vspace{3mm}
-\begin{lstlisting}
+\par % Needed to end paragraph before listing so that it gets a line number
+\begin{nlnlisting}
float x = 99.99;
int myfunc()
{
float x = 88.99;
return 0;
}
-\end{lstlisting}
+\end{nlnlisting}
\textit{\addtoindex{C} scoping rules require that the value of the
variable \texttt{x} assigned to the variable \texttt{f} in the
& 1 & 3 & 4 & 4 \\
\dotdebuginfo{} & 2 & 3 & 4 & 5 \\
\dotdebugline{} & 2 & 3 & 4 & 5 \\
-\dotdebuglinestr{} & - & - & - & 5 \\
+\bbeb\dotdebuglinestr{} & - & - & - & * \\
\dotdebugloc{} & * & * & * & - \\
\dotdebugloclists{} & - & - & - & 5 \\
\dotdebugmacinfo{} & * & * & * & - \\*
\needlines{6}
The skeleton compilation unit DIE may have the following attributes:
+\par
+\begin{nolinenumbersenv}
\autocols[0pt]{c}{3}{l}{
\DWATaddrbase{},
\DWATcompdir{},
\DWATstmtlist{},
\DWATstroffsetsbase{}
}
+\end{nolinenumbersenv}
All other attributes of the compilation unit DIE are moved to
the full DIE in the \dotdebuginfodwo{} section.
\vspace{2cm}
\begin{figure}[ht]
\textit{File demo1.cc}
-\begin{lstlisting}
+\begin{nlnlisting}
#include "demo.h"
bool Box::contains(const Point& p) const
return (p.x() >= ll_.x() && p.x() <= ur_.x() &&
p.y() >= ll_.y() && p.y() <= ur_.y());
}
-\end{lstlisting}
+\end{nlnlisting}
\caption{Split object example: source fragment \#1}
\label{fig:splitobjectexamplesourcefragment1}
\end{figure}
\begin{figure}[ht]
\textit{File demo2.cc}
-\begin{lstlisting}
+\begin{nlnlisting}
#include "demo.h"
bool Line::clip(const Box& b)
b.t());
}
}
-\end{lstlisting}
+\end{nlnlisting}
\caption{Split object example: source fragment \#2}
\label{fig:splitobjectexamplesourcefragment2}
\end{figure}
\begin{figure}[ht]
\textit{File demo.h}
-\begin{lstlisting}
+\begin{nlnlisting}
class A {
public:
Point(float x, float y) : x_(x), y_(y){}
Point ur_;
};
-\end{lstlisting}
+\end{nlnlisting}
\caption{Split object example: source fragment \#3}
\label{fig:splitobjectexamplesourcefragment3}
\end{figure}
debugging information entries in the split DWARF object. In the
example in \refersec{fig:splitobjectexamplesourcefragment3},
\texttt{demo1.o} may have three entries:
+\par
+\begin{nolinenumbersenv}
\begin{center}
-%\footnotesize
\begin{tabular}{cl}
Slot & Location referenced \\
\hline
2 & low PC value for \texttt{Point::y} \\
\end{tabular}
\end{center}
+\end{nolinenumbersenv}
\needlines{4}
The \dotdebugnames{}
\needlines{6}
\textit{As examples of how type modifiers are ordered, consider the following
\addtoindex{C} declarations:}
-\begin{lstlisting}[numbers=none]
+\par % Needed to end paragraph before listing so that it gets a line number
+\begin{nlnlisting}
const unsigned char * volatile p;
-\end{lstlisting}
-\textit{which represents a volatile pointer to a constant
-character. This is encoded in DWARF as:}
+\end{nlnlisting}
+\textit{This represents a volatile pointer to a constant
+character. It is encoded in DWARF as:}
+\par % Needed to end paragraph before listing so that it gets a line number
+\nolinenumbers
\begin{dwflisting}
\begin{alltt}
\DWTAGvariable(p) -->
\end{alltt}
\end{dwflisting}
-%\needlines{5}
+\condlinenumbers
\textit{On the other hand}
-\begin{lstlisting}[numbers=none]
+\par % Needed to end paragraph before listing so that it gets a line number
+\begin{nlnlisting}
volatile unsigned char * const restrict p;
-\end{lstlisting}
+\end{nlnlisting}
\textit{represents a restricted constant
pointer to a volatile character. This is encoded as:}
-
+\par % Needed to end paragraph before listing so that it gets a line number
+\nolinenumbers
\begin{dwflisting}
\begin{alltt}
\DWTAGvariable(p) -->
\end{alltt}
\end{dwflisting}
+\condlinenumbers
\section{Typedef Entries}
\label{chap:typedefentries}
A named type that is defined in terms of another type
\textit{Consider a nested class whose
definition occurs outside of the containing class definition, as in:}
-\begin{lstlisting}[numbers=none]
+\begin{nlnlisting}
struct A {
struct B;
};
struct A::B { ... };
-\end{lstlisting}
+\end{nlnlisting}
\textit{The two different structs can be described in
different compilation units to
\textit{This allows the representation of a \addtoindex{UPC} shared array such as}
-\begin{lstlisting}[numbers=none]
+\begin{nlnlisting}
int shared foo[34*THREADS][10][20];
-\end{lstlisting}
+\end{nlnlisting}
\needlines{4}
The\hypertarget{chap:DWATlowerboundlowerboundofsubrange}{}
\needlines{6}
\textit{For an expression such as}
-\begin{lstlisting}[numbers=none]
+\begin{nlnlisting}
object.*mbr_ptr
-\end{lstlisting}
+\end{nlnlisting}
\textit{where \texttt{mbr\_ptr} has some \addtoindex{pointer to member type}, a debugger should:}
\begin{enumerate}[1. ]
\item \textit{Push the value of \texttt{mbr\_ptr} onto the DWARF expression stack.}