public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/29635] debug info of modules Date: Fri, 15 Aug 2008 18:30:00 -0000 [thread overview] Message-ID: <20080815182929.13020.qmail@sourceware.org> (raw) In-Reply-To: <bug-29635-10259@http.gcc.gnu.org/bugzilla/> ------- Comment #5 from jakub at gcc dot gnu dot org 2008-08-15 18:29 ------- Created an attachment (id=16077) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16077&action=view) gcc44-pr29635.patch Initial patch, which generates DW_TAG_module in the compilation unit that defines the module and puts all module procedures, variables, DW_TAG_common_blocks and derived types as children of that DIE. ATM it uses the same weird double DIE way as C++ namespaces use (one DIE in DW_TAG_namespace (resp. DW_TAG_module in Fortran) with DW_AT_declaration 1 and another outside of the namespace/module with DW_AT_specification. Any ideas why does C++ do this? To emit proper DW_TAG_imported_{declaration,module} DIEs there is much more work. One problem is that Fortran FE rereads the *.mod each time a USE statement is seen, so finding the same NAMESPACE_DECL is harder (we'd need to add some data structure mapping a module name to the NAMESPACE_DECL). If we have that, for non-renaming USE or USE, ONLY it is easy (at least in the same CU as the module definition), but for renaming we'd need to extend the API of the imported_module_or_decl debug_hook. The USE modx, a=>b, c=>d renaming also needs the DW_TAG_imported_declaration's with the renamings to be children of DW_TAG_imported_module. I think the renaming is visible from the symtree (the renamed name is in symtree->name, original in symtree->n.sym->name). Another problem are USE statements in different compilation unit from the one that defines the module. We probably can't output a reference to DW_TAG_module from a different .o file, so we'd need to emit DW_TAG_module in that case too, but can we just put into it just the module variables, procedures etc. that are used in the CU? I'm afraid module loading throws away stuff that is not needed. -- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|steven at gcc dot gnu dot |jakub at gcc dot gnu dot org |org | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29635
next prev parent reply other threads:[~2008-08-15 18:30 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-10-29 14:02 [Bug fortran/29635] New: " fxcoudert at gcc dot gnu dot org 2006-10-29 14:04 ` [Bug fortran/29635] " steven at gcc dot gnu dot org 2007-01-02 14:35 ` fxcoudert at gcc dot gnu dot org 2007-01-02 15:27 ` stevenb dot gcc at gmail dot com 2007-08-11 22:09 ` dfranke at gcc dot gnu dot org 2007-08-12 10:36 ` stevenb dot gcc at gmail dot com 2008-08-15 18:30 ` jakub at gcc dot gnu dot org [this message] 2008-08-15 20:20 ` jakub at gcc dot gnu dot org 2008-08-18 8:13 ` jakub at gcc dot gnu dot org 2008-08-18 8:44 ` jakub at gcc dot gnu dot org 2008-08-18 12:40 ` drow at gcc dot gnu dot org 2008-08-29 18:43 ` jakub at gcc dot gnu dot org 2009-04-10 21:39 ` dfranke at gcc dot gnu dot org 2009-05-29 7:45 ` burnus at gcc dot gnu dot org 2009-05-29 8:52 ` jakub at gcc dot gnu dot org
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=20080815182929.13020.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).