title: Print values out of a Fortran polymorphic derived data type in GDB
body: <p>I am trying to debug the following code using gdb 
  (GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) and gfortran
  (gcc-Version 4.6.3). If I start gdb and step through the subroutine 
  fun, I want to print the variables of the derived type "mytype" within
  the module class_test. It is easy to print the variable "int" that is also 
  within the module "class_test" using the command: print class_test::int .
  My question is how to print the variable int1, int2 ... int4 if the gdb
  steps through the subroutine fun?</p>
  
  <p>!! class definition</p>
  
  <pre><code>  module class_test
  
  
   integer :: int = 1
  
  
   type, public :: mytype
  
      private
  
      integer :: int1  = 2
  
      integer :: int2  = 3
  
      integer :: int3  = 4
  
      integer :: int4  = 5
  
    contains
  
  
    procedure, pass(this) :: fun
  
    end type mytype
  
    contains
  
    subroutine fun ( this )
  
    class(mytype) :: this
  
    write (*,*) "subroutine" 
  
    end subroutine fun
  
    end module class_test
  
  
    !! Program
    program test 
  
   use class_test
  
   type(mytype) :: struct
  
   write (*,*) "whateveryouwant"
  
   call struct%fun()
  
  
    end program
  </code></pre>