aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-06-07 11:29:36 -0600
committerTom Tromey <tromey@adacore.com>2019-06-14 08:02:20 -0600
commit4268ec187d401b9b132afa1a13c73e0026a53c5d (patch)
treec897ebf2928eea030e6f1bdddf012e3eb6d95908 /gdb/testsuite
parentabdb711e0855f0597a96db0486b598144b788212 (diff)
downloadgdb-4268ec187d401b9b132afa1a13c73e0026a53c5d.zip
gdb-4268ec187d401b9b132afa1a13c73e0026a53c5d.tar.gz
gdb-4268ec187d401b9b132afa1a13c73e0026a53c5d.tar.bz2
Recognize _ in attribute names
Ada attribute names can contain "_", but the lexer currently does not allow this -- even though the "attributes" array lists some attributes spelled this way. This patch fixes the bug and adds test cases for the existing attributes. This was reviewed off-list by Joel. I'm checking it in. gdb/ChangeLog 2019-06-14 Tom Tromey <tromey@adacore.com> * ada-lex.l: Allow "_" in attribute names. gdb/testsuite/ChangeLog 2019-06-14 Tom Tromey <tromey@adacore.com> * gdb.ada/formatted_ref.exp (test_p_x_addr): Check 'unchecked_access and 'unrestricted_access as well.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.ada/formatted_ref.exp18
2 files changed, 15 insertions, 8 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index bd48c92..9bfd570 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2019-06-14 Tom Tromey <tromey@adacore.com>
+ * gdb.ada/formatted_ref.exp (test_p_x_addr): Check
+ 'unchecked_access and 'unrestricted_access as well.
+
+2019-06-14 Tom Tromey <tromey@adacore.com>
+
PR ada/24539:
* gdb.ada/vla.exp: Update tests.
* gdb.ada/vla/vla.adb (Record_Type): Use No_Component_Reordering
diff --git a/gdb/testsuite/gdb.ada/formatted_ref.exp b/gdb/testsuite/gdb.ada/formatted_ref.exp
index a000910..9641af8 100644
--- a/gdb/testsuite/gdb.ada/formatted_ref.exp
+++ b/gdb/testsuite/gdb.ada/formatted_ref.exp
@@ -67,14 +67,16 @@ proc test_p_x { var val addr } {
proc test_p_x_addr { var addr } {
global gdb_prompt
- set test "print/x $var'access"
- gdb_test_multiple $test $test {
- -re "\\$\[0-9\]+ = $addr.*$gdb_prompt $" {
- pass $test
- }
- -re "\\$\[0-9\]+ = 0x\[a-f0-9+\]+.*$gdb_prompt $" {
- fail "$test (prints unexpected address)"
- }
+ foreach attr {access unchecked_access unrestricted_access} {
+ set test "print/x $var'$attr"
+ gdb_test_multiple $test $test {
+ -re "\\$\[0-9\]+ = $addr.*$gdb_prompt $" {
+ pass $test
+ }
+ -re "\\$\[0-9\]+ = 0x\[a-f0-9+\]+.*$gdb_prompt $" {
+ fail "$test (prints unexpected address)"
+ }
+ }
}
return 0
}