From d2d43431e83ac661e10934eb1c3fb7542c087527 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Fri, 1 Jul 2011 18:27:25 +0000 Subject: Fix printing address of packed array When trying to print the address of a non-packed array, GDB correctly prints the type name and address: (gdb) print &var $2 = (access pa.var) 0xbffff1d8 However, it is behaving differently when dealing with a packed array: (gdb) p &var (access array (4 .. 8) of boolean ) (4 => false, false, false, true, false) The type description isn't all that bad, but GDB shouldn't be printing the array value! This patch fixes the `print` and `ptype` command on packed and non-packed array. It also fixes a gdb.ada test to match with the new ouput. gdb/ChangeLog (Jean-Charles Delay): * ada-typeprint.c (ada_print_type): Fix both PAD type and pointer to constrained packed array type output. * ada-valprint.c (ada_val_print_1): Fix pointer to constrained packed array output. gdb/testsuite/ChangeLog (Jean-Charles Delay): * gdb.ada/packed_array.exp: Fix expected outout. --- gdb/ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gdb/ChangeLog') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 572faa2..1d1eef5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 2011-07-01 Jean-Charles Delay + * ada-typeprint.c (ada_print_type): Fix both PAD type and + pointer to constrained packed array type output. + * ada-valprint.c (ada_val_print_1): Fix pointer to constrained + packed array output. + +2011-07-01 Jean-Charles Delay + * ada-typeprint.c (print_array_type): removed if condition on show being negative for bounds printing. -- cgit v1.1