This is the mail archive of the
dwarf2@corp.sgi.com
mailing list for the dwarf2 project.
Fortran Common Blocks
- To: "'dwarf2 at corp dot sgi dot com'" <dwarf2 at corp dot sgi dot com>
- Subject: Fortran Common Blocks
- From: "Knott, Martin" <martin at epc dot co dot uk>
- Date: Thu, 13 Apr 2000 15:06:43 +0100
- Reply-To: "Knott, Martin" <martin at epc dot co dot uk>
Hi
I am currently attempting to generate Dwarf2 information for common blocks.
However, I am a little curious by the messages that DwarfDump produces:
<1>< 123> DW_TAG_subprogram
DW_AT_decl_line 1
DW_AT_decl_column 0
DW_AT_decl_file 1
DW_AT_sibling <192>
DW_AT_accessibility DW_ACCESS_public
DW_AT_name main.program
DW_AT_type <115>
DW_AT_prototyped no
DW_AT_high_pc 0x8048d20
DW_AT_low_pc 0x8048c50
DW_AT_external yes(1)
*** DWARF CHECK: DW_TAG_common_block: tag-tree relation is not valid ***
<2>< 159> DW_TAG_common_block
DW_AT_decl_line 6
DW_AT_decl_column 0
DW_AT_decl_file 1
DW_AT_sibling <191>
DW_AT_declaration yes(1)
DW_AT_name acommon
*** DWARF CHECK: DW_TAG_variable: tag-tree relation is not valid ***
<3>< 176> DW_TAG_variable
DW_AT_decl_line 6
DW_AT_decl_column 0
DW_AT_decl_file 1
DW_AT_accessibility DW_ACCESS_public
DW_AT_name arr
DW_AT_type <192>
DW_AT_external no
(I downloaded DwarfDump from http://reality.sgi.com/davea/objectinfo.html).
The above output suggests that:
a) DW_TAG_common_block cannot be a child of DW_TAG_subprogram, and
b) DW_TAG_variable cannot be a child of DW_TAG_common_block.
I notice also that in the Dwarf2 draft spec the use of
DW_TAG_common_inclusion is mentioned in relation to DW_TAG_subprogram
entries.
Could anyone enlighten me as to how the standard envisages common blocks to
be handled, who the parent of a DW_TAG_common_block DIE is supposed to be,
and who its children can be?
Thanks
Martin Knott
Edinburgh Portable Compilers Ltd
17 Alva Street
Edinburgh
Scotland