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: Replicated Dwarf [was Re: location lists]


Todd Allen wrote:
> 
> >
> > My impression, and again, I feel I have too little understanding of Ada
> > to offer examples, is that there are other ways to describe the structure
> > of an Ada program without the problems you describe above.  There are
> > similarities in Ada and C++ which may be used to your advantage.
> >
> 
>    What sort of similarities?  C++ certainly isn't my area of expertise, but
>    I didn't think there was anything like subroutines nested with other
>    subroutines, much less separate compilation for the two subroutines.
> 
>    Are there other cases where C++ DWARF must re-describe a scope, but does
>    so incompletely?  Is that the sort of thing you're talking about here, or
>    something else, altogether?

Templates in C++ represent scopes which are multiply defined, with specialization
for different instances.  There seems to be some similarity, but perhaps
there is not enough.

I'm acquainted with only a few other languages which support nested procedures:
Pascal, Algol 60, and Algol 68.  I don't know if there are implementations
which use Dwarf 2.  GCC supports nested subroutines, but again, I don't 
how this is represented in Dwarf 2.

>    I'm not completely set against using the scope replication approach to
>    describing copies of globals.  I do find it to be wasteful of space.  But
>    if that waste can be minimized, then I'd willing to implement it that way.
>    It even neatly solves the problem of knowing whether or not *any* local
>    copies for a given global exist, so that a walkback search for local
>    copies can be avoided, so it has some merit over the DW_TAG_local_copy
>    approach.

There was some discussion about relaxing the prohibition that a 
non-defining declaration may not have a location specification.
This can be used to describe copies of globals in C or C++; I cannot
say whether it could be used in Ada.  It appears that the issue is
how to refer to the actual definition.  It appears to me that this 
can be done with DW_AT_specification.

-- 
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]