Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Elena Zannoni <ezannoni@redhat.com>
To: Jim Blandy <jimb@redhat.com>
Cc: Petr Sorfa <petrs@caldera.com>,
	"gdb-patches@sources.redhat.com" <gdb-patches@sources.redhat.com>
Subject: Re: [RFA] Patch for supportinf DW_TAG_module / FORTRAN modules
Date: Mon, 26 Aug 2002 16:01:00 -0000	[thread overview]
Message-ID: <15722.45787.968594.993458@localhost.redhat.com> (raw)
In-Reply-To: <vt2y9b6k102.fsf@zenia.red-bean.com>

Jim Blandy writes:
 > Petr Sorfa <petrs@caldera.com> writes:
 > > > 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?
 > 
 > I'd like to hear Elena's comments on it, but if she thinks it's okay,
 > then I'll review the patch in detail.


I think the using TYPE_CODE_MODULE and DECLARED_TYPE_CLASS will help
in distinguishing the Fortran modules.

I would prefer however is there were lots of new comments added to things
like this, to make things clearer:

!       if (cu_language == language_cplus || cu_language == language_fortran)
  	{
  	  /* For C++, these implicitly act as typedefs as well. */
  	  add_psymbol_to_list (pdi->name, strlen (pdi->name),

and

+     case DW_TAG_module:
+       read_structure_scope (die, objfile, cu_header);
+       break;


I don't nderstand the comment here:
+     case DW_TAG_module:
+       /* Read the module scope a structure. */
+       read_structure_scope (die, objfile, cu_header);



Elena


  reply	other threads:[~2002-08-26 23:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-16 13:44 Petr Sorfa
2002-08-15 14:41 ` Jim Blandy
2002-08-15 15:11   ` Daniel Jacobowitz
2002-08-16 12:15   ` Petr Sorfa
2002-08-16 12:51     ` Jim Blandy
2002-08-16 13:20       ` Petr Sorfa
2002-08-16 13:32         ` Jim Blandy
2002-08-26 16:01           ` Elena Zannoni [this message]
2002-08-26 16:29             ` Petr Sorfa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15722.45787.968594.993458@localhost.redhat.com \
    --to=ezannoni@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jimb@redhat.com \
    --cc=petrs@caldera.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox