[lto] PATCH: Read DWARF 3

Mark Mitchell mark@codesourcery.com
Mon Jun 26 15:21:00 GMT 2006


Kenneth Zadeck wrote:

>> Kenny, Jim Blandy suggested that it might make sense for us to use
>> DWARF for the bodies of functions as well as for declarations.  The
>> idea here would be to define a bunch of new DWARF tags and attributes
>> to represent TREE nodes.  So, this is a syntactic choice (i.e., format
>> of bits on disk), not a semantic choice about what the content actuall
>> is.  There's nothing magic about the idea, but it would let us
>> leverage a pre-existing file format that (a) provides a reasonable
>> representation for tree-structured data (like TREE), (b) which has
>> some encoding tricks for compactness, and (c) for which we already
>> have readers, writers, and file dumpers.  So, I think it's an idea
>> worth thinking about.
>>
>>   
> Lets say that I do this.  Does each function go in it's own dwarf
> section or do I cram all of the function bodies in the same section?

You could do it either way, in theory.  DWARF has the ability to refer
to separate sections for any subtree, so we can have the main debugging
information point at "that section over there" for the body of the
function.  There will doubtless be a little complexity to make that
work, but, entirely independent of LTO, separated subtrees is a feature
we should implement anyhow to better handle COMDAT.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Gcc-patches mailing list