This is the mail archive of the
dwarf2@corp.sgi.com
mailing list for the dwarf2 project.
Re: Modifies vs. Replaces
- To: Ron 603-884-2088 <brender at gemevn dot zko dot dec dot com>
- Subject: Re: Modifies vs. Replaces
- From: Michael Eager <eager at eagercon dot com>
- Date: Mon, 26 Mar 2001 19:32:03 -0800
- CC: DWARF2 at corp dot sgi dot com
- References: <01032615570825@gemevn.zko.dec.com>
- Reply-To: Michael Eager <eager at eagercon dot com>
Ron 603-884-2088 wrote:
>
> Of the original three alternatives, I strongly support #1 as the better
> interpretation for a location attribute on a non-defining declaration:
>
> Ignore location information in the defining entry, and
> only use the location information provided in the non-defining
> entry [within the scope of the non-defining entry].
As mentioned before, this requires duplication of information
in the defining declaration. This seems unnecessary and wasteful.
In most (all?) cases this would require a location list to be
used in the non-defining entry, since both the location of the
a global and any the locations of any copies would normally be
specified. The location of the global would be a relocatable
reference, adding to the size and complexity of the Dwarf data.
I have a question about what a compiler would put in the range list
for a non-defining entry. Using Todd's examples, he would put in
the start and end locations of the compilation unit containing
the non-defining declaration. Why he selected those numbers,
I can't guess, but I know that globals have valid lifetimes
outside that range. How should this range list be specified?
What is a debugger expected to do? Keep a list of all of the
many location lists which are created by non-defining declarations,
each tagged with a scope?
If Compaq's compilers generate code which has lifetime holes for
global variables, could you provide a reasonable example? Perhaps
with both the source and assembly code for the example?
--
Michael Eager Eager Consulting eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077