binutils-gdb/gdb/testsuite/gdb.ada
Joel Brobecker 720d1a4025 [Ada] do not print arrays as array pointers
This patch enhances the debugger to distinguish between fat pointers
that represent either: array types, or array access types.  In the latter
case, the object/type is encoded as a typedef type pointing to the fat
pointer.

The first part of the change is to adjust ada_check_typedef to avoid
stripping the typedef layer when it points to a fat pointer.  The rest
of the patch is adjustments required in various places to deal with
the fact that the type is uses might now be a typedef.

gdb/ChangeLog:

        * ada-lang.h (ada_coerce_to_simple_array): Add declaration.
        * ada-lang.c (ada_typedef_target_type): New function.
        (desc_base_type): Add handling of fat pointer typedefs.
        (ada_coerce_to_simple_array): Make non-static.
        (decode_packed_array_bitsize): Add handling of fat pointer typedefs.
        Add assertion.
        (ada_template_to_fixed_record_type_1, ada_to_fixed_type)
        (ada_check_typedef): Add handling of fat pointer typedefs.
        (ada_evaluate_subexp) [OP_FUNCALL]: Likewise.
        * ada-typeprint.c (ada_print_type): Add handling of fat pointer
        typedefs.
        * ada-valprint.c (ada_val_print_1): Convert fat pointers that are not
        array accesses to simple arrays rather than simple array pointers.
        (ada_value_print): In the case of array descriptors, do not print
        the value type description unless it is an array access.

gdb/testsuite/ChangeLog:

        * gdb.ada/lang_switch.exp: Correct expected parameter value.

gdb/doc/ChangeLog:

        * gdb.texinfo (Ada Glitches): Remove paragraph describing the
        occasional case where the debugger prints an array address
        instead of the array itself.
2010-12-29 08:01:32 +00:00
..
array_bounds
array_return
array_subscript_addr
arrayidx
arrayparam
arrayptr
atomic_enum
call_pn
catch_ex
char_param
complete
cond_lang Use breakpoint location to parse condition over current language. 2010-05-17 17:23:33 +00:00
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
mod_from_name
nested
null_array
null_record
packed_array
packed_tagged
print_chars
ptype_field
ptype_tagged_param
rec_return
ref_param
ref_tick_size
start
str_ref_cmp
sym_print_name
taft_type
tagged
tasks
tick_last_segv
type_coercion
uninitialized_vars
variant_record_packed_array
watch_arg make parameter being watched is a non-constant. 2010-05-17 21:32:57 +00:00
array_bounds.exp
array_return.exp
array_subscript_addr.exp
arrayidx.exp lib/gdb.exp: New gdb_test_no_output function. 2010-05-20 19:18:58 +00:00
arrayparam.exp
arrayptr.exp
assign_1.exp 2010-06-08 Michael Snyder <msnyder@vmware.com> 2010-06-10 19:48:20 +00:00
atomic_enum.exp
boolean_expr.exp 2010-06-08 Michael Snyder <msnyder@vmware.com> 2010-06-10 19:48:20 +00:00
call_pn.exp
catch_ex.exp
char_param.exp
complete.exp
cond_lang.exp Use breakpoint location to parse condition over current language. 2010-05-17 17:23:33 +00:00
dyn_loc.exp
exec_changed.exp 2010-06-08 Michael Snyder <msnyder@vmware.com> 2010-06-08 22:58:03 +00:00
exprs.exp
fixed_cmp.exp
fixed_points.exp
formatted_ref.exp 2010-05-25 Michael Snyder <msnyder@vmware.com> 2010-05-26 18:05:25 +00:00
frame_args.exp 2010-06-08 Michael Snyder <msnyder@vmware.com> 2010-06-10 19:48:20 +00:00
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 [Ada] do not print arrays as array pointers 2010-12-29 08:01:32 +00:00
Makefile.in
mod_from_name.exp
nested.exp
null_array.exp gdb/testsuite/ 2010-11-04 18:52:11 +00:00
null_record.exp
packed_array.exp
packed_tagged.exp
print_chars.exp
print_pc.exp
ptype_arith_binop.exp 2010-06-08 Michael Snyder <msnyder@vmware.com> 2010-06-10 19:48:20 +00:00
ptype_field.exp
ptype_tagged_param.exp
rec_return.exp
ref_param.exp 2010-06-08 Michael Snyder <msnyder@vmware.com> 2010-06-10 19:48:20 +00:00
ref_tick_size.exp
start.exp
str_ref_cmp.exp
sym_print_name.exp
taft_type.exp
tagged.exp
tasks.exp
tick_last_segv.exp
type_coercion.exp 2010-06-08 Michael Snyder <msnyder@vmware.com> 2010-06-10 19:48:20 +00:00
uninitialized_vars.exp
variant_record_packed_array.exp
watch_arg.exp