On Mon, Dec 6, 2010 at 12:50 PM, Bagel <span dir="ltr"><<a href="mailto:bagel99@gmail.com">bagel99@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 12/06/2010 12:03 PM, Devang Patel wrote:<br>
> As I understand, you are not interested in 'how to use DIFactory'. Do you want<br>
> to know what are the fields of metadata to encode debug info for a local variable ?<br>
> That'd be<br>
><br>
> !7 = metadata !{<br>
> i32, ;; Tag (see below)<br>
> metadata, ;; Context<br>
> metadata, ;; Name<br>
> metadata, ;; Reference to file where defined<br>
> i32, ;; Line number where defined<br>
> metadata ;; Type descriptor<br>
> }<br>
><br>
><br>
> -<br>
> Devang<br>
<br>
</div>Correct: I'm not interested in 'how to use DIFactory', and yes, I do want to<br>
know what the fields of metadata encode in somewhat more detail.<br>
<br>
For example, I am struggling with the 'DW_TAG_subroutine_type' now. There is a<br>
field that is labeled:<br>
metadata, ;; Reference to array of member descriptors<br>
Now I figured out that this array contains the types of the formal parameters,<br>
but it also appears the first (and only the first) in the array is the returned<br>
value type of the function. Since LLVM supports functions that return multiple<br>
values (as does my language), and DW_TAG_subroutine_type implementation<br>
currently supports, at most, a single returned value, this might be a bug.<br>
Looking at the code in lib/CodeGen/AsmPrinter/DwarfDebug.cpp around line 1035,<br>
this does appear to be the case.<br>
<div><div></div><div class="h5"><br></div></div></blockquote><div>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: <a href="http://dwarfstd.org/Download.php">http://dwarfstd.org/Download.php</a></div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="h5">
thanks, bagel<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>-- Talin<br>