<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">There might be no step-by-step example, but you can check links below:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default"><span style="font-family:arial,helvetica,sans-serif"> * <a href="https://llvm.org/docs/SourceLevelDebugging.html">https://llvm.org/docs/SourceLevelDebugging.html</a></span><br><span style="font-family:arial,helvetica,sans-serif"> * <a href="https://llvm.org/devmtg/2014-10/Slides/Christopher-DebugInfoTutorial.pdf">https://llvm.org/devmtg/2014-10/Slides/Christopher-DebugInfoTutorial.pdf</a></span><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-11-15 14:26 GMT+08:00 Wuweijia <span dir="ltr"><<a href="mailto:wuweijia@huawei.com" target="_blank">wuweijia@huawei.com</a>></span>:<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_2559005023224519771WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Hi Andrew<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> I am newbie. There are many headers and classes, I do not know how to use to add dwarf info to bc file.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> Can you show me the demo or example, is there any info about how to use these classes step by step.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">BR<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Owen<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"><b><span lang="ZH-CN" style="font-size:11.0pt;font-family:"\005fae\008f6f\0096c5\009ed1",sans-serif">发件人</span></b><b><span style="font-size:11.0pt;font-family:"\005fae\008f6f\0096c5\009ed1",sans-serif">:</span></b><span style="font-size:11.0pt;font-family:"\005fae\008f6f\0096c5\009ed1",sans-serif"> Andrew
Kelley [mailto:<a href="mailto:superjoe30@gmail.com" target="_blank">superjoe30@gmail.com</a>] <br>
<b><span lang="ZH-CN">发送时间</span>:</b> 2017<span lang="ZH-CN">年</span>11<span lang="ZH-CN">月</span>15<span lang="ZH-CN">日</span> 12:51<br>
<b><span lang="ZH-CN">收件人</span>:</b> Wuweijia <<a href="mailto:wuweijia@huawei.com" target="_blank">wuweijia@huawei.com</a>><br>
<b><span lang="ZH-CN">抄送</span>:</b> <span lang="ZH-CN">陳韋任</span> <<a href="mailto:chenwj.cs97g@g2.nctu.edu.tw" target="_blank">chenwj.cs97g@g2.nctu.edu.tw</a>>; <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>; Fanbohao <<a href="mailto:fanbohao@huawei.com" target="_blank">fanbohao@huawei.com</a>><br>
<b><span lang="ZH-CN">主题</span>:</b> Re: [llvm-dev] hi, Is there any solution about how to add some dwarf info to the IR bitcode file.<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Have a look at the DebugInfo API.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">include/llvm/DebugInfo/*<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">It requires using the C++ API instead of the C API.<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Tue, Nov 14, 2017 at 10:32 PM, Wuweijia via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal">Hi,
<u></u><u></u></p>
<p class="MsoNormal"> I create the function A with llvm api, and make implement about function, that function A call function B, and add some write/read operation of variants to function
A. and compile it to machine code, run it debug it. <u></u><u></u></p>
<p class="MsoNormal"> And I want to debug the function A, is there any ways I can add some dwarf info (or debug info ), so that I can the check variant ‘s value is ok.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">BR<u></u><u></u></p>
<p class="MsoNormal">Owen<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Wei-Ren Chen (陳韋任)<br>Homepage: <a href="https://people.cs.nctu.edu.tw/~chenwj" target="_blank">https://people.cs.nctu.edu.tw/~chenwj</a></div></div></div>
</div>