This is the mail archive of the
dwarf2@corp.sgi.com
mailing list for the dwarf2 project.
Re: Rewrite of PROPOSAL 001213.1 re default location
I believe the text of the document in 2.5.4 that describes
overlapping ranges was intended for just the situation that
Ron is addressing. I have a hard time imagining what it
would mean for both the outer and inner locations to be
current. I take it to mean that the debugger should read
the value from the innermost, and write any modifications
to *all* the locations which are active at the current PC.
There are two variants of nested ranges:
(1) Let's call the outer static address &x; when
the code looks like
load &x, %r5
[ lots of reads of %r5 ]
return
then both outer (&x) and inner (%r5) are live,
and the debugger must update *both* if the user
assigns a new value to x while the program is
in the inner region. Otherwise the new value
will be lost when the current function returns.
(2) If the code looks like
load &x, %r5
[ lots of reads of %r5, and a few writes ]
store %r5, &x
return
then, although, strictly speaking, the outer
location is not "live", the debugger should still
update both locations when the user assigns to
x, because accesses from other scopes (previous
frames, or a global watch, for example) will see
the static location and the user could become
confused ("But I just changed x to 17, why does
it still say 12???").
Can anyone provide another plausable interpretation of
the current description?
Dave W.
David B Anderson wrote:
>
> M.Eager writes:
> > Address ranges may overlap. When they do, they describe a
> > situation in which an object exists simultaneously in more than
> > one place. If all of the address ranges in a given location list
> > do not collectively cover the entire range over which the object
> > in question is defined, it is assumed that the object is not
> > available for the portion of the range that is not covered.
>
> But Ron is not, if I understand him, talking about
> the variable existing simultaneously in multiple places.
>
> At any one time only *one* of the places is current.
>
> (This is a restatement of a mail I sent earlier to the group.)
>
> >The only ambiguity that I see is what should a Dwarf consumer do when
> >an object exists in more than one place. It appears that the consumer
> >would have the choice to use any copy of the object.
> >
> >It would appear that resolving this ambiguity would resolve this issue.
>
> The key question is does 'simultaneously' in the document
> mean
> 'all locations are current'
> or does it mean
> 'Only the innermost-active (in a live-range sense) is current'
>
> ???
>
> I think the former is how Ron interpretes the current document.
> How do you interpret it?
>
> davea@sgi.com
--
Dave Weatherford Forte Tools
David.Weatherford@Sun.COM Sun Microsystems, Inc.