X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Ftestsuite%2Fgdb.ada%2Fformatted_ref.exp;h=f8dd690fbb00c7a85019a0c26aa992724e9d59c7;hb=7a82e90312d7a474f773fbcc58f6f215cacd945f;hp=59c3747519c157949740a6728d82339cf41e9dbe;hpb=618f726fcb851883a0094aa7fa17003889b7189f;p=binutils-gdb.git diff --git a/gdb/testsuite/gdb.ada/formatted_ref.exp b/gdb/testsuite/gdb.ada/formatted_ref.exp index 59c3747519c..f8dd690fbb0 100644 --- a/gdb/testsuite/gdb.ada/formatted_ref.exp +++ b/gdb/testsuite/gdb.ada/formatted_ref.exp @@ -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 }