binutils-gdb/gdb/testsuite/gdb.ada
Joel Brobecker d2d43431e8 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 <packed: 1-bit elements>) (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.
2011-07-01 18:27:25 +00:00
..
array_bounds
array_return
array_subscript_addr
arrayidx
arrayparam
arrayptr
atomic_enum
call_pn
catch_ex
char_enum
char_param
complete
cond_lang
dyn_loc
exec_changed
exprs
fixed_cmp
fixed_points
formatted_ref
frame_args
fun_addr
fun_in_declare
funcall_param
homonym
int_deref
interface
lang_switch
mi_catch_ex
mod_from_name
nested
null_array
null_record
packed_array
packed_tagged
print_chars
ptr_typedef missing type description for typedef to pointer value 2011-07-01 18:26:22 +00:00
ptype_field
ptype_tagged_param
rec_return
ref_param
ref_tick_size
same_enum treat identical enum types as the same type 2011-07-01 18:26:50 +00:00
start
str_ref_cmp
sym_print_name
taft_type
tagged
tasks
tick_last_segv
type_coercion
uninitialized_vars
variant_record_packed_array
watch_arg
widewide
array_bounds.exp
array_return.exp
array_subscript_addr.exp
arrayidx.exp
arrayparam.exp
arrayptr.exp variables whose type is a typedef to an array pointer 2011-07-01 18:25:49 +00:00
assign_1.exp
atomic_enum.exp
boolean_expr.exp
call_pn.exp
catch_ex.exp
char_enum.exp
char_param.exp
complete.exp
cond_lang.exp
dyn_loc.exp
exec_changed.exp
exprs.exp
fixed_cmp.exp
fixed_points.exp
formatted_ref.exp
frame_args.exp
fun_addr.exp
fun_in_declare.exp
funcall_param.exp
gnat_ada.gpr
homonym.exp
info_types.c
info_types.exp
int_deref.exp
interface.exp
lang_switch.exp
Makefile.in
mi_catch_ex.exp
mod_from_name.exp
nested.exp
null_array.exp
null_record.exp
packed_array.exp Fix printing address of packed array 2011-07-01 18:27:25 +00:00
packed_tagged.exp
print_chars.exp
print_pc.exp
ptr_typedef.exp missing type description for typedef to pointer value 2011-07-01 18:26:22 +00:00
ptype_arith_binop.exp
ptype_field.exp
ptype_tagged_param.exp
rec_return.exp
ref_param.exp
ref_tick_size.exp
same_enum.exp treat identical enum types as the same type 2011-07-01 18:26:50 +00:00
start.exp
str_ref_cmp.exp
sym_print_name.exp
taft_type.exp
tagged.exp
tasks.exp
tick_last_segv.exp
type_coercion.exp
uninitialized_vars.exp
variant_record_packed_array.exp
watch_arg.exp
widewide.exp