Editorial cleanups mostly related to coarrays and assumed rank arrays.
authorRon Brender <ron.brender@gmail.com>
Fri, 27 Sep 2013 19:19:04 +0000 (15:19 -0400)
committerRon Brender <ron.brender@gmail.com>
Fri, 27 Sep 2013 19:19:04 +0000 (15:19 -0400)
Signed-off-by: Ron Brender <ron.brender@gmail.com>
dwarf5/latexdoc/attributesbytag.tex
dwarf5/latexdoc/changesummary.tex
dwarf5/latexdoc/datarepresentation.tex
dwarf5/latexdoc/dwarf5.tex
dwarf5/latexdoc/dwarfnamecmds.tex
dwarf5/latexdoc/examples.tex
dwarf5/latexdoc/generaldescription.tex
dwarf5/latexdoc/introduction.tex
dwarf5/latexdoc/typeentries.tex

index 34e6d15..0e929ab 100644 (file)
@@ -117,7 +117,7 @@ means include all three of the
 &\livelink{chap:DWATvisibility}{DW\_AT\_visibility} \\
 
 \hline
-\livelink{chap:DWTAGcoarraytype}{DW\_TAG\_coarray\_type}
+\DWTAGcoarraytypeLL
 &\livelink{chap:DECL}{DECL} \\
 &\livelink{chap:DWATname}{DW\_AT\_name} \\
 &\livelink{chap:DWATsibling}{DW\_AT\_sibling} \\
@@ -283,7 +283,7 @@ means include all three of the
 
 \hline
 % Please keep in synch with DW_TAG_subrange_type.
-\livelink{chap:DWTAGgenericsubrange}{DW\_TAG\_generic\_subrange}
+\DWTAGgenericsubrangeLL
 &\livelink{chap:DECL}{DECL}  \\
 &\livelink{chap:DWATabstractorigin}{DW\_AT\_abstract\_origin}  \\
 &\livelink{chap:DWATaccessibility}{DW\_AT\_accessibility}  \\
index 2a0fcb2..7d15602 100644 (file)
@@ -14,6 +14,7 @@ This change summary is included only in draft versions of this document.
 \vspace{1cm}
 \begin{tabular}{ll}
 \textbf{Date}  & \textbf{Issue Incorported or Other Change}    \\ \hline \\
+9/27/2013              & Editorial work re assumed-rank arrays, other minor cleanups \\
 9/23/2013       & 130313.5 (Fortran assumed-rank arrays)\\
 6/22/2013      & 100805.1 (value of reference), 100816.1 (remove .debug\_types), \\ 
                        & 101014.1, 101111.1, 120218.1 (Go, Modula-3 and Haskell), \\
index 9ada421..cb0569d 100644 (file)
@@ -563,8 +563,8 @@ Table \refersec{tab:tagencodings}.
 \livelink{chap:DWTAGtypeunit}{DW\_TAG\_type\_unit} &0x41      \\
 \livelink{chap:DWTAGrvaluereferencetype}{DW\_TAG\_rvalue\_reference\_type} &0x42      \\
 \livelink{chap:DWTAGtemplatealias}{DW\_TAG\_template\_alias} &0x43      \\
-\livelink{chap:DWTAGcoarraytype}{DW\_TAG\_coarray\_type} &0x44 \\
-\livelink{chap:DWTAGgenericsubrange}{DW\_TAG\_generic\_subrange} &0x45 \\
+\DWTAGcoarraytypeLL &0x44 \\
+\DWTAGgenericsubrangeLL &0x45 \\
 \livelink{chap:DWXXXlohiuser}{DW\_TAG\_lo\_user}&0x4080      \\
 \livelink{chap:DWXXXlohiuser}{DW\_TAG\_hi\_user}&\xffff      \\
 \end{longtable}
@@ -1216,7 +1216,7 @@ Table \refersec{tab:attributeformencodings}.
                \livelink{chap:classconstant}{constant}\addtoindexx{string length attribute!size of length}  \\
 \livelink{chap:DWATstringlengthbytesize}{DW\_AT\_string\_length\_byte\_size} \ddag&0x70&
                \livelink{chap:classconstant}{constant}\addtoindexx{string length attribute!size of length}  \\
-                \livelink{chap:DWATrank}{DW\_AT\_rank} \ddag&0x71&
+\DWATrankLL \ddag&0x71&
                \livelink{chap:DWATrank}{constant, exprloc}\addtoindexx{rank attribute!encoding}  \\
 \livelink{chap:DWXXXlohiuser}{DW\_AT\_lo\_user}&0x2000 & --- \addtoindexx{low user attribute encoding}  \\
 \livelink{chap:DWXXXlohiuser}{DW\_AT\_hi\_user}&\xiiifff& --- \addtoindexx{high user attribute encoding}  \\
index 37b435b..99a76f4 100644 (file)
@@ -3,7 +3,7 @@
 % 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}{September 25, 2013}
+\newcommand{\docdate}{September 27, 2013}
 %
 \usepackage{ifthen}
 \newboolean{isdraft}
@@ -310,17 +310,17 @@ escapeinside={\%*}{*)}     % if you want to add a comment within your code
 \include{generaldescription}            %\emptypage
 \include{programscope}                  \emptypage
 \include{dataobject}                    \emptypage
-\include{typeentries}                   %\emptypage
+\include{typeentries}                   \emptypage
 \include{otherdebugginginformation}    \emptypage
 \include{datarepresentation}            \emptypage
 
 %  The \appendix toggles us into appendix chapters
 \appendix
 
-\include{attributesbytag}                              %\emptypage
+\include{attributesbytag}                              \emptypage
 \include{debugsectionrelationships}     \emptypage
 \include{encodingdecoding}              \emptypage
-\include{examples}                      \emptypage
+\include{examples}                      %\emptypage
 \include{compression}                   %\emptypage
 \include{sectionversionnumbers}
 \include{gnulicense}
index 3765039..569d6b6 100644 (file)
@@ -2,24 +2,52 @@
 % These eliminate the need to use escapes for the underscores and
 % add entries for indexing
 %
+
+% A command to define a pair of name commands
+%
+%\newcommand{\newnamecommands}[2]{
+%      \newcommand{\#1}   {\addtoindex{#2}}
+%      \newcommand{\#1 LL}{\livelink{chap:#1}{#2}}
+%      }
+
 % DW_AT
 %
-\newcommand{\DWATbitsize}{\addtoindex{DW\_AT\_bit\_size}}
-\newcommand{\DWATbytesize}{\addtoindex{DW\_AT\_byte\_size}}
-\newcommand{\DWATlocation}[1][]{\addtoindex{DW\_AT\_location}}
-\newcommand{\DWATlowerbound}{\addtoindex{DW\_AT\_lower\_bound}}
-\newcommand{\DWATmacroinfo}[1][]{\addtoindex{DW\_AT\_macro\_info}}
-\newcommand{\DWATname}{\addtoindex{DW\_AT\_name}}
-\newcommand{\DWATordering}{\addtoindex{DW\_AT\_ordering}}
-\newcommand{\DWATranges}[1][]{\addtoindex{DW\_AT\_ranges}}
-\newcommand{\DWATrank}[1][]{\addtoindex{DW\_AT\_rank}}
-\newcommand{\DWATsibling}{\addtoindexx{DW\_AT\_sibling}}
-\newcommand{\DWATstmtlist}[1][]{\addtoindex{DW\_AT\_stmt\_list}}
-\newcommand{\DWATstringlength}{\addtoindex{DW\_AT\_string\_length}}
-\newcommand{\DWATstringlengthbitsize}{\addtoindex{DW\_AT\_string\_length\_bit\_size}}
-\newcommand{\DWATstringlengthbytesize}{\addtoindex{DW\_AT\_string\_length\_byte\_size}}
-\newcommand{\DWATtype}{\addtoindex{DW\_AT\_type}}
-\newcommand{\DWATupperbound}{\addtoindex{DW\_AT\_upper\_bound}}
+\newcommand{\DWATbitsize}  {\addtoindex                {DW\_AT\_bit\_size}}
+\newcommand{\DWATbitsizeLL}{\livelink{chap:DWATbitsize}{DW\_AT\_bit\_size}}
+\newcommand{\DWATbytesize}  {\addtoindex                 {DW\_AT\_byte\_size}}
+\newcommand{\DWATbytesizeLL}{\livelink{chap:DWATbytesize}{DW\_AT\_byte\_size}}
+\newcommand{\DWATbytestride}  {\addtoindex                   {DW\_AT\_byte\_stride}}
+\newcommand{\DWATbytestrideLL}{\livelink{chap:DWATbytestride}{DW\_AT\_byte\_stride}}
+\newcommand{\DWATdatalocation}  {\addtoindex                     {DW\_AT\_data\_location}}
+\newcommand{\DWATdatalocationLL}{\livelink{chap:DWATdatalocation}{DW\_AT\_data\_location}}
+\newcommand{\DWATlocation}  {\addtoindex                 {DW\_AT\_location}}
+\newcommand{\DWATlocationLL}{\livelink{chap:DWATlocation}{DW\_AT\_location}}
+\newcommand{\DWATlowerbound}  {\addtoindex                   {DW\_AT\_lower\_bound}}
+\newcommand{\DWATlowerboundLL}{\livelink{chap:DWATlowerbound}{DW\_AT\_lower\_bound}}
+\newcommand{\DWATmacroinfo}  {\addtoindex                  {DW\_AT\_macro\_info}}
+\newcommand{\DWATmacroinfoLL}{\livelink{chap:DWATmacroinfo}{DW\_AT\_macro\_info}}
+\newcommand{\DWATname}  {\addtoindex             {DW\_AT\_name}}
+\newcommand{\DWATnameLL}{\livelink{chap:DWATname}{DW\_AT\_name}}
+\newcommand{\DWATordering}  {\addtoindex                 {DW\_AT\_ordering}}
+\newcommand{\DWATorderingLL}{\livelink{chap:DWATordering}{DW\_AT\_ordering}}
+\newcommand{\DWATranges}  {\addtoindex               {DW\_AT\_ranges}}
+\newcommand{\DWATrangesLL}{\livelink{chap:DWATranges}{DW\_AT\_ranges}}
+\newcommand{\DWATrank}{\addtoindex               {DW\_AT\_rank}}
+\newcommand{\DWATrankLL}{\livelink{chap:DWATrank}{DW\_AT\_rank}}
+\newcommand{\DWATsibling}  {\addtoindexx               {DW\_AT\_sibling}}
+\newcommand{\DWATsiblingLL}{\livelink{chap:DWATsibling}{DW\_AT\_sibling}}
+\newcommand{\DWATstmtlist}  {\addtoindex                 {DW\_AT\_stmt\_list}}
+\newcommand{\DWATstmtlistLL}{\livelink{chap:DWATstmtlist}{DW\_AT\_stmt\_list}}
+\newcommand{\DWATstringlength}  {\addtoindex                     {DW\_AT\_string\_length}}
+\newcommand{\DWATstringlengthLL}{\livelink{chap:DWATstringlength}{DW\_AT\_string\_length}}
+\newcommand{\DWATstringlengthbitsize}  {\addtoindex                            {DW\_AT\_string\_length\_bit\_size}}
+\newcommand{\DWATstringlengthbitsizeLL}{\livelink{chap:DWATstringlengthbitsize}{DW\_AT\_string\_length\_bit\_size}}
+\newcommand{\DWATstringlengthbytesize}  {\addtoindex                             {DW\_AT\_string\_length\_byte\_size}}
+\newcommand{\DWATstringlengthbytesizeLL}{\livelink{chap:DWATstringlengthbytesize}{DW\_AT\_string\_length\_byte\_size}}
+\newcommand{\DWATtype}  {\addtoindex             {DW\_AT\_type}}
+\newcommand{\DWATtypeLL}{\livelink{chap:DWATtype}{DW\_AT\_type}}
+\newcommand{\DWATupperbound}  {\addtoindex                   {DW\_AT\_upper\_bound}}
+\newcommand{\DWATupperboundLL}{\livelink{chap:DWATupperbound}{DW\_AT\_upper\_bound}}
 %
 % DW_FORM
 %
 %
 % DW_OP
 %
-\newcommand{\DWOPcallref}[1][]{\addtoindex{DW\_OP\_call\_ref}}
-\newcommand{\DWOPconst}{\addtoindex{DW\_OP\_const}}
-\newcommand{\DWOPformtlsaddress}{\addtoindex{DW\_OP\_form\_tls\_address}}
+\newcommand{\DWOPcallref}  {\addtoindex                {DW\_OP\_call\_ref}}
+\newcommand{\DWOPcallrefLL}{\livelink{chap:DWOPcallref}{DW\_OP\_call\_ref}}
+\newcommand{\DWOPconst}  {\addtoindex              {DW\_OP\_const}}
+\newcommand{\DWOPconstLL}{\livelink{chap:DWOPconst}{DW\_OP\_const}}
+\newcommand{\DWOPderef}  {\addtoindex              {DW\_OP\_deref}}
+\newcommand{\DWOPderefLL}{\livelink{chap:DWOPderef}{DW\_OP\_deref}}
+\newcommand{\DWOPformtlsaddress}  {\addtoindex                       {DW\_OP\_form\_tls\_address}}
+\newcommand{\DWOPformtlsaddressLL}{\livelink{chap:DWOPformtlsaddress}{DW\_OP\_form\_tls\_address}}
+\newcommand{\DWOPlit}  {\addtoindex            {DW\_OP\_lit}}
+\newcommand{\DWOPlitLL}{\livelink{chap:DWOPlit}{DW\_OP\_lit}}
+\newcommand{\DWOPmult}  {\addtoindex             {DW\_OP\_mult}}
+\newcommand{\DWOPmultLL}{\livelink{chap:DWOPmult}{DW\_OP\_mult}}
+\newcommand{\DWOPplus}  {\addtoindex             {DW\_OP\_plus}}
+\newcommand{\DWOPplusLL}{\livelink{chap:DWOPplus}{DW\_OP\_plus}}
+\newcommand{\DWOPpushobjectaddress}  {\addtoindex                          {DW\_OP\_push\_object\_address}}
+\newcommand{\DWOPpushobjectaddressLL}{\livelink{chap:DWOPpushobjectaddress}{DW\_OP\_push\_object\_address}}
 %
 % DW_ORD
 %
-\newcommand{\DWORDcolmajor}{\addtoindex{DW\_ORD\_col\_major}}
-\newcommand{\DWORDrowmajor}{\addtoindex{DW\_ORD\_row\_major}}
+\newcommand{\DWORDcolmajor}  {\addtoindex                  {DW\_ORD\_col\_major}}
+\newcommand{\DWORDcolmajorLL}{\livelink{chap:DWORDcolmajor}{DW\_ORD\_col\_major}}
+\newcommand{\DWORDrowmajor}  {\addtoindex                  {DW\_ORD\_row\_major}}
+\newcommand{\DWORDrowmajorLL}{\livelink{chap:DWORDrowmajor}{DW\_ORD\_row\_major}}
 %
 % DW_TAG
 %
-\newcommand{\DWTAGarraytype}{\addtoindex{DW\_TAG\_array\_type}}
-\newcommand{\DWTAGcoarraytype}{\addtoindex{DW\_TAG\_coarray\_type}}
-\newcommand{\DWTAGgenericsubrange}{\addtoindex{DW\_TAG\_generic\_subrange}}
-\newcommand{\DWTAGmember}{\addtoindex{DW\_TAG\_member}}
-\newcommand{\DWTAGsubrangetype}{\addtoindex{DW\_TAG\_subrange\_type}}
-\newcommand{\DWTAGvariable}{\addtoindex{DW\_TAG\_variable}}
+\newcommand{\DWTAGarraytype}  {\addtoindex                   {DW\_TAG\_array\_type}}
+\newcommand{\DWTAGarraytypeLL}{\livelink{chap:DWTAGarraytype}{DW\_TAG\_array\_type}}
+\newcommand{\DWTAGcoarraytype}  {\addtoindex                     {DW\_TAG\_coarray\_type}}
+\newcommand{\DWTAGcoarraytypeLL}{\livelink{chap:DWTAGcoarraytype}{DW\_TAG\_coarray\_type}}
+\newcommand{\DWTAGgenericsubrange}  {\addtoindex                        {DW\_TAG\_generic\_subrange}}
+\newcommand{\DWTAGgenericsubrangeLL}{\livelink{chap:DWTAGgenericsubtype}{DW\_TAG\_generic\_subrange}}
+\newcommand{\DWTAGmember}  {\addtoindex                {DW\_TAG\_member}}
+\newcommand{\DWTAGmemberLL}{\livelink{chap:DWTAGmember}{DW\_TAG\_member}}
+\newcommand{\DWTAGsubrangetype}  {\addtoindex                      {DW\_TAG\_subrange\_type}}
+\newcommand{\DWTAGsubrangetypeLL}{\livelink{chap:DWTAGsubrangetype}{DW\_TAG\_subrange\_type}}
+\newcommand{\DWTAGvariable}  {\addtoindex                  {DW\_TAG\_variable}}
+\newcommand{\DWTAGvariableLL}{\livelink{chap:DWTAGvariable}{DW\_TAG\_variable}}
 %
 % .debug, et al
 %
index 744a095..12ae92d 100644 (file)
@@ -574,14 +574,14 @@ illustrated in Figure \refersec{fig:FortranscalarcoarrayDWARFdescription}.
 \begin{figure}[!h]
 \begin{dwflisting}
 \begin{alltt}
-10\$:  \DWTAGcoarraytype
-        \DWATtype(reference to INTEGER)
-        \DWTAGsubrangetype                ! Note omitted upper bound                   
-            \DWATlowerbound(constant 1)
-
-11\$:  \DWTAGvariable
-        \DWATname("X")
-        \DWATtype(reference to coarray type at 10\$)
+10\$:  \DWTAGcoarraytypeLL
+        \DWATtypeLL(reference to INTEGER)
+        \DWTAGsubrangetypeLL                ! Note omitted upper bound                 
+            \DWATlowerboundLL(constant 1)
+
+11\$:  \DWTAGvariableLL
+        \DWATnameLL("X")
+        \DWATtypeLL(reference to coarray type at 10\$)
 \end{alltt}
 \end{dwflisting}
 \caption{Fortran scalar coarray: DWARF description}
@@ -605,21 +605,21 @@ illustrated in Figure \refersec{fig:FortranarraycoarrayDWARFdescription}.
 \begin{figure}[here]
 \begin{dwflisting}
 \begin{alltt}
-10\$: \DWTAGarraytype
-        \DWATordering(\DWORDcolmajor)
-        \DWATtype(reference to INTEGER)
-11\$:    \DWTAGsubrangetype
-            \DWATlowerbound(constant 1)
-            \DWATupperbound(constant 10)
-
-12\$: \DWTAGcoarraytype
-        \DWATtype(reference to array type at 10\$)
-13\$:    \DWTAGsubrangetype                ! Note omitted upper bound
-            \DWATlowerbound(constant 1)
-
-14$: \DWTAGvariable
-        \DWATname("X")
-        \DWATtype(reference to coarray type at 12\$)
+10\$: \DWTAGarraytypeLL
+        \DWATorderingLL(\DWORDcolmajorLL)
+        \DWATtypeLL(reference to INTEGER)
+11\$:    \DWTAGsubrangetypeLL
+            \DWATlowerboundLL(constant 1)
+            \DWATupperboundLL(constant 10)
+
+12\$: \DWTAGcoarraytypeLL
+        \DWATtypeLL(reference to array type at 10\$)
+13\$:    \DWTAGsubrangetypeLL                ! Note omitted upper bound
+            \DWATlowerboundLL(constant 1)
+
+14$: \DWTAGvariableLL
+        \DWATnameLL("X")
+        \DWATtypeLL(reference to coarray type at 12\$)
 \end{alltt}
 \end{dwflisting}
 \caption{Fortran array coarray: DWARF description}
@@ -643,33 +643,33 @@ illustrated in Figure \refersec{fig:FortranmultidimensionalcoarrayDWARFdescripti
 \begin{figure}[here]
 \begin{dwflisting}
 \begin{alltt}
-10\$: \DWTAGarraytype
-        \DWATordering(\DWORDcolmajor)
-        \DWATtype(reference to INTEGER)
-11\$:    \DWTAGsubrangetype
-            \DWATlowerbound(constant 1)
-            \DWATupperbound(constant 10)
-12\$:    \DWTAGsubrangetype
-            \DWATlowerbound(constant  1)
-            \DWATupperbound(constant 11)
-13\$:    \DWTAGsubrangetype
-            \DWATlowerbound(constant  1)
-            \DWATupperbound(constant 12)
-
-14\$: \DWTAGcoarraytype
-        \DWATtype(reference to array_type at 10\$)
-15\$:    \DWTAGsubrangetype
-            \DWATlowerbound(constant 1)
-            \DWATupperbound(constant 2)
-16\$:    \DWTAGsubrangetype
-            \DWATlowerbound(constant 1)
-            \DWATupperbound(constant 3)
-17\$:    \DWTAGsubrangetype                ! Note omitted upper bound
-            \DWATlowerbound(constant 1)
-
-18\$: \DWTAGvariable
-        \DWATname("X")
-        \DWATtype(reference to coarray type at 14\$)
+10\$: \DWTAGarraytypeLL
+        \DWATorderingLL(\DWORDcolmajorLL)
+        \DWATtypeLL(reference to INTEGER)
+11\$:    \DWTAGsubrangetypeLL
+            \DWATlowerboundLL(constant 1)
+            \DWATupperboundLL(constant 10)
+12\$:    \DWTAGsubrangetypeLL
+            \DWATlowerboundLL(constant  1)
+            \DWATupperboundLL(constant 11)
+13\$:    \DWTAGsubrangetypeLL
+            \DWATlowerboundLL(constant  1)
+            \DWATupperboundLL(constant 12)
+
+14\$: \DWTAGcoarraytypeLL
+        \DWATtypeLL(reference to array_type at 10\$)
+15\$:    \DWTAGsubrangetypeLL
+            \DWATlowerboundLL(constant 1)
+            \DWATupperboundLL(constant 2)
+16\$:    \DWTAGsubrangetypeLL
+            \DWATlowerboundLL(constant 1)
+            \DWATupperboundLL(constant 3)
+17\$:    \DWTAGsubrangetypeLL                ! Note omitted upper bound
+            \DWATlowerboundLL(constant 1)
+
+18\$: \DWTAGvariableLL
+        \DWATnameLL("X")
+        \DWATtypeLL(reference to coarray type at 14\$)
 \end{alltt}
 \end{dwflisting}
 \caption{Fortran multidimensional coarray: DWARF description}
@@ -680,13 +680,14 @@ illustrated in Figure \refersec{fig:FortranmultidimensionalcoarrayDWARFdescripti
 \clearpage
 \subsection{Fortran 2008 Assumed-rank Array Example}
 \label{app:assumedrankexample}
+\addtoindexx{array!assumed-rank}
 Consider the example in Figure~\ref{fig:assumedrankdecl}, which shows
 an assumed-rank array in Fortran~2008 with
 supplement~29113:\footnote{Technical Specification ISO/IEC TS
   29113:2012 \emph{Further Interoperability of Fortran with C}}
 
 \begin{figure}[!h]
-\begin{lstlisting}[language={[95]Fortran}]
+\begin{lstlisting}
   subroutine foo(x)
     real :: x(..)
 
@@ -698,11 +699,12 @@ supplement~29113:\footnote{Technical Specification ISO/IEC TS
 \label{fig:assumedrankdecl}
 \end{figure}
 
-Let's assume the Fortran compiler used an array descriptor that looks
+Let's assume the Fortran compiler used an array descriptor that
+(in \addtoindex{C}) looks
 like the one shown in Figure~\ref{fig:arraydesc}.
 
 \begin{figure}[!h]
-\begin{lstlisting}[language=C]
+\begin{lstlisting}
   struct array_descriptor {
     void *base_addr;
     int rank;
@@ -721,75 +723,70 @@ like the one shown in Figure~\ref{fig:arraydesc}.
 \end{figure}
 
 The DWARF type for the array \emph{x} can be described as shown in
-Figure~\ref{fig:assumedrankdwarf}.
+Figure~\refersec{fig:assumedrankdwarf}.
 
 \begin{figure}[!h]
-\begin{minipage}[t]{\linewidth}
-\centering
-Abbreviation Table: \dotdebugabbrev{}
-\begin{framed}
-\scriptsize
+\begin{dwflisting}
 \begin{alltt}
-10\$:  \DWTAGarraytype
-         \livelink{chap:DWATtype}{DW\_AT\_type}(reference to real)
-         \livelink{chap:DWATrank}{DW\_AT\_rank}(expression=
-             \livelink{chap:DWOPpushobjectaddress}{DW\_OP\_push\_object\_address}
-             \livelink{chap:DWOPlit}{DW\_OP\_lit}<offset of rank in descriptor>
-             \livelink{chap:DWOPplus}{DW\_OP\_plus}
-             \livelink{chap:DWOPderef}{DW\_OP\_deref})
-         \livelink{chap:DWATdatalocation}{DW\_AT\_data\_location}(expression=
-             \livelink{chap:DWOPpushobjectaddress}{DW\_OP\_push\_object\_address}
-             \livelink{chap:DWOPlit}{DW\_OP\_lit}<offset of data in descriptor>
-             \livelink{chap:DWOPplus}{DW\_OP\_plus}
-             \livelink{chap:DWOPderef}{DW\_OP\_deref})
-11\$:    \DWTAGgenericsubrange
-             \livelink{chap:DWATtype}{DW\_AT\_type}(reference to integer)
-             \livelink{chap:DWATlowerbound}{DW\_AT\_lower\_bound}(expression=
+10\$:  \DWTAGarraytypeLL
+         \DWATtypeLL(reference to real)
+         \DWATrankLL(expression=
+             \DWOPpushobjectaddressLL
+             \DWOPlitLL<offset of rank in descriptor>
+             \DWOPplusLL
+             \DWOPderefLL)
+         \DWATdatalocationLL(expression=
+             \DWOPpushobjectaddressLL
+             \DWOPlitLL<offset of data in descriptor>
+             \DWOPplusLL
+             \DWOPderefLL)
+11\$:    \DWTAGgenericsubrangeLL
+             \DWATtypeLL(reference to integer)
+             \DWATlowerboundLL(expression=
              !   Looks up the lower bound of dimension i.
-      
              !   Operation                              ! Stack effect
              !   (implicit)                             ! i                                                                     
-                 \livelink{chap:DWOPlit}{DW\_OP\_lit}<byte size of struct dim>     ! i sizeof(dim)
-                 \livelink{chap:DWOPmult}{DW\_OP\_mult}                             ! dim[i]
-                 \livelink{chap:DWOPlit}{DW\_OP\_lit}<offset of dim in descriptor> ! dim[i] offset
-                 \livelink{chap:DWOPplus}{DW\_OP\_plus}                             ! dim[i]+offset
-                 \livelink{chap:DWOPpushobjectaddress}{DW\_OP\_push\_object\_address}              ! dim[i]+offset objptr
-                 \livelink{chap:DWOPplus}{DW\_OP\_plus}                             ! objptr.dim[i]
-                 \livelink{chap:DWOPlit}{DW\_OP\_lit}<offset of lowerbound in dim> ! objptr.dim[i] offset
-                 \livelink{chap:DWOPplus}{DW\_OP\_plus}                             ! objptr.dim[i].lowerbound
-                 \livelink{chap:DWOPderef}{DW\_OP\_deref})                           ! *objptr.dim[i].lowerbound
+                 \DWOPlitLL<byte size of struct dim>     ! i sizeof(dim)
+                 \DWOPmultLL                             ! dim[i]
+                 \DWOPlitLL<offset of dim in descriptor> ! dim[i] offset
+                 \DWOPplusLL                             ! dim[i]+offset
+                 \DWOPpushobjectaddressLL              ! dim[i]+offset objptr
+                 \DWOPplusLL                             ! objptr.dim[i]
+                 \DWOPlitLL<offset of lowerbound in dim> ! objptr.dim[i] offset
+                 \DWOPplusLL                             ! objptr.dim[i].lowerbound
+                 \DWOPderefLL)                           ! *objptr.dim[i].lowerbound
              \livelink{chap:DWATupperbound}{DW\_AT\_upper\_bound}(expression=
              !   Looks up the upper bound of dimension i.
-                 \livelink{chap:DWOPlit}{DW\_OP\_lit}<byte size of dim>
-                 \livelink{chap:DWOPmult}{DW\_OP\_mult}
-                 \livelink{chap:DWOPlit}{DW\_OP\_lit}<offset of dim in descriptor>
-                 \livelink{chap:DWOPplus}{DW\_OP\_plus}
-                 \livelink{chap:DWOPpushobjectaddress}{DW\_OP\_push\_object\_address}
-                 \livelink{chap:DWOPplus}{DW\_OP\_plus}
-                 \livelink{chap:DWOPlit}{DW\_OP\_lit}<offset of upperbound in dim>
-                 \livelink{chap:DWOPplus}{DW\_OP\_plus}
-                 \livelink{chap:DWOPderef}{DW\_OP\_deref})
-             \livelink{chap:DWATbytestride}{DW\_AT\_byte\_stride}(expression=
+                 \DWOPlitLL<byte size of dim>
+                 \DWOPmultLL
+                 \DWOPlitLL<offset of dim in descriptor>
+                 \DWOPplusLL
+                 \DWOPpushobjectaddressLL
+                 \DWOPplusLL
+                 \DWOPlitLL<offset of upperbound in dim>
+                 \DWOPplusLL
+                 \DWOPderefLL)
+             \DWATbytestrideLL(expression=
              !   Looks up the byte stride of dimension i.
                  ...
              !   (analogous to DW\_AT\_upper\_bound)
                  )
 \end{alltt}
-\end{framed}
-\end{minipage}
+\end{dwflisting}
 \caption{Sample DWARF for the array descriptor in Figure~\ref{fig:arraydesc}}
 \label{fig:assumedrankdwarf}
 \end{figure}
 
 The layout of the array descriptor is not specified by the Fortran
-standard unless the array is explicitly marked as C-interoperable. To
+standard unless the array is explicitly marked as \addtoindex{C-interoperable}. To
 get the bounds of an assumed-rank array, the expressions in the
-\DWTAGgenericsubrange{} type need to be evaluated for each of the
-\DWATrank{} dimensions as shown the pseudocode in
-Figure~\ref{fig:assumedrankdwarfparser}.
+\DWTAGgenericsubrangeLL
+entry need to be evaluated for each of the
+\DWATrankLL dimensions as shown by the pseudocode in
+Figure~\refersec{fig:assumedrankdwarfparser}.
 
 \begin{figure}[!h]
-\begin{lstlisting}[language=C]
+\begin{lstlisting}
     typedef struct {
         int lower, upper, stride;
     } dims_t;
@@ -802,7 +799,8 @@ Figure~\ref{fig:assumedrankdwarfparser}.
     array_t get_dynamic_array_dims(DW_TAG_array a) {
       array_t result;
 
-      // Evaluate the DW_AT_rank expression to get the number of dimensions.
+      // Evaluate the DW_AT_rank expression to get the 
+      //    number of dimensions.
       dwarf_stack_t stack;
       dwarf_eval(stack, a.rank_expr);
       result.rank = dwarf_pop(stack); 
@@ -810,7 +808,8 @@ Figure~\ref{fig:assumedrankdwarfparser}.
 
       // Iterate over all dimensions and find their bounds.
       for (int i = 0; i < result.rank; i++) {
-        // Evaluate the generic subrange's DW_AT_lower expression for dimension i.
+        // Evaluate the generic subrange's DW_AT_lower 
+        //    expression for dimension i.
         dwarf_push(stack, i);
         assert( stack.size == 1 );
         dwarf_eval(stack, a.generic_subrange.lower_expr);
index 3f642d9..d1a3000 100644 (file)
@@ -37,7 +37,7 @@ described in Chapters 3, 4 and 5.
 \livelink{chap:DWTAGbasetype}{DW\_TAG\_base\_type},
 \livelink{chap:DWTAGcatchblock}{DW\_TAG\_catch\_block},
 \livelink{chap:DWTAGclasstype}{DW\_TAG\_class\_type},
-\livelink{chap:DWTAGcoarraytype}{DW\_TAG\_coarray\_type},
+\DWTAGcoarraytypeLL,
 \livelink{chap:DWTAGcommonblock}{DW\_TAG\_common\_block},
 \livelink{chap:DWTAGcommoninclusion}{DW\_TAG\_common\_inclusion},
 \livelink{chap:DWTAGcompileunit}{DW\_TAG\_compile\_unit},
@@ -45,13 +45,13 @@ described in Chapters 3, 4 and 5.
 \livelink{chap:DWTAGconsttype}{DW\_TAG\_const\_type},
 \livelink{chap:DWTAGconstant}{DW\_TAG\_constant},
 \livelink{chap:DWTAGdwarfprocedure}{DW\_TAG\_dwarf\_procedure},
-\livelink{chap:DWTAGgenericsubrange}{DW\_TAG\_generic\_subrange},
 \livelink{chap:DWTAGentrypoint}{DW\_TAG\_entry\_point},
 \livelink{chap:DWTAGenumerationtype}{DW\_TAG\_enumeration\_type},
 \livelink{chap:DWTAGenumerator}{DW\_TAG\_enumerator},
 \livelink{chap:DWTAGfiletype}{DW\_TAG\_file\_type},
 \livelink{chap:DWTAGformalparameter}{DW\_TAG\_formal\_parameter},
 \livelink{chap:DWTAGfriend}{DW\_TAG\_friend},
+\DWTAGgenericsubrangeLL,
 \livelink{chap:DWTAGimporteddeclaration}{DW\_TAG\_imported\_declaration},
 \livelink{chap:DWTAGimportedmodule}{DW\_TAG\_imported\_module},
 \livelink{chap:DWTAGimportedunit}{DW\_TAG\_imported\_unit},
@@ -336,7 +336,7 @@ actually declared in the source}{objects or types that are not actually declared
 \livetarg{chap:DWATranges}{DW\_AT\_ranges}
 &\livelinki{chap:DWATrangesnoncontiguousrangeofcodeaddresses}{Non-contiguous range of code addresses}{non-contiguous range of code addresses} \\
 \livetarg{chap:DWATrank}{DW\_AT\_rank}
-&\livelinki{chap:DWATrank}{Dynamic number of array dimensions}{dynamic number of array dimensions} \\
+&\livelinki{chap:DWATrankofdynamicarray}{Dynamic number of array dimensions}{dynamic number of array dimensions} \\
 \livetarg{chap:DWATrecursive}{DW\_AT\_recursive}
 &\livelinki{chap:DWATrecursiverecursivepropertyofasubroutine}{Recursive property of a subroutine}{recursive property of a subroutine} \\
 \livetarg{chap:DWATreturnaddr}{DW\_AT\_return\_addr}
@@ -2262,14 +2262,14 @@ rules of the applicable programming language.
 \livelink{chap:DWATassociated}{DW\_AT\_associated}, 
 \livelink{chap:DWATbitoffset}{DW\_AT\_bit\_offset}, 
 \livelink{chap:DWATbitsize}{DW\_AT\_bit\_size},
-\livelink{chap:DWATbytesize}{DW\_AT\_byte\_size}, 
+\livelink{chap:DWATbitstride}{DW\_AT\_bit\_stride},
+\livelink{chap:DWATbytesize}{DW\_AT\_byte\_size},
+\livelink{chap:DWATbytestride}{DW\_AT\_byte\_stride}, 
 \livelink{chap:DWATcount}{DW\_AT\_count}, 
 \livelink{chap:DWATlowerbound}{DW\_AT\_lower\_bound},
-\livelink{chap:DWATbytestride}{DW\_AT\_byte\_stride}, 
-\livelink{chap:DWATbitstride}{DW\_AT\_bit\_stride},
+\DWATrankLL,
 \livelink{chap:DWATupperbound}{DW\_AT\_upper\_bound},
-\livelink{chap:DWATrank}{DW\_AT\_rank},
- (and possibly others).}
+(and possibly others).}
 
 \needlines{6}
 \section{Entity Descriptions}
index f1a17f0..28ebd37 100644 (file)
@@ -138,7 +138,7 @@ Format since Version 4 was published. The list is not meant to be exhaustive.
 \begin{itemize}
 \item TBD...
 \item Added a new attribute, \DWATrank{}, to describe the dimensionality of
-an array.
+an array with dynamic rank.
 \item Added a new tag, \DWTAGgenericsubrange{}, to describe the
 bounds of Fortran assumed-rank arrays.
 
@@ -149,7 +149,7 @@ DWARF Version 5 is compatible with DWARF Version 4 except as follows:
 \item A location list entry (see Section \refersec{chap:locationlists}) with 
 the address range (0, \doublequote{-1}) is defined as the new default location 
 list entry.
-\item In a string type (see Section \refersec{chap:stringtypeentries}, a \DWATbytesize{}
+\item In a string type (see Section \refersec{chap:stringtypeentries}), a \DWATbytesize{}
 attribute is defined to always describe the size of the string type. (Previously
 it described the size of the optional string length data field if the \DWATstringlength{}
 attribute was present.)
index d406644..bc93fd2 100644 (file)
@@ -596,7 +596,7 @@ attribute
 \addtoindexx{language attribute}
 of the enclosing compilation unit entry) is assumed.
 
-\begin{simplenametable}[1.6in]{Array ordering}{tab:arrayordering}
+\begin{simplenametable}[1.8in]{Array ordering}{tab:arrayordering}
 \livetarg{chap:DWORDcolmajor}{DW\_ORD\_col\_major} \\
 \livetarg{chap:DWORDrowmajor}{DW\_ORD\_row\_major} \\
 \end{simplenametable}
@@ -661,13 +661,17 @@ first, next to leftmost second, and so on).
 be represented by a debugging information entry for a
 multidimensional array.}
 
-\hypertarget{chap:DWTAGgenericsubrange}
-Alternatively, the array dimensions can also be described with the
-\DWTAGgenericsubrange, which contains only a single, generic
-expression describing each of the attributes. If \DWTAGgenericsubrange
-is used, the number dimensions must be stored in the
-\livelink{chap:DWATrank}{DW\_AT\_rank} attribute. See also Section
-\ref{chap:DWATrank}, Dynamic Type Properties: Array Rank.
+Alternatively, for an array with dynamic rank the array dimensions 
+are described by a debugging information entry with the tag
+\livetarg{chap:DWTAGgenericsubrange}{DW\_TAG\_generic\_subrange}.
+This entry has the same attributes as a
+\livelink{DWTAGsubrangetype}{DW\_TAG\_subrange\_type} entry; however,
+there is just one \DWTAGgenericsubrange{} entry and it describes all of the
+dimensions of the array.
+If \DWTAGgenericsubrange{}
+is used, the number of dimensions must be specified using a
+\DWATrankLL{} attribute. See also Section
+\refersec{chap:DWATrank}.
 
 
 \needlines{5}
@@ -693,21 +697,21 @@ indexed using a \doublequote{coindex} or multiple \doublequote{coindices}.
 }
 
 A coarray type is represented by a debugging information entry 
-with the tag \livetarg{chap:DWTAGcoarraytype}{DW\_TAG\_coarray\_type}.
+with the tag \DWTAGcoarraytype.
 If a name has been given to the 
 coarray type in the source, then the corresponding coarray type 
-entry has a \DWATname{} attribute whose value is a null-terminated 
+entry has a \DWATnameLL{} attribute whose value is a null-terminated 
 string containing the array type name as it appears in the source 
 program.
 
-A coarray entry has one or more \DWTAGsubrangetype{} child entries,
-one for each codimension. It also has a \DWATtype{} attribute 
+A coarray entry has one or more \DWTAGsubrangetypeLL{} child entries,
+one for each codimension. It also has a \DWATtypeLL{} attribute 
 describing the type of each element of the coarray.
 
 \textit{In a coarray application, the run-time number of processes in the application
 is part of the coindex calculation.  It is represented in the Fortran source by
 a coindex which is declared with a \doublequote{*} as the upper bound.  To express this
-concept in DWARF, the \DWTAGsubrangetype{} child entry for that index has 
+concept in DWARF, the \DWTAGsubrangetypeLL{} child entry for that index has 
 only a lower bound and no upper bound.}
 
 \textit{How coarray elements are located and how coindices are 
@@ -1958,10 +1962,9 @@ whose value is a null\dash terminated
 string containing the subrange type name as it appears in
 the source program.
 
-The tag
-\livelink{chap:DWTAGgenericsubrange}{DW\_TAG\_generic\_subrange} is
+The tag \DWTAGgenericsubrangeLL is
 used to describe arrays with a dynamic rank. See Section
-\ref{chap:DWTAGgenericsubrange}.
+\refersec{chap:DWTAGgenericsubrange}.
 
 The subrange entry may have 
 \addtoindexx{type attribute}
@@ -2304,21 +2307,25 @@ see Appendix \refersec{app:aggregateexamples}.}
 
 \subsection{Array Rank}
 \label{chap:DWATrank}
-\textit{The Fortran language supports ``assumed-rank arrays''. The
+\addtoindexx{array!assumed-rank}
+\addtoindexx{assumed-rank array|see{array, assumed-rank}}
+\textit{The Fortran language supports \doublequote{assumed-rank arrays}. The
   rank (the number of dimensions) of an assumed-rank array is unknown
   at compile time. The Fortran runtime stores the rank in the array
   descriptor metadata.}
 
-The presence of \DWATrank{} indicates that an array's rank
+The presence of the
+\livetarg{chap:DWATrankofdynamicarray}{DW\_AT\_rank} attribute
+indicates that an array's rank
 (dimensionality) is dynamic, and therefore unknown at compile
-time. \DWATrank{} contains an expression that can be evaluated to look
-up the dynamic rank from the array descriptor.
-
-The dimensions of an array with dynamic rank are described using the
-\DWTAGgenericsubrange{} tag. The \DWTAGgenericsubrange{} tag is the
-dynamic rank array equivalent of
-\livelink{chap:DWTAGsubrangetype}{DW\_TAG\_subrange\_type}. The
-difference is that a \DWTAGgenericsubrange{} contains generic
+time. The value of the \DWATrank{} attribute is either an integer constant
+or a location expression whose evaluation yields the dynamic rank.
+
+The bounds of an array with dynamic rank are described using the
+\DWTAGgenericsubrangeLL{} tag, which  
+is the dynamic rank array equivalent of
+\DWTAGsubrangetypeLL. The
+difference is that a \DWTAGgenericsubrangeLL{} contains generic
 lower/upper bound and stride expressions that need to be evaluated for
 each dimension: Before any expression contained in a
 \DWTAGgenericsubrange{} can be evaluated, the dimension for which the
@@ -2337,7 +2344,7 @@ Dimensions are enumerated $0$ to $\mathit{rank}-1$ in a left-to-right
 fashion.
 
 \textit{For an example in Fortran 2008, see
-  Section~\ref{app:assumedrankexample}.}
+  Section~\refersec{app:assumedrankexample}.}
 
 
 \section{Template Alias Entries}