This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [PATCH] Fortran DW_TAG_module/DW_TAG_imported_{declaration,module} support, improved DW_TAG_common_block support


On Wed, Aug 20, 2008 at 08:58:44PM +0200, Tobias Burnus wrote:
> Jakub Jelinek wrote:
> >The attached patch adds support for
> >DW_TAG_{module,imported_{module,declaration}} and improves
> >support for DW_TAG_common_block (putting all DW_TAG_member
> >DIEs inside of the DW_TAG_common_block for the same
> >common block rather than having one DW_TAG_common_block
> >for each and avoiding the special hacks in dwarf2out.c
> >
> >Regtested on x86_64-linux.
> >  
> 
> The Fortran bits look OK and it regtests after replacing gfc_getmem with 
> ggc_alloc_cleared in gfc_find_module (as you suggested on IRC).
> 
> However, somehow also the original symbol is imported. As the 
> modification at the very bottom shows this leads to wrong debug information.

I guess that's caused by the C++-ish compatibility handling of namespaces,
where all the stuff is put into the DW_TAG_namespace just as
DW_AT_declaration 1, and then there are subsequent DW_TAG_variable etc.
in the toplevel which complete the declarations.

Attached is an updated patch (and interdiff from the last posted patch),
which leaves this compatibility cruft only to C++ and lets Fortran define
stuff inside of DW_TAG_module.  I don't have idb, so couldn't try it
with that, and gdb doesn't handle DW_TAG_module etc. yet (but module
variables etc. weren't emitted into debug info before this patch either,
so it is not a regression), so all I could do is eyeball the -dA -g
assembly.

	Jakub

Attachment: Z228m
Description: Text document

Attachment: Z228lm
Description: Text document


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