<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 9, 2015 at 12:46 PM, David Jones <span dir="ltr"><<a href="mailto:djones@xtreme-eda.com" target="_blank">djones@xtreme-eda.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div>Is there a simple example of how to add debug metadata to IR using the C++ API?<br></div></div></div></div></blockquote><div><br>Yep: <a href="http://llvm.org/docs/tutorial/LangImpl8.html">http://llvm.org/docs/tutorial/LangImpl8.html</a><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div><br></div>All I really need right now is the ability to annotate an instruction with line number and file name, although describing variables will be useful later.<br><br></div>It's not clear from reading the include files how to "put it all together".<br><br></div>Unfortunately, the output of my compiler is getting a little large to wade through by hand. I'd love to be able to set a breakpoint  in GDB to file:line in my source language, so as to step through the generated assembly code.<br><br></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div></div>