<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Jul 6, 2017 at 11:59 AM Robinson, Paul <<a href="mailto:paul.robinson@sony.com">paul.robinson@sony.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div class="m_2304846764346329696WordSection1">
<p class="MsoNormal" style="margin-left:.5in">Yep, Wolfgang picked up on the one thing I saw too.<u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
</div></div><div lang="EN-US" link="blue" vlink="purple"><div class="m_2304846764346329696WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">This is why I like having people review my stuff.<u></u><u></u></span></p></div></div><div lang="EN-US" link="blue" vlink="purple"><div class="m_2304846764346329696WordSection1">
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-left:.5in">I think it's a bit of a pity that str_offsets_base can point into the middle of a str_offsets contribution in some ways<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><a name="m_2304846764346329696__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></a></p>
</div></div><div lang="EN-US" link="blue" vlink="purple"><div class="m_2304846764346329696WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Actually I changed my mind after saying that in the review, and in this writeup I concluded that it cannot do that.  str_offsets_base points to the element
 immediately after the header.  You can have multiple units sharing the (entire) same contribution, but there's no slicing.<u></u><u></u></span></p></div></div><div lang="EN-US" link="blue" vlink="purple"><div class="m_2304846764346329696WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in">I think there'd be some point/benefit to being able to have multiple contributions in a DWO file, but I don't think it's /buggy/ that it's not allowed - just a possible future enhancement.<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
</div></div><div lang="EN-US" link="blue" vlink="purple"><div class="m_2304846764346329696WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">The trick with having multiple contributions in a DWO is that the .debug_line.dwo section has no way to specify which contribution to use. </span></p></div></div></blockquote><div><br>I'd expect to use str_offsets_base in the DWO CU resolved relative to the beginning of the DWO file, or relative to the beginning of the relevant str_offsets contribution range in a DWP file. (& yeah, in the absence of str_offsets_base, either the start of the contribution range (pre-standard Fission), or the relevant start of range + size of header (standard form))<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div class="m_2304846764346329696WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> I mean, you could
 identify which CU points to that line table header,</span></p></div></div></blockquote><div><br>Guess that was str_offsets header - but if you're only dumping the str_offsets you wouldn't need to know which CU points to it, and if you're trying to resolve a str_index form in a CU, you know which CU you're in & can use its str_offsets_base (+contribution range start), if present - same as in non-DWO cases.<br><br>*shrug* no big deal, though. Just an orthogonality of features thing.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div class="m_2304846764346329696WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> and then find the contribution associated with that unit, but it seems less complicated to say the DWO has only one contribution and not have to bother with all that.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I'm also not persuaded that having multiple str_offsets contributions in a normal .o file is all that helpful, or able to save space.  You save a byte, maybe
 two, per reference; but each unique string costs you 4, plus the header.  You can construct examples where it's a savings but in the general case I'm not so sure.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">--paulr</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
</div>
</div>

</blockquote></div></div>