This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH] Re: DW_TAG_common_block children
Jakub Jelinek wrote:
Note that the DW_AT_external flag is not listed as allowable attribute
for DW_TAG_common_block, but is for DW_TAG_variable, so it is moved
there as well.
Why was this necessary? DWARF makes no assumptions about how common
is implemented, but I would think that DW_TAG_common_block would
imply that the name can be found in the symbol table. When you
encounter DW_TAG_common_block, the internal symbol table entry should
be marked to indicate that the name is global.
DW_AT_external is used to describe variables or subprograms which
can be referenced from independently compiled sources, as distinguished
from local variables or subprograms which cannot be referenced. I guess
that you might look at a common block as similarly referenced from
other compilations, but there is no way to create a common block
which cannot be referenced.
This is an extension which is permitted in DWARF. If it seems
useful, DW_AT_external can be added to the list of attributes which
may appear with DW_TAG_common_block, but at first look it seems
redundant.
The standard is there for a reason, we have multiple debug info
producers and multiple consumers and having a standard is the only way
they can reasonably interoperate.
Amen.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077