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 > > - > DevangWhile 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? thanks, bagel
On 4 December 2010 21:16, bagel <bagel99 at gmail.com> wrote:> Perhaps you can add another section just on the textual format?Oh, perhaps you're looking for this: http://llvm.org/docs/SourceLevelDebugging.html cheers, --renato
On 12/04/2010 04:00 PM, Renato Golin wrote:> On 4 December 2010 21:16, bagel<bagel99 at gmail.com> wrote: >> Perhaps you can add another section just on the textual format? > > Oh, perhaps you're looking for this: > > http://llvm.org/docs/SourceLevelDebugging.html > > cheers, > --renatoIf you look at my original posting in this thread, you'll see that I had already found that. I'm just looking for something more up-to-date, more complete, and more in depth. thanks, bagel
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>
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 > } > > > - > DevangCorrect: 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. thanks, bagel