From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29982 invoked by alias); 11 Aug 2007 22:09:00 -0000 Received: (qmail 26533 invoked by uid 48); 11 Aug 2007 22:08:14 -0000 Date: Sat, 11 Aug 2007 22:09:00 -0000 Message-ID: <20070811220814.26530.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/29635] debug info of modules In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dfranke at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-08/txt/msg00782.txt.bz2 ------- Comment #3 from dfranke at gcc dot gnu dot org 2007-08-11 22:08 ------- gfortran seems to lack the following information: 1. DW_TAG_module to describe the module at hand 2. DW_TAG_imported_declaration/DW_TAG_imported_module/DW_AT_import to describe use-associated variables (dwarf2, sec. 4.3; dwarf3, sec. 3.2.3 and 3.2.4) The former is generated by ifort, the latter is not. As dwarf3, sec 3.2, indicates similarities of modules to C++ namespaces, it could be worth a try to see how it is implemented over there. The equivalent C++-code: $> cat a.cpp #include namespace foo { int i = 42; } int main() { using namespace foo; printf("%d\n", i); return 0; } $> g++ -g a.cpp $> readelf [...] <1>: Abbrev Number: 29 (DW_TAG_subprogram) DW_AT_external : 1 DW_AT_name : main DW_AT_decl_file : 1 DW_AT_decl_line : 17 DW_AT_type : <109> DW_AT_low_pc : 0x8048484 DW_AT_high_pc : 0x80484b8 DW_AT_frame_base : 0 (location list) DW_AT_sibling : <2>: Abbrev Number: 30 (DW_TAG_imported_module) DW_AT_decl_file : 1 DW_AT_decl_line : 18 DW_AT_import : <1>: Abbrev Number: 4 (DW_TAG_namespace) DW_AT_name : foo DW_AT_decl_file : 1 DW_AT_decl_line : 13 DW_AT_sibling : <2>: Abbrev Number: 31 (DW_TAG_variable) DW_AT_name : i DW_AT_decl_file : 1 DW_AT_decl_line : 14 DW_AT_MIPS_linkage_name: _ZN3foo1iE DW_AT_type : <109> DW_AT_external : 1 DW_AT_declaration : 1 <1>: Abbrev Number: 32 (DW_TAG_variable) DW_AT_specification: DW_AT_location : 5 byte block: 3 ec 96 4 8 (DW_OP_addr: 80496ec) [...] Steven, are you (still) working on this? -- dfranke at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dfranke at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29635