This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dwarlint: check_range_out_of_scope only check location of pc_contained_dies


On Thu, 2011-03-31 at 15:35 -0700, Roland McGrath wrote:
> > I was seeing lots of warnings from dwarflint saying a location attribute
> > was outside containing scope. This was for things like the
> > DW_AT_location of a DW_TAG_formal_parameter. I think these shouldn't be
> > checked.
> 
> Why not?  If the location is a locexpr, i.e. pseudo range [0,-1) then it
> shouldn't complain, sure.  But if it's a location list and the list has
> entries outside the scope of the function, that sure seems suspect to me.
> Perhaps you can cite an example of a valid case getting a warning.

Clearly I wasn't thinking. I looked closer and all instances seem to be
formal_parameters from inlined subroutines, which carry location
expressions for more than just the inlined address range. So dwarflint
is correct to warn about it. I'll retract my silly patch. Sorry.

Cheers,

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]