[cfe-dev] Debug Info Generation in Clang.
Chris Lattner
clattner at apple.com
Wed Apr 23 09:11:52 PDT 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.
Great!
>
> 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
> point?
As Shakti pointed out, this is the canonical documentation on the
debug info:
http://llvm.org/docs/SourceLevelDebugging.html
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
directly.
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!
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080423/c70e6fcf/attachment.html>
More information about the cfe-dev
mailing list