From b7deafb367f6ba859eb53209634975c007bb4282 Mon Sep 17 00:00:00 2001 From: Ron Brender Date: Sun, 18 Dec 2016 12:42:36 -0500 Subject: [PATCH] Checkpoint work to date... Signed-off-by: Ron Brender --- dwarf5/latexdoc/Makefile | 2 +- dwarf5/latexdoc/changesummary.tex | 1 + dwarf5/latexdoc/datarepresentation.tex | 101 +++++++++++++++--- dwarf5/latexdoc/dwarf5.tex | 4 +- dwarf5/latexdoc/dwarfnamecmds.tex | 3 +- dwarf5/latexdoc/examples.tex | 7 ++ dwarf5/latexdoc/introduction.tex | 10 +- dwarf5/latexdoc/otherdebugginginformation.tex | 18 +++- 8 files changed, 123 insertions(+), 23 deletions(-) diff --git a/dwarf5/latexdoc/Makefile b/dwarf5/latexdoc/Makefile index 4ffabde..e34f685 100644 --- a/dwarf5/latexdoc/Makefile +++ b/dwarf5/latexdoc/Makefile @@ -27,7 +27,7 @@ clean: -rm -f *.lot -rm -f *.out -rm -f *.ps - -rm -f *.cb + -rm -f *.cb -rm -f p2.txt archive: sh bldtar.sh diff --git a/dwarf5/latexdoc/changesummary.tex b/dwarf5/latexdoc/changesummary.tex index bc94567..1c31c71 100644 --- a/dwarf5/latexdoc/changesummary.tex +++ b/dwarf5/latexdoc/changesummary.tex @@ -15,6 +15,7 @@ This change summary is included only in draft versions of this document. \begin{longtable}{ll} \textbf{Date} & \textbf{Issue Incorporated or Other Change} \\ \hline \\ \endhead +12/18/2016 & Changes from meeting of 12/6/2016 \\ 10/10-11/26/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 \\ diff --git a/dwarf5/latexdoc/datarepresentation.tex b/dwarf5/latexdoc/datarepresentation.tex index ca3f856..61cda44 100644 --- a/dwarf5/latexdoc/datarepresentation.tex +++ b/dwarf5/latexdoc/datarepresentation.tex @@ -686,12 +686,22 @@ entries referenced from within location descriptions or using loclistsptr form attributes must not be moved to a \addtoindex{supplementary object file}. Executable or shared object file compilation units can use -\DWTAGimportedunit{} with \DWFORMrefsup{} form \DWATimport{} attribute -to import entries from the \addtoindex{supplementary object file}, other \DWFORMrefsup{} +\DWTAGimportedunit{} with +\bb +an \DWATimport{} attribute that uses \DWFORMrefsupfour{} or \DWFORMrefsupeight{} +\eb +to import entries from the \addtoindex{supplementary object file}, other +\bb +\DWFORMrefsupfour{} or \DWFORMrefsupeight{} +\eb attributes to refer to them and \DWFORMstrpsup{} form attributes to refer to strings that are used by debug information of multiple executables or shared object files. Within the \addtoindex{supplementary object file}'s -debugging sections, form \DWFORMrefsup{} or \DWFORMstrpsup{} are +debugging sections, form +\bb +\DWFORMrefsupfour{}, \DWFORMrefsupeight{} +\eb +or \DWFORMstrpsup{} are not used, and all reference forms referring to some other sections refer to the local sections in the \addtoindex{supplementary object file}. @@ -799,8 +809,7 @@ format, the value is an 8-byte unsigned integer. Form & Role \\ \hline \DWFORMlinestrp & offset in \dotdebuglinestr \\ \DWFORMrefaddr & offset in \dotdebuginfo{} \\ -\DWFORMrefsup & offset in \dotdebuginfo{} section of a \mbox{supplementary} object file \\ - \addtoindexx{supplementary object file} +\bbeb \DWFORMsecoffset & offset in a section other than \\ & \dotdebuginfo{} or \dotdebugstr{} \\ \DWFORMstrp & offset in \dotdebugstr{} \\ @@ -1258,15 +1267,21 @@ Table \refersec{tab:tagencodings}. \DWTAGentrypoint&0x03 \\ \DWTAGenumerationtype&0x04 \\ \DWTAGformalparameter&0x05 \\ +\bbeb\textit{Reserved}&0x06 \\ +\bbeb\textit{Reserved}&0x07 \\ \DWTAGimporteddeclaration&0x08 \\ +\bbeb\textit{Reserved}&0x09 \\ \DWTAGlabel&0x0a \\ \DWTAGlexicalblock&0x0b \\ +\bbeb\textit{Reserved}&0x0c \\ \DWTAGmember&0x0d \\ +\bbeb\textit{Reserved}&0x0e \\ \DWTAGpointertype&0x0f \\ \DWTAGreferencetype&0x10 \\ \DWTAGcompileunit&0x11 \\ \DWTAGstringtype&0x12 \\ \DWTAGstructuretype&0x13 \\ +\bbeb\textit{Reserved}&0x14 \\ \DWTAGsubroutinetype&0x15 \\ \DWTAGtypedef&0x16 \\ \DWTAGuniontype&0x17 \\ @@ -1434,8 +1449,14 @@ Table \referfol{tab:attributeencodings}. \addtoindexx{location attribute} \\ \DWATname&0x03&\livelink{chap:classstring}{string} \addtoindexx{name attribute} \\ +\bbeb\textit{Reserved}&0x04&\textit{not applicable} \\ +\bbeb\textit{Reserved}&0x05&\textit{not applicable} \\ +\bbeb\textit{Reserved}&0x06&\textit{not applicable} \\ +\bbeb\textit{Reserved}&0x07&\textit{not applicable} \\ +\bbeb\textit{Reserved}&0x08&\textit{not applicable} \\ \DWATordering&0x09&\livelink{chap:classconstant}{constant} \addtoindexx{ordering attribute} \\ +\bbeb\textit{Reserved}&0x0a&\textit{not applicable} \\ \DWATbytesize&0x0b&\livelink{chap:classconstant}{constant}, \livelink{chap:classexprloc}{exprloc}, \livelink{chap:classreference}{reference} @@ -1452,6 +1473,8 @@ Table \referfol{tab:attributeencodings}. \livelink{chap:classexprloc}{exprloc}, \livelink{chap:classreference}{reference} \addtoindexx{bit size attribute} \\ +\bbeb\textit{Reserved}&0x0e&\textit{not applicable} \\ +\bbeb\textit{Reserved}&0x0f&\textit{not applicable} \\ \DWATstmtlist&0x10&\livelink{chap:classlineptr}{lineptr} \addtoindexx{statement list attribute} \\ \DWATlowpc&0x11&\livelink{chap:classaddress}{address} @@ -1461,6 +1484,7 @@ Table \referfol{tab:attributeencodings}. \addtoindexx{high PC attribute} \\ \DWATlanguage&0x13&\livelink{chap:classconstant}{constant} \addtoindexx{language attribute} \\ +\bbeb\textit{Reserved}&0x14&\textit{not applicable} \\ \DWATdiscr&0x15&\livelink{chap:classreference}{reference} \addtoindexx{discriminant attribute} \\ \DWATdiscrvalue&0x16&\livelink{chap:classconstant}{constant} @@ -1470,8 +1494,9 @@ Table \referfol{tab:attributeencodings}. \DWATimport&0x18&\livelink{chap:classreference}{reference} \addtoindexx{import attribute} \\ \DWATstringlength&0x19&\livelink{chap:classexprloc}{exprloc}, - \CLASSloclist - \addtoindexx{string length attribute} \\ + \CLASSloclist, +\bbeb \CLASSreference + \addtoindexx{string length attribute} \\ \DWATcommonreference&0x1a&\livelink{chap:classreference}{reference} \addtoindexx{common reference attribute} \\ \DWATcompdir&0x1b&\livelink{chap:classstring}{string} @@ -1486,6 +1511,7 @@ Table \referfol{tab:attributeencodings}. \livelink{chap:classreference}{reference}, \livelink{chap:classflag}{flag} \addtoindexx{default value attribute} \\ +\bbeb\textit{Reserved}&0x1f&\textit{not applicable} \\ \DWATinline&0x20&\livelink{chap:classconstant}{constant} \addtoindexx{inline attribute} \\ \DWATisoptional&0x21&\livelink{chap:classflag}{flag} @@ -1494,17 +1520,24 @@ Table \referfol{tab:attributeencodings}. \livelink{chap:classexprloc}{exprloc}, \livelink{chap:classreference}{reference} \addtoindexx{lower bound attribute} \\ +\bbeb\textit{Reserved}&0x23&\textit{not applicable} \\ +\bbeb\textit{Reserved}&0x24&\textit{not applicable} \\ \DWATproducer&0x25&\livelink{chap:classstring}{string} \addtoindexx{producer attribute} \\ +\bbeb\textit{Reserved}&0x26&\textit{not applicable} \\ \DWATprototyped&0x27&\livelink{chap:classflag}{flag} \addtoindexx{prototyped attribute} \\ +\bbeb\textit{Reserved}&0x28&\textit{not applicable} \\ +\bbeb\textit{Reserved}&0x29&\textit{not applicable} \\ \DWATreturnaddr&0x2a&\livelink{chap:classexprloc}{exprloc}, \CLASSloclist \addtoindexx{return address attribute} \\ +\bbeb\textit{Reserved}&0x2b&\textit{not applicable} \\ \DWATstartscope&0x2c& \livelink{chap:classconstant}{constant}, \CLASSrnglist \addtoindexx{start scope attribute} \\ +\bbeb\textit{Reserved}&0x2d&\textit{not applicable} \\ \DWATbitstride&0x2e&\livelink{chap:classconstant}{constant}, \livelink{chap:classexprloc}{exprloc}, \livelink{chap:classreference}{reference} @@ -1513,6 +1546,7 @@ Table \referfol{tab:attributeencodings}. \livelink{chap:classexprloc}{exprloc}, \livelink{chap:classreference}{reference} \addtoindexx{upper bound attribute} \\ +\bbeb\textit{Reserved}&0x30&\textit{not applicable} \\ \DWATabstractorigin&0x31&\livelink{chap:classreference}{reference} \addtoindexx{abstract origin attribute} \\ \DWATaccessibility&0x32&\livelink{chap:classconstant}{constant} @@ -2101,8 +2135,11 @@ The fourth type of reference is a reference from within the \dotdebuginfo{} section of the executable or shared object file to a debugging information entry in the \dotdebuginfo{} section of a \addtoindex{supplementary object file}. -This type of reference (\DWFORMrefsupTARG) is an offset from the -beginning of the \dotdebuginfo{} section in the +This type of reference (\DWFORMrefsupfourTARG{} +\bb +or \DWFORMrefsupeightTARG{}) is a 4- or 8-byte offset (respectively) +\eb +from the beginning of the \dotdebuginfo{} section in the \addtoindex{supplementary object file}. \textit{The use of compilation unit relative references will reduce the @@ -2256,7 +2293,7 @@ Table \referfol{tab:attributeformencodings}. \DWFORMflagpresent{} &0x19&\livelink{chap:classflag}{flag} \\ \DWFORMstrx{} \ddag &0x1a&\livelink{chap:classstring}{string} \\ \DWFORMaddrx{} \ddag &0x1b&\livelink{chap:classaddress}{address} \\ -\DWFORMrefsup{}~\ddag &0x1c &\livelink{chap:classreference}{reference} \\ +\DWFORMrefsupfour{}~\ddag &0x1c &\livelink{chap:classreference}{reference} \\ \DWFORMstrpsup{}~\ddag &0x1d &\livelink{chap:classstring}{string} \\ \DWFORMdatasixteen~\ddag &0x1e &\CLASSconstant \\ \DWFORMlinestrp~\ddag &0x1f &\CLASSstring \\ @@ -2264,6 +2301,7 @@ Table \referfol{tab:attributeformencodings}. \DWFORMimplicitconst~\ddag &0x21 &\CLASSconstant \\ \DWFORMloclistx~\ddag &0x22 &\CLASSloclist \\ \DWFORMrnglistx~\ddag &0x23 &\CLASSrnglist \\ +\DWFORMrefsupeight{}~\ddag &0x24 &\CLASSreference \\ \end{longtable} \end{centering} @@ -2416,11 +2454,14 @@ Table \refersec{tab:dwarfoperationencodings}. \hline \ddag\ \textit{New in DWARF Version 5} \endlastfoot +\bbeb\textit{Reserved}&0x01&-& \\ +\bbeb\textit{Reserved}&0x02&-& \\ \DWOPaddr&0x03&1 & constant address \\ & & &(size is target specific) \\ - +\bbeb\textit{Reserved}&0x04&-& \\ +\bbeb\textit{Reserved}&0x05&-& \\ \DWOPderef&0x06&0 & \\ - +\bbeb\textit{Reserved}&0x07&-& \\ \DWOPconstoneu&0x08&1&1-byte constant \\ \DWOPconstones&0x09&1&1-byte constant \\ \DWOPconsttwou&0x0a&1&2-byte constant \\ @@ -3513,12 +3554,18 @@ bytes of a segment selector on the target system. \item \HFNoffsetentrycount{} (\HFTuword) \\ A 4-byte count of the number of offsets that follow the header. +\bb +This count may be zero. +\eb \end{enumerate} 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. +\bb +If the \HFNoffsetentrycount{} is non-zero, there +\eb +is one offset for each range list. The contents of the $i$\textsuperscript{th} offset is the offset \bb @@ -3533,9 +3580,19 @@ in the 64-bit DWARF format, each offset is 8-bytes in size (see Section \refersec{datarep:32bitand64bitdwarfformats}). \eb +\textit{\bb +If the \HFNoffsetentrycount{} is zero, then \DWFORMrnglistx{} cannot +be used to access a range list; \DWFORMsecoffset{} must be used +instead. If the \HFNoffsetentrycount{} is non-zero, then \DWFORMrnglistx{} +may be used to access a range list; this is necessary in split units and +otherwise may be more compact than using \DWFORMsecoffset. +\eb +} + Range lists are described in Section \refersec{chap:noncontiguousaddressranges}. - + +\needlines{4} The segment size is given by the \HFNsegmentselectorsize{} field of the header, and the address size is given by the \addttindex{address\_size} field of the header. If the @@ -3587,12 +3644,18 @@ bytes of a segment selector on the target system. \item \HFNoffsetentrycount{} (\HFTuword) \\ A 4-byte count of the number of offsets that follow the header. +\bb +This count may be zero. +\eb \end{enumerate} Immediately following the header is an array of offsets. This array is followed by a series of location lists. -There is one offset for each location list. The contents +\bb +If the \HFNoffsetentrycount{} is non-zero, there +\eb +is one offset for each location list. The contents of the $i$\textsuperscript{th} offset is the offset \bb (an unsigned integer) @@ -3606,6 +3669,14 @@ in the 64-bit DWARF format, each offset is 8-bytes in size (see Section \refersec{datarep:32bitand64bitdwarfformats}). \eb +\textit{\bb +If the \HFNoffsetentrycount{} is zero, then \DWFORMloclistx{} cannot +be used to access a location list; \DWFORMsecoffset{} must be used +instead. If the \HFNoffsetentrycount{} is non-zero, then \DWFORMloclistx{} +may be used to access a location list; this is necessary in split units and +otherwise may be more compact than using \DWFORMsecoffset. +\eb +} Location lists are described in Section \refersec{chap:locationlists}. diff --git a/dwarf5/latexdoc/dwarf5.tex b/dwarf5/latexdoc/dwarf5.tex index 196d987..0278bda 100644 --- a/dwarf5/latexdoc/dwarf5.tex +++ b/dwarf5/latexdoc/dwarf5.tex @@ -3,14 +3,14 @@ % 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}{November 26, 2016} +\newcommand{\docdate}{December 18, 2016} % \usepackage{ifthen} \newcommand{\ifthen}[2]{\ifthenelse{#1}{#2}{}} \newboolean{isdraft}\setboolean{isdraft}{true} \newboolean{uselinenumbers}\setboolean{uselinenumbers}{true} \newboolean{usechangesummary}\setboolean{usechangesummary}{false} -\newcommand{\draftmark}{\ifthenelse{\boolean{isdraft}}{*** PRE-RELEASE STANDARD DRAFT ***}{}} +\newcommand{\draftmark}{\ifthenelse{\boolean{isdraft}}{***PRE-RELEASE STANDARD DRAFT \#2***}{}} % \usepackage[T1]{fontenc} \usepackage{palatino} diff --git a/dwarf5/latexdoc/dwarfnamecmds.tex b/dwarf5/latexdoc/dwarfnamecmds.tex index fbf0e3b..98eb7fd 100644 --- a/dwarf5/latexdoc/dwarfnamecmds.tex +++ b/dwarf5/latexdoc/dwarfnamecmds.tex @@ -307,7 +307,8 @@ \newdwfnamecommands{DWFORMrefeight}{DW\_FORM\_ref8} \newdwfnamecommands{DWFORMrefaddr}{DW\_FORM\_ref\_addr} \newdwfnamecommands{DWFORMrefsigeight}{DW\_FORM\_ref\_sig8} -\newdwfnamecommands{DWFORMrefsup}{DW\_FORM\_ref\_sup} +\newdwfnamecommands{DWFORMrefsupfour}{DW\_FORM\_ref\_sup4} +\newdwfnamecommands{DWFORMrefsupeight}{DW\_FORM\_ref\_sup8} \newdwfnamecommands{DWFORMrefudata}{DW\_FORM\_ref\_udata} \newdwfnamecommands{DWFORMsdata}{DW\_FORM\_sdata} \newdwfnamecommands{DWFORMsecoffset}{DW\_FORM\_sec\_offset} diff --git a/dwarf5/latexdoc/examples.tex b/dwarf5/latexdoc/examples.tex index 99370c5..d7a83b4 100644 --- a/dwarf5/latexdoc/examples.tex +++ b/dwarf5/latexdoc/examples.tex @@ -367,6 +367,13 @@ contained in register 5 upon entering the current subprogram. \textit{Note that unlike the previous \DWOPentryvalue{} examples, this one does not end with \DWOPstackvalue.{}} +\bb +\descriptionitemnl{\DWOPregzero{} \DWOPbitpiece{} 1 31 \DWOPbitpiece{} 7 0 \DWOPregone{} } +\vspace{-1\parsep}\descriptionitemnl{ +\hspace{0.5cm}\DWOPpiece{} 1 } +A variable whose first bit resides in the 31st bit of register 0, whose next +seven bits are undefined and whose second byte resides in register 1. +\eb \end{description} %\clearpage diff --git a/dwarf5/latexdoc/introduction.tex b/dwarf5/latexdoc/introduction.tex index 3cfaa93..ec97489 100644 --- a/dwarf5/latexdoc/introduction.tex +++ b/dwarf5/latexdoc/introduction.tex @@ -413,7 +413,10 @@ In addition, the \HFNdebugabbrevoffset{} and \HFNaddresssize{} fields are reorde (\DWFORMaddrxNAME, \DWFORMdatasixteenNAME, \DWFORMimplicitconstNAME, \DWFORMlinestrpNAME, \DWFORMloclistxNAME, \DWFORMrnglistxNAME, -\DWFORMrefsupNAME, \DWFORMstrpsupNAME{} and \DWFORMstrxNAME). +\bb +\DWFORMrefsupfourNAME, \DWFORMrefsupeightNAME, +\eb +\DWFORMstrpsupNAME{} and \DWFORMstrxNAME). \textit{Because a pre-DWARF Version 5 consumer will not be able to interpret these even to ignore and skip over them, new forms must be @@ -479,6 +482,11 @@ constant expressions, Unicode character types and template aliases. \item Add additional support for template parameters in instantiations. \item Add support for strongly typed enumerations in languages (such as \addtoindex{C++}) that have two kinds of enumeration declarations. +\item +\bb +Add the option for the \DWAThighpc{} value of a program unit or scope to be +specified as a constant offset relative to the corresponding \DWATlowpc{} value. +\eb \end{itemize} \addtoindex{DWARF Version 4} is compatible with \addtoindex{DWARF Version 3} except as follows: diff --git a/dwarf5/latexdoc/otherdebugginginformation.tex b/dwarf5/latexdoc/otherdebugginginformation.tex index 0ae7a1d..8cb4f29 100644 --- a/dwarf5/latexdoc/otherdebugginginformation.tex +++ b/dwarf5/latexdoc/otherdebugginginformation.tex @@ -1524,7 +1524,13 @@ The component is a null-terminated path name string. If the associated form code is \DWFORMstring{}, then the string occurs immediately in the containing \texttt{directories} or \addttindex{file\_names} field. If the form code is \DWFORMlinestrp{}, -then the string is included in the \dotdebuglinestr{} section +\bb +\DWFORMstrp{} or \DWFORMstrpsup{}, +\eb +then the string is included in the +\bb +\dotdebuglinestr{}, \dotdebugstr{} or supplementary string section, respectively, +\eb and its offset occurs immediately in the containing \addttindex{directories} or \addttindex{file\_names} field. @@ -2040,8 +2046,14 @@ and for each operand there is a single unsigned byte describing the form in whic the operand is encoded. The allowed forms are: \DWFORMblock, \DWFORMblockone, \DWFORMblocktwo, \DWFORMblockfour, \DWFORMdataone, \DWFORMdatatwo, \DWFORMdatafour, \DWFORMdataeight, -\DWFORMdatasixteen, \DWFORMsdata, \DWFORMudata, \DWFORMflag, \DWFORMsecoffset, -\DWFORMstring, \DWFORMstrp{} and \DWFORMstrx. +\DWFORMdatasixteen, +\bb +\DWFORMflag, \DWFORMlinestrp, \DWFORMsdata, +\eb +\DWFORMsecoffset, \DWFORMstring, \DWFORMstrp{}, +\bb +\DWFORMstrpsup, \DWFORMstrx{} and \DWFORMudata. +\eb \end{enumerate} \subsection{Macro Information Entries} -- 2.17.1