From: Daniel Jacobowitz <drow@mvista.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: Thu, 15 Aug 2002 15:11:00 -0000 [thread overview]
Message-ID: <20020815221223.GA17334@nevyn.them.org> (raw)
In-Reply-To: <vt21y8zu7vg.fsf@zenia.red-bean.com>
On Thu, Aug 15, 2002 at 04:31:15PM -0500, Jim Blandy wrote:
>
> If I understand this patch correctly, it stores a Fortran module in
> GDB's symbol table as if it were a C++ structure type, full of static
> data and function members. A Fortran module gets stored in GDB's
> symbol table as a LOC_TYPEDEF symbol. Is that right?
>
> I'd like to hear other folks' opinions on this.
>
> It seems to me like it would work, since a class establishes a scope
> that behaves very much like a module. Isn't Class::member, where
> member is a static thingy, very much like Module::member (or whatever
> the Fortran syntax is)? We already have logic for resolving class
> scopes; I don't immediately see why module scopes need to behave any
> differently.
>
> 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.
>
> Perhaps we should introduce LOC_MODULE, or TYPE_CODE_MODULE.
>
> 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.
That's my opinion. Fortran modules are obvious candidates for a real
scope; when we have real scopes they can do that, and for now we can
handle them like classes. I like the principle of the patch (though I
haven't looked at the patch itself).
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2002-08-15 22:11 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 [this message]
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
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=20020815221223.GA17334@nevyn.them.org \
--to=drow@mvista.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