<div><div dir="auto">Hi paulr </div></div><div dir="auto"><br></div><div dir="auto">Thanks for your reply. Though DWARF info give me the code address ranges, there might be inline data. If so, how to handle this case?</div><div dir="auto"><br></div><div dir="auto">As for the dwarf line table. Sometimes, the source line might be zero. Do you know why? If all instructions should be describe in the line table, I think analyzing Dwarf line table is enough to get all the instructions addresses. Do you agree? </div><div dir="auto"><br></div><div dir="auto">I would also cc my supervisor for the discussion.</div><div dir="auto"><br></div><div dir="auto">Regards</div><div dir="auto">Muhui</div><div><br><div class="gmail_quote"><div dir="ltr"><<a href="mailto:paul.robinson@sony.com">paul.robinson@sony.com</a>>于2018年6月26日 周二上午2:38写道:<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_4478154707504529501WordSection1">
<p class="MsoNormal"><a name="m_4478154707504529501__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">The main DWARF info should provide the code address ranges for each function, as well as the starting source location.  You could
 then use the line table to map code ranges to individual source lines.  That could give you a reasonable grasp of the source range for each function.<u></u><u></u></span></a></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">All addresses in the DWARF line table will be instruction addresses.  And in fact, all instructions should be described in the line table (assuming all source
 was compiled with debug info).<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"><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>Muhui Jiang via llvm-dev<br>
<b>Sent:</b> Monday, June 25, 2018 11:36 AM<br>
<b>To:</b> llvm-dev<br>
<b>Subject:</b> [llvm-dev] Instruction boundaries<u></u><u></u></span></p>
</div>
</div></div></div></div><div lang="EN-US" link="blue" vlink="purple"><div class="m_4478154707504529501WordSection1"><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hi<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I was wondering whether there are any methods to know what part of the target binary is code. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I have some ideas and hope to get your comments.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I would like to use LLVM's source level debugging information to extract the source lines belonging to every functions. Then use the dwarf mapping table to transfer the  source level information to binary address. Are there any better methods?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Besides, is the address listed inside dwarf line mapping table must be code rather than data?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Regards<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Muhui<u></u><u></u></p>
</div>
</div>
</div></div></div></blockquote></div></div>