diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5b659d26cd..4e62f0c757 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2014-03-17 Pierre-Marie de Rodat + + * ada-lang.c (decode_constrained_packed_array): Perform a + minimal coercion for reference with coerce_ref instead of + ada_coerce_ref. + 2014-03-17 Tristan Gingold * solib-darwin.c (DYLD_VERSION_MAX): Increase value. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 31aa38088c..38df182e21 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -2250,14 +2250,14 @@ decode_constrained_packed_array (struct value *arr) { struct type *type; - arr = ada_coerce_ref (arr); - - /* If our value is a pointer, then dererence it. Make sure that - this operation does not cause the target type to be fixed, as - this would indirectly cause this array to be decoded. The rest - of the routine assumes that the array hasn't been decoded yet, - so we use the basic "value_ind" routine to perform the dereferencing, - as opposed to using "ada_value_ind". */ + /* If our value is a pointer, then dereference it. Likewise if + the value is a reference. Make sure that this operation does not + cause the target type to be fixed, as this would indirectly cause + this array to be decoded. The rest of the routine assumes that + the array hasn't been decoded yet, so we use the basic "coerce_ref" + and "value_ind" routines to perform the dereferencing, as opposed + to using "ada_coerce_ref" or "ada_value_ind". */ + arr = coerce_ref (arr); if (TYPE_CODE (ada_check_typedef (value_type (arr))) == TYPE_CODE_PTR) arr = value_ind (arr);