aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lex.l
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2013-11-27 18:47:40 +0400
committerJoel Brobecker <brobecker@adacore.com>2013-12-03 16:04:26 +0400
commit7fb1b8b13f1fb3a72f0ab3ce72967549ea040e17 (patch)
treedcd7b5ffbdb8f6ba160acccf0a64cc3cce69bbaa /gdb/ada-lex.l
parent849f2b52ec2b71bc76188ac8c53f35fb57a5d41c (diff)
downloadgdb-7fb1b8b13f1fb3a72f0ab3ce72967549ea040e17.zip
gdb-7fb1b8b13f1fb3a72f0ab3ce72967549ea040e17.tar.gz
gdb-7fb1b8b13f1fb3a72f0ab3ce72967549ea040e17.tar.bz2
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.
Diffstat (limited to 'gdb/ada-lex.l')
-rw-r--r--gdb/ada-lex.l2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l
index 3c30043..8ad825b 100644
--- a/gdb/ada-lex.l
+++ b/gdb/ada-lex.l
@@ -545,7 +545,7 @@ find_dot_all (const char *str)
do
i += 1;
while (isspace (str[i]));
- if (strncmp (str+i, "all", 3) == 0
+ if (strncasecmp (str+i, "all", 3) == 0
&& ! isalnum (str[i+3]) && str[i+3] != '_')
return i0;
}