Hi, I am generating llvm IR code for C source code using clang as the front end. I am wondering if there is any way of mapping an llvm IR line number back to its C source code line number. Thanks Sincerely Arvind -- Arvind Sudarsanam Utah State University Phone: (435) 512-7769 E-mail: theonemorpheus at gmail.com Web-site: http://cc.usu.edu/~asudarsanam
On Mar 25, 2010, at 2:50 PM, Arvind Sudarsanam wrote:> I am generating llvm IR code for C source code using clang as the > front end. I am wondering if there is any way of mapping an llvm IR > line number back to its C source code line number.If you're asking what I think you're asking, check out these recent threads: http://lists.cs.uiuc.edu/pipermail/llvmdev/2010-February/029245.html http://lists.cs.uiuc.edu/pipermail/llvmdev/2010-February/029395.html Trevor
Hi Arvind,> I am generating llvm IR code for C source code using clang as the > front end. I am wondering if there is any way of mapping an llvm IR > line number back to its C source code line number.this is a frequently asked question, so you should be able to find plenty of info by searching the mailing list archives. The usual answer is to use debug info. Ciao, Duncan.
Duncan Sands wrote:> Hi Arvind, > > >> I am generating llvm IR code for C source code using clang as the >> front end. I am wondering if there is any way of mapping an llvm IR >> line number back to its C source code line number. >> > > this is a frequently asked question, so you should be able to find plenty > of info by searching the mailing list archives. The usual answer is to > use debug info. >I believe our mailing list archives are unsearchable with Google (and, I assume, other search engines). I'm guessing this is due to a robots.txt file or something like that. As far as I know, there is no good way to search the archives. I suspect the long-term solution is to move the mailing lists to llvm.org. Can someone confirm or correct my above observations/assumptions? Regarding the original question on mapping LLVM IR to source code, we should probably put something into the FAQ about this question. I don't have time to do that now (I'm technically taking today off work and will be gone this weekend), but can do it next week if no one beats me to it. -- John T.> Ciao, > > Duncan. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
On Fri, Mar 26, 2010 at 1:54 AM, Duncan Sands <baldrick at free.fr> wrote:> Hi Arvind, > >> I am generating llvm IR code for C source code using clang as the >> front end. I am wondering if there is any way of mapping an llvm IR >> line number back to its C source code line number. > > this is a frequently asked question, so you should be able to find plenty > of info by searching the mailing list archives. The usual answer is to > use debug info. >I just updated SourceLevelDebugging.html. Please feel free to improve the paragraph if it needs further clarification. - Devang