[Dwarf-discuss] DW_AT_ranges info generated by gcc

Daniel Jacobowitz drow
Wed Apr 20 14:07:37 GMT 2005


On Wed, Apr 20, 2005 at 12:31:55PM -0500, Fred Fish wrote:
> (Sorry if more than one copy of this shows up.  I'm dealing with a
> little email flakiness at the moment)
> 
> I've been working on getting gcc binutils to handle DW_AT_ranges
> and found what looks like a bug in the info generated by the
> latest development version of gcc.  The bug report can be viewed
> at:
> 
>    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20967
> 
> Perhaps I'm just misunderstanding the way DW_AT_ranges is supposed to
> work.  It would be great if someone else could review the gcc bug
> report and either add comments to it directly, or send them to me to
> add.

You never did respond to my last comment... Maybe this will help.

Think of a DIE with DW_AT_low_pc and DW_AT_high_pc as exactly
equivalent to a DIE with DW_AT_ranges and only a single range.

It seems natural to me that an outer scope which completely encloses an
inner scope will have PC bounds completely enclosing the bounds of its
inner scopes.  Functions already do this; it's pretty clear that the
range information for a function should include all code associated
with the function.

I'm getting the impression you want no range lists to overlap.  Why?
Can you give me an example of a situation where having a PC value
included in the ranges of multiple nested blocks is a problem?

-- 
Daniel Jacobowitz
CodeSourcery, LLC




More information about the Dwarf-discuss mailing list