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

罗勇刚(Yonggang Luo) via cfe-dev cfe-dev at lists.llvm.org
Fri Oct 30 10:32:42 PDT 2015


That's great to hear the great news. I am looking for it for a long time.

On Fri, Oct 30, 2015 at 1:02 PM, Saleem Abdulrasool via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> 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
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>



-- 
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo



More information about the cfe-dev mailing list