<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">John,<DIV><BR class="khtml-block-placeholder"></DIV><DIV>If you look at the stoppoint calls you'll see that you can find the line number and if you follow the compile unit argument on the call you will find the file.  The byte codes that follow the call would have been generated by the code on that source line.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>-- Jim</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR><DIV><DIV>On Apr 8, 2006, at 5:33 AM, John Trimble wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">Thanks for your help. I took a look at <A onclick="return top.js.OpenExtLink(window,event,this)" href="http://llvm.org/docs/SourceLevelDebugging.html" target="_blank">http://llvm.org/docs/SourceLevelDebugging.html</A> and it seems like this doesn't give you much in the way of line number information. If you know what source line you are interested in then you can set a breakpoint, but suppose you want to know the line number in the source code for some arbitrary bytecode instruction. In my particular case, I have a pass that finds bytecode instructions that represent indirect calls, now I want to find out what line number and source file that indirect call came from. Is there currently not a way to get this type of information? Thanks again. <BR><BR>- John Trimble<BR><BR><DIV><SPAN class="gmail_quote">On 4/7/06, <B class="gmail_sendername">Reid Spencer</B> <<A href="mailto:reid@x10sys.com">reid@x10sys.com</A>> wrote:</SPAN><BLOCKQUOTE class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> The debug intrinsics are intended for that.  Please see:<BR><A href="http://llvm.org/docs/SourceLevelDebugging.html">http://llvm.org/docs/SourceLevelDebugging.html</A><BR>for the details.<BR><BR>Please note that this is being worked on actively Jim Laskey at Apple. <BR>He's working to get these intrinsics to generate DWARF output so that<BR>LLVM generated code can be used with a debugger. However, the intrinsics<BR>can be processed in whatever way you'd like via an LLVM pass.<BR><BR> Reid.<BR><BR>On Fri, 2006-04-07 at 14:59 -0700, John Trimble wrote:<BR>> So if compile some file test.c and get some binary test.bc can I<BR>> relate statements in test.bc with source code line numbers in test.c<BR> > and if so how would I go about doing that. Thanks for your time.<BR>><BR><BR><BR>-----BEGIN PGP SIGNATURE-----<BR>Version: GnuPG v1.2.7 (GNU/Linux)<BR><BR>iD8DBQBENusl3J9yEj6nvGcRAnu4AJ47NLg1bWv7mmzfa5+Et9ktF4QaYQCfUGeN <BR>wpHV/Hj6NkQWvWIJRzdZO2c=<BR>=NvMj<BR>-----END PGP SIGNATURE-----<BR><BR><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">http://llvm.cs.uiuc.edu</A><BR><A href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</A><BR><BR><BR></BLOCKQUOTE></DIV><BR><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">LLVM Developers mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</A> <SPAN class="Apple-converted-space">        </SPAN><A href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</A></DIV> </BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>