[LLVMdev] Getting source line numbers from within a Pass?
Chris Lattner
sabre at nondot.org
Thu Sep 30 19:16:58 PDT 2004
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/
More information about the llvm-dev
mailing list