<div dir="ltr">Great. Thanks for the reminder, here's the <a href="https://bugs.llvm.org/show_bug.cgi?id=38488">llvm-dwarfdump bug</a> <div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 8, 2018 at 7:11 AM,  <span dir="ltr"><<a href="mailto:paul.robinson@sony.com" target="_blank">paul.robinson@sony.com</a>></span> wrote:<br><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_-3020995632906312562WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I posted this suggestion on dwarf-discuss, where I would hope various tool maintainers are watching.<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">The maintainer of dwarfdump says that a new version now "prints the type of compression and the compression factor for each compressed section that's being
 reported."  Very small sections (< 100 bytes) tend to get larger, but he says he's seeing nearly 10x compression factors on string sections.  Other sections are in between these extremes.<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">Don't know about the GNU tools (readelf, objdump).<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">Did you file a bug for llvm-dwarfdump?  I haven't noticed one.<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_-3020995632906312562__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></a></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""> Leonard Mosescu [mailto:<a href="mailto:mosescu@google.com" target="_blank">mosescu@google.com</a>]
<br>
<b>Sent:</b> Thursday, August 02, 2018 12:53 PM<br>
<b>To:</b> Robinson, Paul<br>
<b>Cc:</b> LLDB<br>
<b>Subject:</b> Re: [lldb-dev] The mysterious case of unsupported DW_FORMs<u></u><u></u></span></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Thanks Paul! I have a fix for the LLDB handling of compressed sections in an upcoming change (together with improved logging). The email was mostly in case some other poor soul hit the same problem (until I get a chance to commit the fixes)<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><i><span style="font-size:9.5pt;color:#500050;background:white">(*) none of the tools bothered to make a note that the sections are compressed (</span></i><i><span style="font-size:9.5pt;font-family:"Courier New";color:black;background:white">SHF_COMPRESSED)<br>
</span></i><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d;background:white">That seems like a completely valid feature request.  Again filing a bug would be the right tactic.  I'm willing to do this one for you, if you don't
 have a bugzilla account.</span><span style="font-size:9.5pt;color:#500050;background:white"><u></u><u></u></span></p>
</blockquote>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt;color:#500050;background:white"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt;color:#500050;background:white">I'll open a request for llvm-dwarfdump. If you happen to be in touch with the developers of the other tools (readelf, objdump, dwarfdump) feel free to forward them the notes. <u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="background:white;text-decoration-style:initial;text-decoration-color:initial">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><span style="font-size:9.5pt"><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Thu, Aug 2, 2018 at 7:21 AM, <<a href="mailto:paul.robinson@sony.com" target="_blank">paul.robinson@sony.com</a>> wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">Why weren't my local LLVM & LLDB builds able to decompress the sections? CMake!
<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Remembering to delete CMakeCache.txt is usually the part I forget to do.</span><u></u><u></u></p>
<p class="MsoNormal"><a name="m_-3020995632906312562_m_-2448534557015108325__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></a><u></u><u></u></p>
<p class="MsoNormal">LLDB tried to decompress, but when failed to do so it carried on returning and alter attempting to parse the compressed bytes as is.<u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">A section that is compressed but can't be decompressed should be treated as corrupt/unparseable. 
 That seems like an LLDB bug; do you have an account on the project bugzilla?</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><i>(*) none of the tools bothered to make a note that the sections are compressed (</i><i><span style="font-family:"Courier New";color:black">SHF_COMPRESSED)</span></i><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">That seems like a completely valid feature request.  Again filing a bug would be the right tactic. 
 I'm willing to do this one for you, if you don't have a bugzilla account.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">--paulr</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>
</div>

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