[llvm-dev] RFC: CodeView debug info emission in Clang/LLVM

Saleem Abdulrasool via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 29 22:02:23 PDT 2015


On Thu, Oct 29, 2015 at 2:08 PM, Adrian Prantl via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

>
> > On Oct 29, 2015, at 10:11 AM, Dave Bartolomeo via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
> >
> > Proposed Design
> > How Debug Info is Generated
> > The CodeView type records for a compilation unit will be generated by
> the front-end for the source language (Clang, in the case of C and C++).
> The front-end has access to the full type system and AST of the language,
> which is necessary to generate accurate debug type info. The type records
> will be represented as metadata in the LLVM IR, similar to how DWARF debug
> info is represented. I’ll cover the actual representation in a bit more
> detail below.
> > The LLVM back-end will be responsible for emitting the CodeView type
> records from the IR into the output .obj file. Since the type records will
> already be in the correct format, this is essentially just a copy. No
> inspection of the type records is necessary within LLVM. The back-end will
> also be responsible for generating CodeView symbol records, line numbers,
> and source file info for any functions and data defined in the compilation
> unit. The back-end is the logical place to do this because only the
> back-end knows the code addresses, data addresses, and stack frame layouts.
>
> Thanks for proposing this.
>
> How different are the type records from the type information we currently
> have in LLVM's DIType hierarchy? Would it be feasible to move the logic for
> generating type records from LLVM metadata into the backend? This way a
> frontend could be agnostic about the debug information format.
>

I think that this really is the path we want to follow.  If the current
metadata we emit is insufficient, we should augment it with additional
information sufficient to generate the necessary data in the backend.  The
same annotations would then be able able to generate one OR both debug info
formats.


> -- adrian
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>



-- 
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151029/dddb3d87/attachment.html>


More information about the llvm-dev mailing list