old-cross-binutils/gdb/testsuite
Joel Brobecker 828292f271 variables whose type is a typedef to an array pointer
If we declare a type as being an access to array type, and then
declare a variable of that type, for instance:

        type Some_Array is array [...];
        type Array_Access is access all Some_Array;
        Table : Array_Access := [...];

The variable "Table" may be defined in the debugging information
as being a typedef to the array pointer type. In the past, it was
defined directly as the array pointer type, but this has been changed
to make sure that the typedef type gets used.

If the typedef type wasn't used, it would allow the compiler to stop
emitting that typedef type when compiling with
-feliminate-unused-debug-types.  The removal of this typedef would
be a problem, because GDB relies on the typedef to create symbols
for pointer types, and without it, we would no longer be able to
do "ptype array_access".

This patch helps prevent incorrect output or even crashes when that
extra typedef layer is used.

The testing is already mostly covered by arrayptr.exp, but I still
added a 'ptype' test, just for good measure.

gdb/ChangeLog: (Eric Botcazou)

        * ada-lang.c (thin_descriptor_type): Deal with typedefs.
        (decode_constrained_packed_array): Likewise.
        (ada_evaluate_subexp) <TERNOP_SLICE>: Likewise.

gdb/testsuite/ChangeLog (Joel Brobecker):

        * gdb.ada/arrayptr.exp: Add ptype test.
2011-07-01 18:25:49 +00:00
..
config gdb: tests: set remotetimeout to gdb_load_timeout for remote targets 2011-07-01 00:19:25 +00:00
gdb.ada variables whose type is a typedef to an array pointer 2011-07-01 18:25:49 +00:00
gdb.arch 2011-05-31 Pedro Alves <pedro@codesourcery.com> 2011-05-31 21:18:56 +00:00
gdb.asm
gdb.base 2011-07-02 Yao Qi <yao@codesourcery.com> 2011-07-01 16:42:42 +00:00
gdb.cell ChangeLog: 2011-05-06 20:48:48 +00:00
gdb.cp 2011-06-28 Yao Qi <yao@codesourcery.com> 2011-06-28 08:36:18 +00:00
gdb.disasm
gdb.dwarf2 gdb/ 2011-06-10 21:50:55 +00:00
gdb.fortran gdb/ 2011-06-29 22:05:16 +00:00
gdb.gdb
gdb.hp gdb 2011-04-19 18:04:11 +00:00
gdb.java
gdb.mi Fix races in mi2-var-display.exp. 2011-06-23 09:51:11 +00:00
gdb.modula2
gdb.multi
gdb.objc
gdb.opencl
gdb.opt * gdb.opt/inline-cmds.exp: Adjust checks with "finish" command to 2011-05-02 17:07:10 +00:00
gdb.pascal
gdb.python http://sourceware.org/ml/gdb-patches/2011-06/msg00442.html 2011-06-30 08:53:38 +00:00
gdb.reverse 2011-05-26 Pedro Alves <pedro@codesourcery.com> 2011-05-26 15:32:38 +00:00
gdb.server gdb/ 2011-03-08 12:46:52 +00:00
gdb.stabs * gdb.hp/gdb.aCC/Makefile.in (Makefile): Remove. 2011-03-03 16:57:58 +00:00
gdb.threads 2011-06-23 Yao Qi <yao@codesourcery.com> 2011-06-23 06:26:28 +00:00
gdb.trace 2011-05-24 Pedro Alves <pedro@codesourcery.com> 2011-05-24 10:48:19 +00:00
gdb.xml
lib gdb: tests: set remotetimeout to gdb_load_timeout for remote targets 2011-07-01 00:19:25 +00:00
.gdbinit
aclocal.m4
ChangeLog variables whose type is a typedef to an array pointer 2011-07-01 18:25:49 +00:00
configure * gdb.hp/gdb.aCC/Makefile.in (Makefile): Remove. 2011-03-03 16:57:58 +00:00
configure.ac * gdb.hp/gdb.aCC/Makefile.in (Makefile): Remove. 2011-03-03 16:57:58 +00:00
dg-extract-results.sh
Makefile.in * Makefile.in (TAGS): Rewrite. 2011-03-07 22:02:45 +00:00
TODO