This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Patch for supportinf DW_TAG_module / FORTRAN modules


Hi Jim,

> Your patch is right, as far as I can see.  In that paragraph I'm just
> saying why I think the patch should work fine.  In the next paragraph
> I explain my reservations.
Ok.

> > > But I think a module should be represented by something that calls
> > > itself a module, not a typedef.  How will people feel reading a
> > > comment explaining that a LOC_TYPEDEF for a type with TYPE_CODE_CLASS
> > > is how we represent Fortran modules?  I'm not sure that counts as good
> > > maintenance.
> > I originally introduced a TYPE_CODE_MODULE that was basically equivalent
> > to a TYPE_CODE_CLASS, as much as TYPE_CODE_CLASS is really
> > TYPE_CODE_STRUCT. I think I must have pulled it out for the patch. I can
> > put it back in and make it equivalent to TYPE_CODE_CLASS.
> 
> If we're going to use a struct/class-like thingy to represent a
> Fortran module, then we should at least add DECLARED_TYPE_MODULE (see
> DECLARED_TYPE_CLASS, ... in gdbtypes.h).
Will do. I think I had that done as well.

> > > Or maybe this is okay for now.  When we provide better support for C++
> > > namespaces, Fortran modules can become a variant of that, which feels
> > > like a better fit.
> > Yes. *Cough* maybe this patch can provide support for namespaces?  ;o)
> 
> I'm not sure I really want the C++ `std' namespace represented as a
> struct type.
Please ignore that suggestion, it was made in jest. But you are right,
once namespace support it put in, it should be able to support FORTRAN
modules.

If I update the patch to use TYPE_CODE_MODULE and DECLARED_TYPE_CLASS,
would you reconsider the patch?

Petr


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