[LLVMdev] #line in generated C code
Bram Adams
bram.adams at ugent.be
Wed Jul 11 02:58:51 PDT 2007
Hi,
I've been experimenting with keeping debugging information in the
LLVM 2.0 bitcode instead of stripping it immediately. However, I
noticed a problem with the C backend.
lib/Target/CBackend/CBackend.cpp:2562 should read like this (or with
a better abstraction of the path separator):
========
<< "/" << SPI.getFileName() << "\"\n";
========
instead of:
========
<< SPI.getFileName() << "\"\n";
========
Without it, I get things like:
========
#line 115 "/a/b/cd"
========
instead of
========
#line 115 "/a/b/c/d"
========
What strategy do LLVM passes and code take towards preserving
debugging code? Do they e.g. use special functions which ignore
debugging info to get at the next/previous instruction?
Kind regards,
Bram Adams
GH-SEL, INTEC, Ghent University (Belgium)
More information about the llvm-dev
mailing list