Ada: Reserved word "all" should not need to be spelled in lowercase.
authorJoel Brobecker <brobecker@adacore.com>
Wed, 27 Nov 2013 14:47:40 +0000 (18:47 +0400)
committerJoel Brobecker <brobecker@adacore.com>
Tue, 3 Dec 2013 12:04:26 +0000 (16:04 +0400)
commit7fb1b8b13f1fb3a72f0ab3ce72967549ea040e17
treedcd7b5ffbdb8f6ba160acccf0a64cc3cce69bbaa
parent849f2b52ec2b71bc76188ac8c53f35fb57a5d41c
Ada: Reserved word "all" should not need to be spelled in lowercase.

Consider the following code:

   type Ptr is access all Integer;
   IP : Ptr := new Integer'(123);

IP is the Ada exception of a pointer to an integer. To dereference
the pointer and get its value, the user uses the reserved word "all"
as follow:

    (gdb) p ip.all
    $1 = 123

Ada being a case-insensitive language, the casing should not matter.
Unfortunately, for the reserved word "all", things don't work. For
instance:

    (gdb) p ip.ALL
    Type integer is not a structure or union type

This patch fixes the problem.

gdb/ChangeLog:

* ada-lex.l (find_dot_all): Use strncasecmp instead of strncmp.

gdb/testsuite/ChangeLog:

        * gdb.ada/dot_all: New testcase.
gdb/ChangeLog
gdb/ada-lex.l
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/dot_all.exp [new file with mode: 0644]
gdb/testsuite/gdb.ada/dot_all/foo.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/dot_all/pck.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/dot_all/pck.ads [new file with mode: 0644]