<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I have no experience with debug-ir, but is it possible that the debug-ir pass never sets the debug info version? There should be a named metadata node <div class="">  !llvm.module.flags = !{..., !123}</div><div class="">  !123 = metadata !{i32 1, metadata !"Debug Info Version", i32 2}<br class=""><div>in the .ll output. If it is missing, just have a look at the clang sources for an example how to add a module flag.</div><div><br class=""></div><div>-- adrian</div><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 15, 2014, at 8:20 AM, Muneeb Khan <<a href="mailto:muneeb.khan@it.uu.se" class="">muneeb.khan@it.uu.se</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Yes, I am using opt and llc from the same version (3.5).<div class="">I know that there were issues with debug-ir in 3.4. I have explored the source tree myself for 3.5 and I know that the pass -debug-ir does kick in with opt.</div><div class="">But I have no clue of what happens with the debug information in (and after) the llc pass.</div><div class=""><br class=""></div><div class="">/Muneeb</div><div class=""><br class=""></div><div class=""><div class="">On 15 Oct 2014, at 17:14, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite" class=""><div dir="ltr" class=""><br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Oct 15, 2014 at 7:08 AM, Muneeb Khan <span dir="ltr" class=""><<a href="mailto:muneeb.khan@it.uu.se" target="_blank" class="">muneeb.khan@it.uu.se</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Hi,<div class="">I am using the -debug-ir pass in LLVM-3.5 opt tool to map binary information back to the IR instead of the source files.</div><div class="">I use the opt tool to  generate a .ll file. But when I run the llc tool on it to generate an assembly (or object) file, it gives me the following warning</div><div class=""><br class=""></div><div class=""><div style="margin:0px;font-size:11px;font-family:Menlo" class="">warning: ignoring debug info with an invalid version (0) in </div></div></div></blockquote><div class=""><br class="">Are you using opt and llc from the same LLVM version? (mixing and matching could produce this problem)<br class=""><br class="">Or possibly debug-ir was never updated to produce the dubug info version - Adrian?</div><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div style="margin:0px;font-size:11px;font-family:Menlo" class=""><br class=""></div><div class="">How can I use the debug-ir functionality to achieve a mapping from the binary to the IR?</div><div class="">Thanks!</div><span class="HOEnZb"><font color="#888888" class=""><br class="">Muneeb Khan<br class="">PhD student<br class="">Department of Information Technology,<br class="">Uppsala University,<br class="">Sweden<br class="">Tel: <a href="tel:%2B46%2018%20-%20471%201049" value="+46184711049" target="_blank" class="">+46 18 - 471 1049</a><br class=""><br class=""><br class="">


<br class=""></font></span></div><br class="">_______________________________________________<br class="">
LLVM Developers mailing list<br class="">
<a href="mailto:LLVMdev@cs.uiuc.edu" class="">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu/" target="_blank" class="">http://llvm.cs.uiuc.edu</a><br class="">
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br class="">
<br class=""></blockquote></div><br class=""></div></div>
</blockquote></div><br class=""><div class="">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px;"><br class="">Muneeb Khan<br class="">PhD student<br class="">Department of Information Technology,<br class="">Uppsala University,<br class="">Sweden<br class="">Tel: +46 18 - 471 1049<br class=""><br class=""><br class=""></span>

</div>
<br class=""></div></div></blockquote></div><br class=""></div></body></html>