<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16850" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>Thanks for your reply. Is it not possible to do with llvm-g++ -g?</DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Yes</FONT></DIV>
<DIV> <BR>and furthermore, where are SDNode and DebugLoc fields 
stored?</DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>They are probably classes in the Clang 
API</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV> are they in a file which I have to parse myself? if so, is there any 
way that I use a library to get the file/line information for each 
instruction?</DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Yes Clang API :-</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>    <A 
href="http://clang.llvm.org/doxygen/classes.html">http://clang.llvm.org/doxygen/classes.html</A></FONT></DIV>
<DIV><FONT face=Arial size=2>    <A 
href="http://llvm.org/viewvc/llvm-project/cfe/trunk/">http://llvm.org/viewvc/llvm-project/cfe/trunk/</A></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV> since, I am writing a pass for opt tool that manipulates the 
callgraph and want to get the line number information in runOnModule() 
function.</DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thats LLVM, as Edwin says <FONT 
face="Times New Roman" size=3>"</FONT><FONT face="Times New Roman" size=3>See 
Analysis/DebugInfo.h, and opt -print-dbginfo for an example of how<BR>to use 
it."</FONT><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>    <A 
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DebugInfo.h?revision=74920&view=markup">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DebugInfo.h?revision=74920&view=markup</A></FONT></DIV>
<DIV><FONT face=Arial size=2>    <A 
href="http://llvm.org/doxygen/classes.html#letter_D">http://llvm.org/doxygen/classes.html#letter_D</A></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Anyway theres some pointers,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Aaron</FONT></DIV>
<DIV><FONT face=Arial size=2> </DIV></FONT>
<DIV><FONT face=Arial size=2>   
</FONT><BR><BR>Thanks,<BR>::Saman<BR><BR></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=gmail_quote>On Thu, Jul 9, 2009 at 8:13 AM, Saman Aliari Zonouz 
  <SPAN dir=ltr><<A 
  href="mailto:saliari2@uiuc.edu">saliari2@uiuc.edu</A>></SPAN> wrote:<BR>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Hi,<BR><BR>I 
    am new to LLVM, and need to find the line number and cpp source file name 
    for each instruction in a .bc file. I suppose llvm debugger might have that 
    feature but there is no documentation on it. Would you please give me some 
    help how to do it?<BR><BR>Thanks,<BR>::Saman Zonouz<BR>University of 
    Illinois<BR></BLOCKQUOTE></DIV><BR>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>LLVM Developers 
  mailing 
  list<BR>LLVMdev@cs.uiuc.edu         
  http://llvm.cs.uiuc.edu<BR>http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev<BR></BLOCKQUOTE></BODY></HTML>