<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>​Cool, thanks for the fix! :)<br>
</p>
<p><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div class="BodyFragment"><font size="2">
<div class="PlainText">Best regards,<br>
George | Developer | <span style="background-color:rgb(255,255,255); color:rgb(33,33,33); font-family:Calibri,sans-serif; font-size:13.3333px">Access Softek, Inc</span></div>
</font></div>
</div>
</div>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>От:</b> David Blaikie <dblaikie@gmail.com><br>
<b>Отправлено:</b> 25 октября 2018 г. 1:47<br>
<b>Кому:</b> wolfgang.pieb@sony.com<br>
<b>Копия:</b> paul.robinson@sony.com; George Rimar; llvm-dev@lists.llvm.org<br>
<b>Тема:</b> Re: [llvm-dev] llvm-dwarfdump on whole-split-file fails to account for indirection through skeleton</font>
<div> </div>
</div>
<div>
<div style="font-size:9pt; font-family:'Calibri',sans-serif">
<h3 style="background-color:#ffffff; font-size:10pt; border:1px dotted #003333; padding:.8em">
<span style="color:#ff6600">CAUTION:<strong> </strong></span>This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.</h3>
</div>
<div>
<div dir="ltr">Yep, ended up fixing this myself in r345215 - turned out one of my test cases was checking a bogus result already.</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Wed, Oct 24, 2018 at 1:15 PM David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">
<div class="gmail_quote">
<div dir="ltr">On Wed, Oct 24, 2018 at 1:11 PM <<a href="mailto:wolfgang.pieb@sony.com" target="_blank">wolfgang.pieb@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">
<div class="m_-2911712061406133093m_-146591560258793138WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1f497d">I don’t see anything in the DWARF 5 standard that would preclude multiple skeletons in the same .o, but I think this is based on the assumption that all the
 split units live in their respective .dwo files (or in a .dwp file). I’m not sure how you could have several skeleton/split unit pairs in a single .o in the non-split split DWARF scenario. For starters, there’s supposed to be only one split unit per .debug_info.dwo
 section, so I don’t know how several of them would even coexist in one object file (e.g. how they would refer to their strings in the absence of a DW_str_offsets_base attribute, the same goes for rangelists and location lists).</span></p>
</div>
</div>
</blockquote>
</div>
</div>
<div dir="ltr">
<div class="gmail_quote">
<div><br>
Yeah, that's a more accurate statement of the limitation - one split unit per .dwo, therefore one unit (well, one split and its matching skeleton) when using non-split Split DWARF in a single object file.<br>
 </div>
</div>
</div>
<div dir="ltr">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div lang="EN-US">
<div class="m_-2911712061406133093m_-146591560258793138WordSection1">
<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"><u></u> </span><span style="color:rgb(31,73,125); font-family:Calibri,sans-serif; font-size:11pt">I think it’s as Dave says:  We’ll have to restrict support
 for non-split split DWARF to a single skeleton/split unit in a .o, which should make lookup fairly straightforward.</span></p>
</div>
</div>
</blockquote>
</div>
</div>
<div dir="ltr">
<div class="gmail_quote">
<div><br>
*nod* turns out I have a need to fix this myself now anyway - so I'm working on that, might've come across a bug or two along the way, we'll see.<br>
<br>
But yeah, simple enough to just look for the only CU in the debug_info section for now. If we end up coming up with other scenarios to support we can cross that bridge when we come to it.<br>
<br>
- Dave<br>
 </div>
</div>
</div>
<div dir="ltr">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div lang="EN-US">
<div class="m_-2911712061406133093m_-146591560258793138WordSection1">
<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">-- wolfgang<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 style="border:none; border-left:solid blue 1.5pt; padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none; border-top:solid #b5c4df 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif""> Robinson, Paul
<br>
<b>Sent:</b> Wednesday, October 24, 2018 11:56 AM<br>
<b>To:</b> David Blaikie; George Rimar; Pieb, Wolfgang<br>
<b>Cc:</b> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<b>Subject:</b> RE: [llvm-dev] llvm-dwarfdump on whole-split-file fails to account for indirection through skeleton<u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</div>
<div lang="EN-US">
<div class="m_-2911712061406133093m_-146591560258793138WordSection1">
<div style="border:none; border-left:solid blue 1.5pt; padding:0in 0in 0in 4.0pt">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1f497d">If we do find that multiple skeletons are possible in the same .o, we can find the right one pretty cheaply by matching the dwo_id in the header.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1f497d">--paulr<u></u><u></u></span></p>
<p class="MsoNormal"><a name="m_-2911712061406133093_m_-146591560258793138__MailEndCompose"></a><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none; border-left:solid blue 1.5pt; padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none; border-top:solid #b5c4df 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif""> llvm-dev [mailto:<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@lists.llvm.org</a>]
<b>On Behalf Of </b>David Blaikie via llvm-dev<br>
<b>Sent:</b> Wednesday, October 24, 2018 2:34 PM<br>
<b>To:</b> George Rimar; Pieb, Wolfgang; llvm-dev<br>
<b>Subject:</b> [llvm-dev] llvm-dwarfdump on whole-split-file fails to account for indirection through skeleton<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hi folks,<br>
<br>
Just a minor bug I probably won't get to but thought I should raise:<br>
<br>
llvm-dwarfdump when run on an object file containing split-DWARF (so it has both .debug_info, .debug_addr, etc, and .debug_info.dwo, etc) has some minor quirks when it comes to DWARFv5 support.<br>
<br>
The range-dumping functionality uses DWARFUnit::getAddrOffsetSectionItem on the unit that contains the range attribute (DW_AT_ranges, etc) - so ranges in the .dwo can still read addresses and use them to print the addresses in the range list accounting for
 relocations and printing section names, etc.<br>
<br>
Problem is that the split-unit doesn't have the DW_AT_addr_base attribute (it's in the skeleton unit) so getAddrOffsetSectionItem reads from the start of the section, instead of the start of the contribution (after the header).<br>
<br>
Would be good to fix that - especially if you're interested in supporting non-split split-DWARF (.dwo sections in the object files, more like MachO debug info).<br>
<br>
Not sure what the right solution to that is - I mean, ultimately it means having llvm-dwarfdump lookup the skeleton CU in the same object file.<br>
<br>
I guess since this can only apply to the object file (the .dwo sections won't be linked into the executable) - and split-DWARF doesn't support multiple skeleton CUs in a single object file I think... (I remember trying to figure that out with ThinLTO & my memory
 is a bit hazy) - so maybe it's as simple as "if we're using debug_addr, make sure we're reading/using the skeleton CU which should be the only unit in debug_info in this object".<br>
<br>
- Dave<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>