This is the mail archive of the dwarf2@corp.sgi.com mailing list for the dwarf2 project.


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

Re: location lists revisited


Jim Dehnert wrote:
> 
> Michael Eager wrote:
> >
> > Ron 603-884-2088 wrote:
> >
> > The second definition for "global" declares that it's lifetime is
> > limited to source2.c.  As far as I can tell, these are not the
> > same variables, since they have distinct, non-overlapping lifetimes.
> > But this one has the AT_declaration tag, saying that there is
> > another definition for this variable, presumably at some enclosing
> > scope.  If I were to look for one, I'd find that the only likely
> > candidate has a non-overlapping lifetime.  This appears to be a flaw.
> 
> You appear to be confusing "scope" and "lifetime" in this paragraph
> (and throughout the message).  Should we read it as meaning "scope"
> for both?

No, I don't think I'm confusing scope and lifetime.

The scope is where the name is known.  As I said, the AT_declaration
attribute indicates that there is a definition of the variable in 
an outer scope.  At least that is my reading of the text.

The location lists give the lifetime of the variable, which is
clearly different from its scope.  The Dwarf spec explicitly 
says that there may be addresses which are not covered by the
location list.  At these locations, the variable is not available
(not live) but it is in scope.

-- 
Michael Eager	 Eager Consulting     eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


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