Hi, Is there a way, from within an opt pass, to find the correspondence between an LLVM IR object and C source code (basically line number info similar to the one used with gcc + gdb to help debugging ), assuming either a llvm-gcc front end ? Sorry if this question was asked before. Thanks for your time. - Prakash
Same question here! On Jan 14, 5:14 pm, "Prakash Prabhu" <prakash.pra... at gmail.com> wrote:> Hi, > > Is there a way, from within an opt pass, to find the correspondence > between an LLVM IR object and Csourcecode(basicallylinenumber > info similar to the one used with gcc + gdb to help debugging ), > assuming either a llvm-gcc front end ? > > Sorry if this question was asked before. > > Thanks for your time. > > - Prakash > _______________________________________________ > LLVM Developers mailing list > LLVM... at cs.uiuc.edu http://llvm.cs.uiuc.eduhttp://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On 2009-01-29 22:01, mehrara wrote:> Same question here! > > On Jan 14, 5:14 pm, "Prakash Prabhu" <prakash.pra... at gmail.com> wrote: > >> Hi, >> >> Is there a way, from within an opt pass, to find the correspondence >> between an LLVM IR object and Csourcecode(basicallylinenumber >> info similar to the one used with gcc + gdb to help debugging ), >> assuming either a llvm-gcc front end ? >> >> Sorry if this question was asked before. >> >> Thanks for your time. >>Have a look at include/llvm/Analysis/DebugInfo.h, and lib/Analysis/DbgInfoPrinter.cpp. Best regards, --Edwin