[cfe-dev] Debug Info Generation in Clang.
clattner at apple.com
Wed Apr 23 11:11:52 CDT 2008
On Apr 23, 2008, at 2:41 AM, Sanjiv.Gupta at microchip.com wrote:
> I would like to use Clang front-end for our toolchain.
> One feature that we would like to see in Clang is the source level
> debugging information generation.
> What is the latest state of clang debug info generation? Is anything
> being done about it?
Right now, noone has started working on it. This should be a
relatively easy project to hook up though.
> If not, I would like to take that up. What would be a good starting
As Shakti pointed out, this is the canonical documentation on the
In practice though, it would be useful to write some simple testcases
and send them through llvm-gcc to see what code is generated. You can
also see similar code in llvm-gcc for turning GCC AST's into LLVM
Debug info (e.g. for types) whose logic should translate over pretty
To get started, I'd suggest beginning with simple line number
information. When you can emit the llvm.dbg.stoppoint intrinsics (and
the metadata that describes translation units etc) you should be able
to step through a program with GDB. After that, I'd tackle variable/
function descriptors, type descriptors, etc.
Please let me know if you run into any tricky parts, this would be a
great contribution to clang!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev