Add skip_ada_tests to more Ada testcases
[binutils-gdb.git] / gdb / testsuite / gdb.ada / formatted_ref.exp
index 59c3747519c157949740a6728d82339cf41e9dbe..f8dd690fbb00c7a85019a0c26aa992724e9d59c7 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2007-2016 Free Software Foundation, Inc.
+# Copyright 2007-2020 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,6 +26,8 @@
 
 load_lib "ada.exp"
 
+if { [skip_ada_tests] } { return -1 }
+
 standard_ada_testfile formatted_ref
 
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
@@ -67,14 +69,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
 }