[LLVMdev] Mapping bitcode to source code

Duncan Sands baldrick at free.fr
Mon Feb 8 20:51:28 PST 2010


Hi Trevor,

> I'm looking for a way to map bitcode to the source code (C/C++) from  
> which it was generated. For example, the Java class file format has an  
> optional LineNumberTable attribute that maps each bytecode instruction  
> to a source code line number:
> 
> http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#22856
> 
> Is there something analogous in the LLVM environment? Thanks,

this can be done using debug info.  Check out
   http://llvm.org/docs/SourceLevelDebugging.html

Ciao,

Duncan.



More information about the llvm-dev mailing list