[LLVMdev] How to get line number of a function in a bitcode file?
John Criswell
criswell at illinois.edu
Fri Jul 8 14:08:39 PDT 2011
On 7/8/11 1:56 PM, kobe James wrote:
> Hi All,
>
> I hope to get some information about functions in a bitcode file. Say,
> if we have a function foo(), and the bitcode file is generated by a
> single source file, then I want to get the line number foo() locates
> in that source file.
> If the bitcode file is linked by multiple bitcode files, is it
> possible to also get which file foo() locates in?
>
I think you can get this information by looking at the debugging
metadata that is associated with the function or with one of its
arguments. That said, this will only work if debugging metadata is
available (e.g., if the code was compiled with the -g flag).
-- John T.
> Thanks,
> Chen
>
>
> _______________________________________________
> 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/20110708/47ef8141/attachment.html>
More information about the llvm-dev
mailing list