aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf-index-write.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2019-03-01 11:12:33 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2019-06-16 00:29:35 +0100
commit584a927c5ad0d18e9995a0049066b6c503bb7482 (patch)
treee7235e42ae1098ff109a169478c77dc1ef97accd /gdb/dwarf-index-write.c
parent30056ea04ae3ecd828e2a06e12e6f174ae6659c9 (diff)
downloadbinutils-584a927c5ad0d18e9995a0049066b6c503bb7482.zip
binutils-584a927c5ad0d18e9995a0049066b6c503bb7482.tar.gz
binutils-584a927c5ad0d18e9995a0049066b6c503bb7482.tar.bz2
gdb/fortran: Show the type for non allocated / associated types
Show the type of not-allocated and/or not-associated types. For array types and pointer to array types we are going to print the number of ranks. Consider this Fortran program: program test integer, allocatable :: vla (:) logical l allocate (vla(5:12)) l = allocated (vla) end program test And this GDB session with current HEAD: (gdb) start ... 2 integer, allocatable :: vla (:) (gdb) n 4 allocate (vla(5:12)) (gdb) ptype vla type = <not allocated> (gdb) p vla $1 = <not allocated> (gdb) And the same session with this patch applied: (gdb) start ... 2 integer, allocatable :: vla (:) (gdb) n 4 allocate (vla(5:12)) (gdb) ptype vla type = integer(kind=4), allocatable (:) (gdb) p vla $1 = <not allocated> (gdb) The type of 'vla' is now printed correctly, while the value itself still shows as '<not allocated>'. How GDB prints the type of associated pointers has changed in a similar way. gdb/ChangeLog: * f-typeprint.c (f_print_type): Don't return early for not associated or not allocated types. (f_type_print_varspec_suffix): Add print_rank parameter and print ranks of array types in case they dangling. (f_type_print_base): Add print_rank parameter. gdb/testsuite/ChangeLog: * gdb.fortran/pointers.f90: New file. * gdb.fortran/print_type.exp: New file. * gdb.fortran/vla-ptype.exp: Adapt expected results. * gdb.fortran/vla-type.exp: Likewise. * gdb.fortran/vla-value.exp: Likewise. * gdb.mi/mi-vla-fortran.exp: Likewise.
Diffstat (limited to 'gdb/dwarf-index-write.c')
0 files changed, 0 insertions, 0 deletions