This patch adds some tests that evidence a regression fixed by
the following patch from Pedro Alves:
[PATCH] ada-lang.c:coerce_unspec_val_to_type: Preserve laziness
http://www.sourceware.org/ml/gdb-patches/2013-07/msg00178.html
gdb/testsuite/ChangeLog:
* gdb.ada/arrayptr/foo.adb: Add some code defining an access
to a packed array.
* gdb.ada/arrayptr.exp: Add a few tests using that new access
to packed array.
Two modifications:
1. The addition of 2013 to the copyright year range for every file;
2. The use of a single year range, instead of potentially multiple
year ranges, as approved by the FSF.
We add testing of taking a slice of an array access. And we also
introduce the same amount of testing, but with an access to a
constrained array.
gdb/testsuite/ChangeLog:
* gdb.ada/arrayptr/foo.adb: Add access to constrained array.
* gdb.ada/arrayptr.exp: Add new tests.
Trying to print a variable defined as an access to an unconstrained
array:
type String_Access is access String;
S1 : String_Access;
If that variable is null, then GDB prints its value in an odd way:
(gdb) print S1
$1 = (string_bug.string_access) (null)
^^^^^^
This patch changes the debugger behavior to print the pointer using
the same output we'd use for any null pointer:
(gdb) print S1
$1 = (string_bug.string_access) 0x0
It also adds an assert, helping us verify an assumption.
gdb/ChangeLog:
* ada-valprint.c (ada_val_print_1): Print null array pointers as
`0x0' rather than `(null)'. Add assertion.
gdb/testsuite/ChangeLog:
* gdb.ada/arrayptr/foo.adb: Add new local variable Null_String.
* gdb.ada/arrayptr.exp: Add test printing that new variable.