[LLVMdev] Source file information.
Aaron Gray
aaronngray.lists at googlemail.com
Thu Jul 9 05:41:06 PDT 2009
Thanks for your reply. Is it not possible to do with llvm-g++ -g?
Yes
and furthermore, where are SDNode and DebugLoc fields stored?
They are probably classes in the Clang API
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?
Yes Clang API :-
http://clang.llvm.org/doxygen/classes.html
http://llvm.org/viewvc/llvm-project/cfe/trunk/
since, I am writing a pass for opt tool that manipulates the callgraph and want to get the line number information in runOnModule() function.
Thats LLVM, as Edwin says "See Analysis/DebugInfo.h, and opt -print-dbginfo for an example of how
to use it."
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DebugInfo.h?revision=74920&view=markup
http://llvm.org/doxygen/classes.html#letter_D
Anyway theres some pointers,
Aaron
Thanks,
::Saman
On Thu, Jul 9, 2009 at 8:13 AM, Saman Aliari Zonouz <saliari2 at uiuc.edu> wrote:
Hi,
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?
Thanks,
::Saman Zonouz
University of Illinois
------------------------------------------------------------------------------
_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090709/2516ce19/attachment.html>
More information about the llvm-dev
mailing list