[LLVMdev] question on generating dwarf metadata

Devang Patel dpatel at apple.com
Mon Dec 6 10:03:15 PST 2010


On Dec 4, 2010, at 1:16 PM, Bagel wrote:

> On 12/03/2010 06:28 PM, Devang Patel wrote:
>> We are working on a document. Here is current draft:
>> 	http://wiki.llvm.org/Debug_Information
>> 
>> -
>> Devang
> 
> 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.
> 
> Perhaps you can add another section just on the textual format?

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101206/7ff97535/attachment.html>


More information about the llvm-dev mailing list