On 06/28/2011 04:21 PM, Michael Eager wrote:
DWARF has attributes for accessibility (e.g., public, private). If the
attributes are similar to those for C++, you should generate them in a
similar fashion.
Well, Fortran has public and private - but I am not sure in how far it
matches C++'s public and private (cf. also below).
> I'm not sure what "type extension" means.
Type extension is inheritance, i.e. Fortran's
type parent
end type parent
type, extends(parent) :: child
end type child
matches C++'s
class parent {};
class child : public parent { };
> If there is
a comparable feature in C++ or other languages supported by DWARF, you
should generate similar DWARF info.
I think that's to a certain extend my problem: I do not completely
understand the current DWARF - nor the fine points of C++ to see in how
far it matches.
For instance: While both in C++ and Fortran variables and methods can be
public or private, Fortran just extends a type without having a concept
of public/private/protected inheritance. The semantics of Fortran's
public, private and protected is related to modules - which does not
really match C++ concept. The DWARF spec does not really tell the
implications of the accessibility tags, which makes it a tad more
difficult to understand what should be done.
I think we will start by marking the VTABLE as such and to try to handle
member functions. - And do compare how g++/gdb handle the approximate
C++ version.
Tobias