Michael McCracken
2004-Oct-01 01:30 UTC
[LLVMdev] Getting source line numbers from within a Pass?
Hi, I would like to get at the source line number(s) that a BasicBlock is generated from, and the only interface I see to this info in the code is from the debugger. After sifting through that, I think I might be able to do what I want by finding dbg_stoppoint intrinsics, but I'm not sure how to get to them. And, if there's an easy way, that'd be cool to know about. Also, I cant seem to produce an LLVM assembly file with the stoppoints visible. Do I need to do anything special to see them? Thanks, -mike
Chris Lattner
2004-Oct-01 02:16 UTC
[LLVMdev] Getting source line numbers from within a Pass?
On Thu, 30 Sep 2004, Michael McCracken wrote:> Hi, I would like to get at the source line number(s) that a BasicBlock > is generated from, and the only interface I see to this info in the > code is from the debugger.Yup, the only way to get them is through the debugger intrinsics.> After sifting through that, I think I might be able to do what I want > by finding dbg_stoppoint intrinsics, but I'm not sure how to get to > them. And, if there's an easy way, that'd be cool to know about.Unfortunately, we do not have a front-end that produces the intrinsics yet. :( Adding them to the C frontend would probably be pretty easy though if you're interested in tackling the project. Note that 'easy' is relative to any hacking on GCC...> Also, I cant seem to produce an LLVM assembly file with the stoppoints > visible. Do I need to do anything special to see them?I'm not sure what you mean here. You can't write one by hand, or you can't get the CFE to produce one? -Chris -- http://llvm.org/ http://nondot.org/sabre/