<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:"Yu Gothic";
        panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:EPNNMP+TimesNewRoman;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"\@Yu Gothic";
        panose-1:2 11 4 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-ligatures:standardcontextual;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
p.Default, li.Default, div.Default
        {mso-style-name:Default;
        margin:0cm;
        text-autospace:none;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;
        mso-ligatures:standardcontextual;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:2.0cm 42.5pt 2.0cm 3.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#0563C1" vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>In DWARF v3, section 7.20 deals with the structure of the debug_aranges section. Near the end, there is the following paragraph:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:11.5pt;color:black'>“This header is followed by a series of tuples. Each tuple consists of an address and a length, each in the size appropriate for an address on the target architecture. The first tuple following the header in each set begins at an offset that is a multiple of the size of a single tuple (that is, twice the size of an address). The header is padded, if necessary, to the appropriate boundary. Each set of tuples is terminated by a 0 for the address and 0 for the length.”<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.5pt;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.5pt;color:black'>Note the third sentence:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.5pt;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.5pt;color:black'>“The first tuple following the header in each set begins at an offset that is a multiple of the size of a single tuple (that is, twice the size of an address).”<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.5pt;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.5pt;color:black'>Meanwhile in DWARFv4, section 6.1.2, which describes the same, the corresponding fragment goes:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.5pt;color:black'><o:p> </o:p></span></p><p class=Default style='mso-margin-top-alt:5.0pt;margin-right:0cm;margin-bottom:5.0pt;margin-left:0cm'><span style='font-size:11.5pt'>“</span><span style='font-size:11.5pt'>This header is followed by a variable number of address range descriptors. Each descriptor is a triple consisting of a segment selector, the beginning address within that segment of a range of text or data covered by some entry owned by the corresponding compilation unit, followed by the non-zero length of that range. A particular set is terminated by an entry consisting of three zeroes. When the segment_size value is zero in the header, the segment selector is omitted so that each descriptor is just a pair, including the terminating entry. By scanning the table, a debugger can quickly decide which compilation unit to look in to find the debugging information for an object that has a given address. <o:p></o:p></span></p><p class=MsoNormal><i><span style='font-size:11.5pt'>If the range of addresses covered by the text and/or data of a compilation unit is not contiguous, then there may be multiple address range descriptors for that compilation unit.”<o:p></o:p></span></i></p><p class=MsoNormal><i><span style='font-size:11.5pt'><o:p> </o:p></span></i></p><p class=MsoNormal><span style='font-size:11.5pt'>Note that there is no mention of the triple/tuple  alignment requirement. The version number in the aranges CU header is supposed to be 2 both in DWARF v4 and DWARF v3. Meanwhile, the alignment or lack thereof does make a difference for a parser. Is there a preferred way to disambiguate?</span><o:p></o:p></p></div></body></html>