[Ada] fix printing slice of array defined as typedef
authorJoel Brobecker <brobecker@gnat.com>
Fri, 1 Apr 2011 17:03:24 +0000 (17:03 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Fri, 1 Apr 2011 17:03:24 +0000 (17:03 +0000)
commitb0dd768854fdf8ca67141da5483119a16f1f0ef7
tree5ae1b9a9f93eb0700a18621a8148f237c70c65bd
parent956a9fb9fb6573a18dca4726f8c2ae083bc4a508
[Ada] fix printing slice of array defined as typedef

A change we are making in the compiler to help preserve useful
types when using -feliminate-unused-debug-types exposed a small
hole in our value-printing code.

One example of the problem happens when trying to print a slice
of an array pointer.  If the variable is defined as a pointer to
the typedef of an array, then we fail to print the slice, like so:

    (gdb) p arr_ptr(1..2)
    cannot take slice of non-array

gdb/ChangeLog:

        * ada-lang.c (ada_is_simple_array_type, ada_value_slice_from_ptr)
        (ada_value_slice, empty_array, to_fixed_array_type): Deal with
        typedefs.
gdb/ChangeLog
gdb/ada-lang.c
This page took 0.030979 seconds and 4 git commands to generate.