[LLVMdev] question on generating dwarf metadata

Talin viridia at gmail.com
Thu Dec 9 14:47:06 PST 2010


On Mon, Dec 6, 2010 at 12:50 PM, Bagel <bagel99 at gmail.com> wrote:

> On 12/06/2010 12:03 PM, Devang Patel wrote:
> > As I understand, you are not interested in 'how to use DIFactory'. Do you
> want
> > to know what are the fields of metadata to encode debug info for a local
> variable ?
> > That'd be
> >
> > !7 = metadata !{
> >    i32,      ;; Tag (see below)
> >    metadata, ;; Context
> >    metadata, ;; Name
> >    metadata, ;; Reference to file where defined
> >    i32,      ;; Line number where defined
> >    metadata  ;; Type descriptor
> > }
> >
> >
> > -
> > Devang
>
> Correct: I'm not interested in 'how to use DIFactory', and yes, I do want
> to
> know what the fields of metadata encode in somewhat more detail.
>
> For example, I am struggling with the 'DW_TAG_subroutine_type' now.  There
> is a
> field that is labeled:
>     metadata, ;; Reference to array of member descriptors
> Now I figured out that this array contains the types of the formal
> parameters,
> but it also appears the first (and only the first) in the array is the
> returned
> value type of the function.  Since LLVM supports functions that return
> multiple
> values (as does my language), and DW_TAG_subroutine_type implementation
> currently supports, at most, a single returned value, this might be a bug.
> Looking at the code in lib/CodeGen/AsmPrinter/DwarfDebug.cpp around line
> 1035,
> this does appear to be the case.
>
> If you haven't already read the DWARF specification documents, then I
recommend looking at them if you're not going to be using DIFactory. You can
find them here: http://dwarfstd.org/Download.php

thanks, bagel
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



-- 
-- Talin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101209/c33e6d4f/attachment.html>


More information about the llvm-dev mailing list