/* Support for printing Ada values for GDB, the GNU debugger.
- Copyright (C) 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1997, 2001, 2002,
- 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 1986, 1988-1989, 1991-1994, 1997, 2001-2012 Free
+ Software Foundation, Inc.
This file is part of GDB.
type = ada_check_typedef (type);
if (ada_is_array_descriptor_type (type)
- || ada_is_constrained_packed_array_type (type))
+ || (ada_is_constrained_packed_array_type (type)
+ && TYPE_CODE (type) != TYPE_CODE_PTR))
{
int retn;
struct value *mark = value_mark ();
if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF)
{
- CORE_ADDR deref_val_int
- = unpack_pointer (type, valaddr + offset_aligned);
+ CORE_ADDR deref_val_int;
+ struct value *deref_val;
+ deref_val = coerce_ref_if_computed (original_value);
+ if (deref_val)
+ {
+ common_val_print (deref_val, stream, recurse + 1, options,
+ current_language);
+ break;
+ }
+
+ deref_val_int = unpack_pointer (type, valaddr + offset_aligned);
if (deref_val_int != 0)
{
struct value *deref_val =