<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Dec 4, 2010, at 1:16 PM, Bagel wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On 12/03/2010 06:28 PM, Devang Patel wrote:<br><blockquote type="cite">We are working on a document. Here is current draft:<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">  </span><a href="http://wiki.llvm.org/Debug_Information">http://wiki.llvm.org/Debug_Information</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">-<br></blockquote><blockquote type="cite">Devang<br></blockquote><br>While this is great news, it doesn't completely satisfy my needs.  Your documentation assumes one is going to use the LLVM provided functions (such as DIFactory::).  My front-end can't use them because it is not written in C or C++.  I need to know the exact layouts of the LLVM assembly metadata -- the textual form -- and what the fields mean.  The comments in your examples are close.<br><br>Perhaps you can add another section just on the textual format?<br></div></blockquote></div><br><div>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 ?</div><div>That'd be</div><div><br></div><div><span class="Apple-style-span" style="font-family: Times; "><pre>!7 = metadata !{
  i32,      ;; Tag (see below)
  metadata, ;; Context
  metadata, ;; Name
  metadata, ;; Reference to file where defined
  i32,      ;; Line number where defined
  metadata  ;; Type descriptor
}</pre></span><div><br></div></div><div>-</div><div>Devang</div></body></html>