[Dwarf-Discuss] DWARF representation for Fortran descriptors

Kendrick Wong kendrick@ca.ibm.com
Thu Oct 28 21:09:43 GMT 2010


How are Fortran descriptors represented in DWARF?

Take this program, for example:

INTEGER, POINTER :: obj1
INTEGER, ALLOCATABLE :: obj2 

What is the correct way to represent obj1, obj2 and their types?

$1a: DW_TAG_base_type
      DW_AT_name (INTEGER)
      DW_AT_encoding (DW_ATE_signed)
      DW_AT_associated (...)
      DW_AT_allocated (...)

$2a: DW_TAG_variable
      DW_AT_name (obj1)
      DW_AT_type ($1a)
      DW_AT_location (...)

$3a: DW_TAG_variable
      DW_AT_name (obj2)
      DW_AT_type ($1a)
      DW_AT_location (...)

or

$1b: DW_TAG_base_type
      DW_AT_name (INTEGER)
      DW_AT_encoding (DW_ATE_signed)

$2b: DW_TAG_pointer_type
      DW_AT_associated (...)
      DW_AT_type ($1b)

$3b: DW_TAG_pointer_type
      DW_AT_allocated (...)
      DW_AT_type ($1b)

$4b: DW_TAG_variable
      DW_AT_name (obj1)
      DW_AT_type ($2b)
      DW_AT_location (...)

$5b: DW_TAG_variable
      DW_AT_name (obj2)
      DW_AT_type ($3b)
      DW_AT_location (...)

Or another way?

Kendrick Wong 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dwarfstd.org/private.cgi/dwarf-discuss-dwarfstd.org/attachments/20101028/ce47ae66/attachment.htm>



More information about the Dwarf-discuss mailing list