828292f271
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. |
||
---|---|---|
.. | ||
config | ||
gdb.ada | ||
gdb.arch | ||
gdb.asm | ||
gdb.base | ||
gdb.cell | ||
gdb.cp | ||
gdb.disasm | ||
gdb.dwarf2 | ||
gdb.fortran | ||
gdb.gdb | ||
gdb.hp | ||
gdb.java | ||
gdb.mi | ||
gdb.modula2 | ||
gdb.multi | ||
gdb.objc | ||
gdb.opencl | ||
gdb.opt | ||
gdb.pascal | ||
gdb.python | ||
gdb.reverse | ||
gdb.server | ||
gdb.stabs | ||
gdb.threads | ||
gdb.trace | ||
gdb.xml | ||
lib | ||
.gdbinit | ||
aclocal.m4 | ||
ChangeLog | ||
configure | ||
configure.ac | ||
dg-extract-results.sh | ||
Makefile.in | ||
TODO |