This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How can Fortran allocatable character variables be displayed in DDT?

I am debugging a Fortran program with DDT, but the value of an allocatable character variable (character(len = :), allocatable :: s) appears to be empty until it is passed into a subroutine. Is there a way to show the value in DDT?

Parents
  • Hi Suyash,

    Thank you for the update.  It's good to know there is a workaround for gfortran.  Unfortunately, I am mainly using the Intel compiler. In the Intel implementation, the derived type seems to hold a pointer to a null terminated string.  Is there a way to view that string using casting?

    Regards,

    John

Reply
  • Hi Suyash,

    Thank you for the update.  It's good to know there is a workaround for gfortran.  Unfortunately, I am mainly using the Intel compiler. In the Intel implementation, the derived type seems to hold a pointer to a null terminated string.  Is there a way to view that string using casting?

    Regards,

    John

Children
  • Hi John,

    Unfortunately for Intel the DW_AT_string_length field doesn't even exist which can only happen when Intel provides the DWARF information which would be a decision of the DWARF committee. Until then it will not be possible to useany kind of workaround to get the string.

    Sorry about that.

    Regards
    Suyash